| 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 4e27fe41c638c6eddb7106941c2a9ed295af49bf..e11fc552d8ed561771615f55c7e77234792b927c 100644
|
| --- a/test/cctest/compiler/test-codegen-deopt.cc
|
| +++ b/test/cctest/compiler/test-codegen-deopt.cc
|
| @@ -114,6 +114,7 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
|
| }
|
|
|
| Schedule* BuildGraphAndSchedule(Graph* graph) {
|
| + Isolate* isolate = info.isolate();
|
| CommonOperatorBuilder common(zone());
|
|
|
| // Manually construct a schedule for the function below:
|
| @@ -127,6 +128,12 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
|
|
|
| RawMachineAssembler m(graph, &descriptor_builder);
|
|
|
| + Handle<Object> undef_object =
|
| + Handle<Object>(isolate->heap()->undefined_value(), isolate);
|
| + PrintableUnique<Object> undef_constant =
|
| + PrintableUnique<Object>::CreateUninitialized(zone(), undef_object);
|
| + Node* undef_node = m.NewNode(common.HeapConstant(undef_constant));
|
| +
|
| Handle<JSFunction> deopt_function =
|
| NewFunction("function deopt() { %DeoptimizeFunction(foo); }; deopt");
|
| PrintableUnique<Object> deopt_fun_constant =
|
| @@ -135,17 +142,16 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
|
|
|
|
|
| bailout_id = GetCallBailoutId();
|
| - Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
|
| + 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, kIgnoreOutput), parameters,
|
| - locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
|
| + Node* state_node = m.NewNode(common.FrameState(bailout_id, kIgnoreOutput),
|
| + parameters, locals, stack, undef_node);
|
|
|
| - m.CallJS0(deopt_fun_node, m.UndefinedConstant(), state_node);
|
| + m.CallJS0(deopt_fun_node, undef_node, state_node);
|
|
|
| - m.Return(m.UndefinedConstant());
|
| + m.Return(undef_node);
|
|
|
| // Schedule the graph:
|
| Schedule* schedule = m.Export();
|
| @@ -224,6 +230,7 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
|
| }
|
|
|
| Schedule* BuildGraphAndSchedule(Graph* graph) {
|
| + Isolate* isolate = info.isolate();
|
| CommonOperatorBuilder common(zone());
|
|
|
| // Manually construct a schedule for the function below:
|
| @@ -237,22 +244,27 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
|
|
|
| RawMachineAssembler m(graph, &descriptor_builder);
|
|
|
| + Handle<Object> undef_object =
|
| + Handle<Object>(isolate->heap()->undefined_value(), isolate);
|
| + PrintableUnique<Object> undef_constant =
|
| + PrintableUnique<Object>::CreateUninitialized(zone(), undef_object);
|
| + Node* undef_node = m.NewNode(common.HeapConstant(undef_constant));
|
| +
|
| PrintableUnique<Object> this_fun_constant =
|
| PrintableUnique<Object>::CreateUninitialized(zone(), function);
|
| Node* this_fun_node = m.NewNode(common.HeapConstant(this_fun_constant));
|
|
|
| bailout_id = GetCallBailoutId();
|
| - Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
|
| + 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, kIgnoreOutput), parameters,
|
| - locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
|
| + 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(m.UndefinedConstant());
|
| + m.Return(undef_node);
|
|
|
| // Schedule the graph:
|
| Schedule* schedule = m.Export();
|
|
|