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

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

Issue 528963002: Revert "Make FrameStates recursive (to be used for inlining)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/compiler/raw-machine-assembler.h ('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-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();
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698