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

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

Issue 515723004: Deoptimize context value in Turbofan (and Crankshaft). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | test/cctest/compiler/test-scheduler.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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 m.Return(undef_node); 148 m.Return(undef_node);
149 149
150 m.Bind(&deopt); 150 m.Bind(&deopt);
151 m.NewNode(common.LazyDeoptimization(), call); 151 m.NewNode(common.LazyDeoptimization(), call);
152 152
153 bailout_id = GetCallBailoutId(); 153 bailout_id = GetCallBailoutId();
154 Node* parameters = m.NewNode(common.StateValues(1), undef_node); 154 Node* parameters = m.NewNode(common.StateValues(1), undef_node);
155 Node* locals = m.NewNode(common.StateValues(0)); 155 Node* locals = m.NewNode(common.StateValues(0));
156 Node* stack = m.NewNode(common.StateValues(0)); 156 Node* stack = m.NewNode(common.StateValues(0));
157 157
158 Node* state_node = 158 Node* state_node = m.NewNode(common.FrameState(bailout_id), parameters,
159 m.NewNode(common.FrameState(bailout_id), parameters, locals, stack); 159 locals, stack, undef_node);
160 m.Deoptimize(state_node); 160 m.Deoptimize(state_node);
161 161
162 // Schedule the graph: 162 // Schedule the graph:
163 Schedule* schedule = m.Export(); 163 Schedule* schedule = m.Export();
164 164
165 cont_block = cont.block(); 165 cont_block = cont.block();
166 deopt_block = deopt.block(); 166 deopt_block = deopt.block();
167 167
168 return schedule; 168 return schedule;
169 } 169 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 m.Return(undef_node); 283 m.Return(undef_node);
284 284
285 m.Bind(&deopt); 285 m.Bind(&deopt);
286 m.NewNode(common.LazyDeoptimization(), call); 286 m.NewNode(common.LazyDeoptimization(), call);
287 287
288 bailout_id = GetCallBailoutId(); 288 bailout_id = GetCallBailoutId();
289 Node* parameters = m.NewNode(common.StateValues(1), undef_node); 289 Node* parameters = m.NewNode(common.StateValues(1), undef_node);
290 Node* locals = m.NewNode(common.StateValues(0)); 290 Node* locals = m.NewNode(common.StateValues(0));
291 Node* stack = m.NewNode(common.StateValues(0)); 291 Node* stack = m.NewNode(common.StateValues(0));
292 292
293 Node* state_node = 293 Node* state_node = m.NewNode(common.FrameState(bailout_id), parameters,
294 m.NewNode(common.FrameState(bailout_id), parameters, locals, stack); 294 locals, stack, undef_node);
295 m.Deoptimize(state_node); 295 m.Deoptimize(state_node);
296 296
297 // Schedule the graph: 297 // Schedule the graph:
298 Schedule* schedule = m.Export(); 298 Schedule* schedule = m.Export();
299 299
300 cont_block = cont.block(); 300 cont_block = cont.block();
301 deopt_block = deopt.block(); 301 deopt_block = deopt.block();
302 302
303 return schedule; 303 return schedule;
304 } 304 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 Handle<Object> result; 337 Handle<Object> result;
338 bool has_pending_exception = 338 bool has_pending_exception =
339 !Execution::Call(isolate, t.function, 339 !Execution::Call(isolate, t.function,
340 isolate->factory()->undefined_value(), 0, NULL, 340 isolate->factory()->undefined_value(), 0, NULL,
341 false).ToHandle(&result); 341 false).ToHandle(&result);
342 CHECK(!has_pending_exception); 342 CHECK(!has_pending_exception);
343 CHECK(result->SameValue(Smi::FromInt(42))); 343 CHECK(result->SameValue(Smi::FromInt(42)));
344 } 344 }
345 345
346 #endif 346 #endif
OLDNEW
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698