OLD | NEW |
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 Loading... |
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, m.UndefinedConstant()); |
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 Loading... |
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, m.UndefinedConstant()); |
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 Loading... |
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 |
OLD | NEW |