Index: test/cctest/compiler/test-js-typed-lowering.cc |
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc |
index 874beceae3864a7ef04fe2d40b9f092bb59e8fbc..787918fa93644f482679018e92826c58312b2c96 100644 |
--- a/test/cctest/compiler/test-js-typed-lowering.cc |
+++ b/test/cctest/compiler/test-js-typed-lowering.cc |
@@ -48,6 +48,24 @@ class JSTypedLoweringTester : public HandleAndZoneScope { |
return n; |
} |
+ Node* UndefinedConstant() { |
+ Unique<Object> unique = |
+ Unique<Object>::CreateImmovable(isolate->factory()->undefined_value()); |
+ return graph.NewNode(common.HeapConstant(unique)); |
+ } |
+ |
+ Node* EmptyFrameState(Node* context) { |
+ Node* parameters = graph.NewNode(common.StateValues(0)); |
+ Node* locals = graph.NewNode(common.StateValues(0)); |
+ Node* stack = graph.NewNode(common.StateValues(0)); |
+ |
+ Node* state_node = |
+ graph.NewNode(common.FrameState(BailoutId(0), kIgnoreOutput), |
+ parameters, locals, stack, context, UndefinedConstant()); |
+ |
+ return state_node; |
+ } |
+ |
Node* reduce(Node* node) { |
JSGraph jsgraph(&graph, &common, &javascript, &typer, &machine); |
JSTypedLowering reducer(&jsgraph); |
@@ -775,12 +793,15 @@ TEST(UnaryNot) { |
TEST(RemoveToNumberEffects) { |
+ FLAG_turbo_deoptimization = true; |
+ |
JSTypedLoweringTester R; |
Node* effect_use = NULL; |
for (int i = 0; i < 10; i++) { |
Node* p0 = R.Parameter(Type::Number()); |
Node* ton = R.Unop(R.javascript.ToNumber(), p0); |
+ Node* frame_state = R.EmptyFrameState(R.context()); |
effect_use = NULL; |
switch (i) { |
@@ -796,11 +817,11 @@ TEST(RemoveToNumberEffects) { |
effect_use = R.graph.NewNode(R.common.EffectPhi(1), ton, R.start()); |
case 3: |
effect_use = R.graph.NewNode(R.javascript.Add(), ton, ton, R.context(), |
- ton, R.start()); |
+ frame_state, ton, R.start()); |
break; |
case 4: |
effect_use = R.graph.NewNode(R.javascript.Add(), p0, p0, R.context(), |
- ton, R.start()); |
+ frame_state, ton, R.start()); |
break; |
case 5: |
effect_use = R.graph.NewNode(R.common.Return(), p0, ton, R.start()); |