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

Side by Side Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 595863002: Adding more missing deoptimization points in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 Unique<Object>::CreateUninitialized(caller_context); 138 Unique<Object>::CreateUninitialized(caller_context);
139 Node* caller_context_node = 139 Node* caller_context_node =
140 m.NewNode(common.HeapConstant(caller_context_constant)); 140 m.NewNode(common.HeapConstant(caller_context_constant));
141 141
142 bailout_id = GetCallBailoutId(); 142 bailout_id = GetCallBailoutId();
143 Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant()); 143 Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
144 Node* locals = m.NewNode(common.StateValues(0)); 144 Node* locals = m.NewNode(common.StateValues(0));
145 Node* stack = m.NewNode(common.StateValues(0)); 145 Node* stack = m.NewNode(common.StateValues(0));
146 146
147 Node* state_node = m.NewNode( 147 Node* state_node = m.NewNode(
148 common.FrameState(JS_FRAME, bailout_id, kIgnoreOutput), parameters, 148 common.FrameState(JS_FRAME, bailout_id,
149 locals, stack, caller_context_node, m.UndefinedConstant()); 149 OutputFrameStateCombine::Ignore()),
150 parameters, locals, stack, caller_context_node, m.UndefinedConstant());
150 151
151 Handle<Context> context(deopt_function->context(), CcTest::i_isolate()); 152 Handle<Context> context(deopt_function->context(), CcTest::i_isolate());
152 Unique<Object> context_constant = 153 Unique<Object> context_constant =
153 Unique<Object>::CreateUninitialized(context); 154 Unique<Object>::CreateUninitialized(context);
154 Node* context_node = m.NewNode(common.HeapConstant(context_constant)); 155 Node* context_node = m.NewNode(common.HeapConstant(context_constant));
155 156
156 m.CallJS0(deopt_fun_node, m.UndefinedConstant(), context_node, state_node); 157 m.CallJS0(deopt_fun_node, m.UndefinedConstant(), context_node, state_node);
157 158
158 m.Return(m.UndefinedConstant()); 159 m.Return(m.UndefinedConstant());
159 160
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 Unique<Object> context_constant = 253 Unique<Object> context_constant =
253 Unique<Object>::CreateUninitialized(context); 254 Unique<Object>::CreateUninitialized(context);
254 Node* context_node = m.NewNode(common.HeapConstant(context_constant)); 255 Node* context_node = m.NewNode(common.HeapConstant(context_constant));
255 256
256 bailout_id = GetCallBailoutId(); 257 bailout_id = GetCallBailoutId();
257 Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant()); 258 Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant());
258 Node* locals = m.NewNode(common.StateValues(0)); 259 Node* locals = m.NewNode(common.StateValues(0));
259 Node* stack = m.NewNode(common.StateValues(0)); 260 Node* stack = m.NewNode(common.StateValues(0));
260 261
261 Node* state_node = m.NewNode( 262 Node* state_node = m.NewNode(
262 common.FrameState(JS_FRAME, bailout_id, kIgnoreOutput), parameters, 263 common.FrameState(JS_FRAME, bailout_id,
263 locals, stack, context_node, m.UndefinedConstant()); 264 OutputFrameStateCombine::Ignore()),
265 parameters, locals, stack, context_node, m.UndefinedConstant());
264 266
265 m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, context_node, 267 m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, context_node,
266 state_node); 268 state_node);
267 269
268 m.Return(m.UndefinedConstant()); 270 m.Return(m.UndefinedConstant());
269 271
270 // Schedule the graph: 272 // Schedule the graph:
271 Schedule* schedule = m.Export(); 273 Schedule* schedule = m.Export();
272 274
273 return schedule; 275 return schedule;
(...skipping 30 matching lines...) Expand all
304 Handle<Object> result; 306 Handle<Object> result;
305 bool has_pending_exception = 307 bool has_pending_exception =
306 !Execution::Call(isolate, t.function, 308 !Execution::Call(isolate, t.function,
307 isolate->factory()->undefined_value(), 0, NULL, 309 isolate->factory()->undefined_value(), 0, NULL,
308 false).ToHandle(&result); 310 false).ToHandle(&result);
309 CHECK(!has_pending_exception); 311 CHECK(!has_pending_exception);
310 CHECK(result->SameValue(Smi::FromInt(42))); 312 CHECK(result->SameValue(Smi::FromInt(42)));
311 } 313 }
312 314
313 #endif 315 #endif
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698