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

Unified Diff: test/cctest/compiler/test-scheduler.cc

Issue 442253002: Add deoptimization translations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments. 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 | « test/cctest/compiler/test-run-deopt.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-scheduler.cc
diff --git a/test/cctest/compiler/test-scheduler.cc b/test/cctest/compiler/test-scheduler.cc
index e33f000b2631dada1197e67e68858bf8817ac695..757f83a7109ac14c58618652220332bade49db9d 100644
--- a/test/cctest/compiler/test-scheduler.cc
+++ b/test/cctest/compiler/test-scheduler.cc
@@ -1716,7 +1716,7 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
Graph graph(scope.main_zone());
- CommonOperatorBuilder common_builder(scope.main_zone());
+ CommonOperatorBuilder common(scope.main_zone());
JSOperatorBuilder js_builder(scope.main_zone());
InitializedHandleScope handles;
@@ -1761,37 +1761,40 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
PrintableUnique<Object>::CreateUninitialized(scope.main_zone(),
undef_object);
- Node* undef_node = graph.NewNode(common_builder.HeapConstant(undef_constant));
+ Node* undef_node = graph.NewNode(common.HeapConstant(undef_constant));
- Node* start_node = graph.NewNode(common_builder.Start(0));
+ Node* start_node = graph.NewNode(common.Start(0));
CallDescriptor* descriptor = linkage.GetJSCallDescriptor(0);
- Node* call_node = graph.NewNode(common_builder.Call(descriptor),
+ Node* call_node = graph.NewNode(common.Call(descriptor),
undef_node, // function
undef_node, // context
start_node, // effect
start_node); // control
- Node* cont_node = graph.NewNode(common_builder.Continuation(), call_node);
- Node* lazy_deopt_node =
- graph.NewNode(common_builder.LazyDeoptimization(), call_node);
+ Node* cont_node = graph.NewNode(common.Continuation(), call_node);
+ Node* lazy_deopt_node = graph.NewNode(common.LazyDeoptimization(), call_node);
+
+ Node* parameters = graph.NewNode(common.StateValues(1), undef_node);
+ Node* locals = graph.NewNode(common.StateValues(0));
+ Node* stack = graph.NewNode(common.StateValues(0));
- FrameStateDescriptor stateDescriptor(BailoutId(1234));
- Node* state_node = graph.NewNode(common_builder.FrameState(stateDescriptor));
+ Node* state_node = graph.NewNode(common.FrameState(BailoutId(1234)),
+ parameters, locals, stack);
- Node* return_node = graph.NewNode(common_builder.Return(),
+ Node* return_node = graph.NewNode(common.Return(),
undef_node, // return value
call_node, // effect
cont_node); // control
- Node* deoptimization_node = graph.NewNode(common_builder.Deoptimize(),
+ Node* deoptimization_node = graph.NewNode(common.Deoptimize(),
state_node, // deopt environment
call_node, // effect
lazy_deopt_node); // control
Node* merge_node =
- graph.NewNode(common_builder.Merge(2), return_node, deoptimization_node);
+ graph.NewNode(common.Merge(2), return_node, deoptimization_node);
- Node* end_node = graph.NewNode(common_builder.End(), merge_node);
+ Node* end_node = graph.NewNode(common.End(), merge_node);
graph.SetStart(start_node);
graph.SetEnd(end_node);
@@ -1824,9 +1827,12 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
CHECK(!cont_block->deferred_);
// The lazy deopt block contains framestate + bailout (and nothing else).
CHECK_EQ(deoptimization_node, deopt_block->control_input_);
- CHECK_EQ(2, static_cast<int>(deopt_block->nodes_.size()));
+ CHECK_EQ(5, static_cast<int>(deopt_block->nodes_.size()));
CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]);
- CHECK_EQ(state_node, deopt_block->nodes_[1]);
+ CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[1]->op()->opcode());
+ CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[2]->op()->opcode());
+ CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[3]->op()->opcode());
+ CHECK_EQ(state_node, deopt_block->nodes_[4]);
}
#endif
« no previous file with comments | « test/cctest/compiler/test-run-deopt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698