| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 m.AddNode(m.common()->TypedStateValues(&int32_type), m.Int32Constant(1)); | 375 m.AddNode(m.common()->TypedStateValues(&int32_type), m.Int32Constant(1)); |
| 376 Node* locals = m.AddNode(m.common()->TypedStateValues(&empty_types)); | 376 Node* locals = m.AddNode(m.common()->TypedStateValues(&empty_types)); |
| 377 Node* stack = m.AddNode(m.common()->TypedStateValues(&empty_types)); | 377 Node* stack = m.AddNode(m.common()->TypedStateValues(&empty_types)); |
| 378 Node* context_dummy = m.Int32Constant(0); | 378 Node* context_dummy = m.Int32Constant(0); |
| 379 | 379 |
| 380 Node* state_node = m.AddNode( | 380 Node* state_node = m.AddNode( |
| 381 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), | 381 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), |
| 382 m.GetFrameStateFunctionInfo(1, 0)), | 382 m.GetFrameStateFunctionInfo(1, 0)), |
| 383 parameters, locals, stack, context_dummy, function_node, | 383 parameters, locals, stack, context_dummy, function_node, |
| 384 m.UndefinedConstant()); | 384 m.UndefinedConstant()); |
| 385 Node* args[] = {receiver, context}; | 385 Node* args[] = {receiver, m.Int32Constant(1), context}; |
| 386 Node* call = | 386 Node* call = |
| 387 m.CallNWithFrameState(descriptor, function_node, args, state_node); | 387 m.CallNWithFrameState(descriptor, function_node, args, state_node); |
| 388 m.Return(call); | 388 m.Return(call); |
| 389 | 389 |
| 390 Stream s = m.Build(kAllExceptNopInstructions); | 390 Stream s = m.Build(kAllExceptNopInstructions); |
| 391 | 391 |
| 392 // Skip until kArchCallJSFunction. | 392 // Skip until kArchCallJSFunction. |
| 393 size_t index = 0; | 393 size_t index = 0; |
| 394 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; | 394 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; |
| 395 index++) { | 395 index++) { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 613 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
| 614 // Continuation. | 614 // Continuation. |
| 615 | 615 |
| 616 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 616 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
| 617 EXPECT_EQ(index, s.size()); | 617 EXPECT_EQ(index, s.size()); |
| 618 } | 618 } |
| 619 | 619 |
| 620 } // namespace compiler | 620 } // namespace compiler |
| 621 } // namespace internal | 621 } // namespace internal |
| 622 } // namespace v8 | 622 } // namespace v8 |
| OLD | NEW |