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

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

Issue 542613002: Fix deoptimization of context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase 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/deoptimizer.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-codegen-deopt.cc
diff --git a/test/cctest/compiler/test-codegen-deopt.cc b/test/cctest/compiler/test-codegen-deopt.cc
index 58ad363286e9db797a7edc32237f30756c69ee5e..7c5e05ab8a22ca7665429ae03b3e8e6d717a62f7 100644
--- a/test/cctest/compiler/test-codegen-deopt.cc
+++ b/test/cctest/compiler/test-codegen-deopt.cc
@@ -139,10 +139,11 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
Unique<Object>::CreateUninitialized(deopt_function);
Node* deopt_fun_node = m.NewNode(common.HeapConstant(deopt_fun_constant));
- Handle<Context> context(deopt_function->context(), CcTest::i_isolate());
- Unique<Object> context_constant =
- Unique<Object>::CreateUninitialized(context);
- Node* context_node = m.NewNode(common.HeapConstant(context_constant));
+ Handle<Context> caller_context(function->context(), CcTest::i_isolate());
+ Unique<Object> caller_context_constant =
+ Unique<Object>::CreateUninitialized(caller_context);
+ Node* caller_context_node =
+ m.NewNode(common.HeapConstant(caller_context_constant));
bailout_id = GetCallBailoutId();
Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
@@ -151,7 +152,12 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester {
Node* state_node =
m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters,
- locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
+ locals, stack, caller_context_node, m.UndefinedConstant());
+
+ Handle<Context> context(deopt_function->context(), CcTest::i_isolate());
+ Unique<Object> context_constant =
+ Unique<Object>::CreateUninitialized(context);
+ Node* context_node = m.NewNode(common.HeapConstant(context_constant));
m.CallJS0(deopt_fun_node, m.UndefinedConstant(), context_node, state_node);
@@ -260,7 +266,7 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester {
Node* state_node =
m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters,
- locals, stack, m.UndefinedConstant(), m.UndefinedConstant());
+ locals, stack, context_node, m.UndefinedConstant());
m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, context_node,
state_node);
« no previous file with comments | « src/deoptimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698