Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1352)

Unified Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | test/cctest/compiler/test-schedule.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-codegen-deopt.cc
diff --git a/test/cctest/compiler/test-codegen-deopt.cc b/test/cctest/compiler/test-codegen-deopt.cc
index 4cc0fde17db45c19e362d67d89fdc588165c475c..e11fc552d8ed561771615f55c7e77234792b927c 100644
--- a/test/cctest/compiler/test-codegen-deopt.cc
+++ b/test/cctest/compiler/test-codegen-deopt.cc
@@ -140,31 +140,22 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
PrintableUnique<Object>::CreateUninitialized(zone(), deopt_function);
Node* deopt_fun_node = m.NewNode(common.HeapConstant(deopt_fun_constant));
- MLabel deopt, cont;
- Node* call = m.CallJS0(deopt_fun_node, undef_node, &cont, &deopt);
-
- m.Bind(&cont);
- m.NewNode(common.Continuation(), call);
- m.Return(undef_node);
-
- m.Bind(&deopt);
- m.NewNode(common.LazyDeoptimization(), call);
bailout_id = GetCallBailoutId();
Node* parameters = m.NewNode(common.StateValues(1), undef_node);
Node* locals = m.NewNode(common.StateValues(0));
Node* stack = m.NewNode(common.StateValues(0));
- Node* state_node =
- m.NewNode(common.FrameState(bailout_id), parameters, locals, stack);
- m.Deoptimize(state_node);
+ Node* state_node = m.NewNode(common.FrameState(bailout_id, kIgnoreOutput),
+ parameters, locals, stack, undef_node);
+
+ m.CallJS0(deopt_fun_node, undef_node, state_node);
+
+ m.Return(undef_node);
// Schedule the graph:
Schedule* schedule = m.Export();
- cont_block = cont.block();
- deopt_block = deopt.block();
-
return schedule;
}
@@ -179,9 +170,6 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
CHECK(false);
return BailoutId(-1);
}
-
- BasicBlock* cont_block;
- BasicBlock* deopt_block;
};
@@ -198,15 +186,7 @@ TEST(TurboTrivialDeoptCodegen) {
DeoptimizationInputData* data =
DeoptimizationInputData::cast(t.result_code->deoptimization_data());
- Label* cont_label = t.code->GetLabel(t.cont_block);
- Label* deopt_label = t.code->GetLabel(t.deopt_block);
-
- // Check the safepoint - it should contain an entry for the call
- // with the right deoptimization address.
- SafepointEntry entry = t.result_code->GetSafepointEntry(
- t.result_code->instruction_start() + cont_label->pos());
- CHECK(entry.is_valid());
- CHECK_EQ(deopt_label->pos(), entry.deoptimization_pc());
+ // TODO(jarin) Find a way to test the safepoint.
// Check that we deoptimize to the right AST id.
CHECK_EQ(1, data->DeoptCount());
@@ -274,32 +254,21 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
PrintableUnique<Object>::CreateUninitialized(zone(), function);
Node* this_fun_node = m.NewNode(common.HeapConstant(this_fun_constant));
- MLabel deopt, cont;
- Node* call = m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node,
- &cont, &deopt);
-
- m.Bind(&cont);
- m.NewNode(common.Continuation(), call);
- m.Return(undef_node);
-
- m.Bind(&deopt);
- m.NewNode(common.LazyDeoptimization(), call);
-
bailout_id = GetCallBailoutId();
Node* parameters = m.NewNode(common.StateValues(1), undef_node);
Node* locals = m.NewNode(common.StateValues(0));
Node* stack = m.NewNode(common.StateValues(0));
- Node* state_node =
- m.NewNode(common.FrameState(bailout_id), parameters, locals, stack);
- m.Deoptimize(state_node);
+ Node* state_node = m.NewNode(common.FrameState(bailout_id, kIgnoreOutput),
+ parameters, locals, stack, undef_node);
+
+ m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, state_node);
+
+ m.Return(undef_node);
// Schedule the graph:
Schedule* schedule = m.Export();
- cont_block = cont.block();
- deopt_block = deopt.block();
-
return schedule;
}
@@ -314,9 +283,6 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
CHECK(false);
return BailoutId(-1);
}
-
- BasicBlock* cont_block;
- BasicBlock* deopt_block;
};
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | test/cctest/compiler/test-schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698