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 "test/unittests/compiler/instruction-selector-unittest.h" | 5 #include "test/unittests/compiler/instruction-selector-unittest.h" |
6 | 6 |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/schedule.h" | 8 #include "src/compiler/schedule.h" |
9 #include "src/flags.h" | 9 #include "src/flags.h" |
10 #include "test/unittests/compiler/compiler-test-utils.h" | 10 #include "test/unittests/compiler/compiler-test-utils.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 m.NewNode(m.common()->TypedStateValues(&int32_type), m.Int32Constant(1)); | 370 m.NewNode(m.common()->TypedStateValues(&int32_type), m.Int32Constant(1)); |
371 Node* locals = m.NewNode(m.common()->TypedStateValues(&empty_types)); | 371 Node* locals = m.NewNode(m.common()->TypedStateValues(&empty_types)); |
372 Node* stack = m.NewNode(m.common()->TypedStateValues(&empty_types)); | 372 Node* stack = m.NewNode(m.common()->TypedStateValues(&empty_types)); |
373 Node* context_dummy = m.Int32Constant(0); | 373 Node* context_dummy = m.Int32Constant(0); |
374 | 374 |
375 Node* state_node = m.NewNode( | 375 Node* state_node = m.NewNode( |
376 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), | 376 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), |
377 m.GetFrameStateFunctionInfo(1, 0)), | 377 m.GetFrameStateFunctionInfo(1, 0)), |
378 parameters, locals, stack, context_dummy, function_node, | 378 parameters, locals, stack, context_dummy, function_node, |
379 m.UndefinedConstant()); | 379 m.UndefinedConstant()); |
380 Node* call = m.CallJS0(function_node, receiver, context, state_node); | 380 Node* call = |
| 381 m.CallJS0WithFrameState(function_node, receiver, context, state_node); |
381 m.Return(call); | 382 m.Return(call); |
382 | 383 |
383 Stream s = m.Build(kAllExceptNopInstructions); | 384 Stream s = m.Build(kAllExceptNopInstructions); |
384 | 385 |
385 // Skip until kArchCallJSFunction. | 386 // Skip until kArchCallJSFunction. |
386 size_t index = 0; | 387 size_t index = 0; |
387 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; | 388 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; |
388 index++) { | 389 index++) { |
389 } | 390 } |
390 // Now we should have two instructions: call and return. | 391 // Now we should have two instructions: call and return. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 607 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
607 // Continuation. | 608 // Continuation. |
608 | 609 |
609 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 610 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
610 EXPECT_EQ(index, s.size()); | 611 EXPECT_EQ(index, s.size()); |
611 } | 612 } |
612 | 613 |
613 } // namespace compiler | 614 } // namespace compiler |
614 } // namespace internal | 615 } // namespace internal |
615 } // namespace v8 | 616 } // namespace v8 |
OLD | NEW |