| 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 21766e859f0d1346d3b6be98e78b0816462a8787..551cc96df988bc4cc145540ee41a39fb7f6bc1b3 100644
|
| --- a/test/cctest/compiler/test-codegen-deopt.cc
|
| +++ b/test/cctest/compiler/test-codegen-deopt.cc
|
| @@ -123,7 +123,6 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
|
| }
|
|
|
| Schedule* BuildGraphAndSchedule(Graph* graph) {
|
| - Isolate* isolate = info.isolate();
|
| CommonOperatorBuilder common(zone());
|
|
|
| // Manually construct a schedule for the function below:
|
| @@ -134,34 +133,29 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
|
| CSignature1<Object*, Object*> sig;
|
| RawMachineAssembler m(graph, &sig);
|
|
|
| - 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 =
|
| PrintableUnique<Object>::CreateUninitialized(zone(), deopt_function);
|
| Node* deopt_fun_node = m.NewNode(common.HeapConstant(deopt_fun_constant));
|
|
|
| - Handle<Context> context(deopt_function->context(), isolate);
|
| + Handle<Context> context(deopt_function->context(), CcTest::i_isolate());
|
| PrintableUnique<Object> context_constant =
|
| PrintableUnique<Object>::CreateUninitialized(zone(), context);
|
| Node* context_node = m.NewNode(common.HeapConstant(context_constant));
|
|
|
| bailout_id = GetCallBailoutId();
|
| - Node* parameters = m.NewNode(common.StateValues(1), undef_node);
|
| + Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
|
| 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, undef_node);
|
| + Node* state_node =
|
| + m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters,
|
| + locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
|
|
|
| - m.CallJS0(deopt_fun_node, undef_node, context_node, state_node);
|
| + m.CallJS0(deopt_fun_node, m.UndefinedConstant(), context_node, state_node);
|
|
|
| - m.Return(undef_node);
|
| + m.Return(m.UndefinedConstant());
|
|
|
| // Schedule the graph:
|
| Schedule* schedule = m.Export();
|
| @@ -240,7 +234,6 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
|
| }
|
|
|
| Schedule* BuildGraphAndSchedule(Graph* graph) {
|
| - Isolate* isolate = info.isolate();
|
| CommonOperatorBuilder common(zone());
|
|
|
| // Manually construct a schedule for the function below:
|
| @@ -251,33 +244,28 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
|
| CSignature1<Object*, Object*> sig;
|
| RawMachineAssembler m(graph, &sig);
|
|
|
| - 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));
|
|
|
| - Handle<Context> context(function->context(), isolate);
|
| + Handle<Context> context(function->context(), CcTest::i_isolate());
|
| PrintableUnique<Object> context_constant =
|
| PrintableUnique<Object>::CreateUninitialized(zone(), context);
|
| Node* context_node = m.NewNode(common.HeapConstant(context_constant));
|
|
|
| bailout_id = GetCallBailoutId();
|
| - Node* parameters = m.NewNode(common.StateValues(1), undef_node);
|
| + Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
|
| 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, undef_node);
|
| + Node* state_node =
|
| + m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters,
|
| + locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
|
|
|
| m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, context_node,
|
| state_node);
|
|
|
| - m.Return(undef_node);
|
| + m.Return(m.UndefinedConstant());
|
|
|
| // Schedule the graph:
|
| Schedule* schedule = m.Export();
|
|
|