Commit 0d4b9904 authored by mvstanton's avatar mvstanton Committed by Commit bot

CompilerDispatcher unittest should use is_compiled() predicate.

BUG=v8:5759
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2588743003
Cr-Commit-Position: refs/heads/master@{#41810}
parent 21a85c4a
...@@ -104,12 +104,12 @@ TEST_F(CompilerDispatcherTest, FinishNow) { ...@@ -104,12 +104,12 @@ TEST_F(CompilerDispatcherTest, FinishNow) {
Handle<JSFunction> f = Handle<JSFunction>::cast(RunJS(isolate(), script)); Handle<JSFunction> f = Handle<JSFunction>::cast(RunJS(isolate(), script));
Handle<SharedFunctionInfo> shared(f->shared(), i_isolate()); Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
ASSERT_FALSE(shared->HasBaselineCode()); ASSERT_FALSE(shared->is_compiled());
ASSERT_TRUE(dispatcher.Enqueue(shared)); ASSERT_TRUE(dispatcher.Enqueue(shared));
ASSERT_TRUE(dispatcher.FinishNow(shared)); ASSERT_TRUE(dispatcher.FinishNow(shared));
// Finishing removes the SFI from the queue. // Finishing removes the SFI from the queue.
ASSERT_FALSE(dispatcher.IsEnqueued(shared)); ASSERT_FALSE(dispatcher.IsEnqueued(shared));
ASSERT_TRUE(shared->HasBaselineCode()); ASSERT_TRUE(shared->is_compiled());
} }
TEST_F(CompilerDispatcherTest, IdleTask) { TEST_F(CompilerDispatcherTest, IdleTask) {
...@@ -131,7 +131,7 @@ TEST_F(CompilerDispatcherTest, IdleTask) { ...@@ -131,7 +131,7 @@ TEST_F(CompilerDispatcherTest, IdleTask) {
platform.RunIdleTask(1000.0, 0.0); platform.RunIdleTask(1000.0, 0.0);
ASSERT_FALSE(dispatcher.IsEnqueued(shared)); ASSERT_FALSE(dispatcher.IsEnqueued(shared));
ASSERT_TRUE(shared->HasBaselineCode()); ASSERT_TRUE(shared->is_compiled());
} }
TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) { TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) {
...@@ -157,7 +157,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) { ...@@ -157,7 +157,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) {
platform.RunIdleTask(2.0, 1.0); platform.RunIdleTask(2.0, 1.0);
ASSERT_TRUE(dispatcher.IsEnqueued(shared)); ASSERT_TRUE(dispatcher.IsEnqueued(shared));
ASSERT_FALSE(shared->HasBaselineCode()); ASSERT_FALSE(shared->is_compiled());
ASSERT_TRUE(platform.IdleTaskPending()); ASSERT_TRUE(platform.IdleTaskPending());
// The job should be still scheduled for the main thread, but ready for // The job should be still scheduled for the main thread, but ready for
...@@ -170,7 +170,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) { ...@@ -170,7 +170,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskSmallIdleTime) {
platform.RunIdleTask(1000.0, 0.0); platform.RunIdleTask(1000.0, 0.0);
ASSERT_FALSE(dispatcher.IsEnqueued(shared)); ASSERT_FALSE(dispatcher.IsEnqueued(shared));
ASSERT_TRUE(shared->HasBaselineCode()); ASSERT_TRUE(shared->is_compiled());
ASSERT_FALSE(platform.IdleTaskPending()); ASSERT_FALSE(platform.IdleTaskPending());
} }
...@@ -199,7 +199,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskException) { ...@@ -199,7 +199,7 @@ TEST_F(CompilerDispatcherTest, IdleTaskException) {
platform.RunIdleTask(1000.0, 0.0); platform.RunIdleTask(1000.0, 0.0);
ASSERT_FALSE(dispatcher.IsEnqueued(shared)); ASSERT_FALSE(dispatcher.IsEnqueued(shared));
ASSERT_FALSE(shared->HasBaselineCode()); ASSERT_FALSE(shared->is_compiled());
ASSERT_FALSE(try_catch.HasCaught()); ASSERT_FALSE(try_catch.HasCaught());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment