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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/schedule.h" | 9 #include "src/compiler/schedule.h" |
10 #include "src/flags.h" | 10 #include "src/flags.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 Node* locals = m.AddNode(m.common()->TypedStateValues(&empty_types)); | 378 Node* locals = m.AddNode(m.common()->TypedStateValues(&empty_types)); |
379 Node* stack = m.AddNode(m.common()->TypedStateValues(&empty_types)); | 379 Node* stack = m.AddNode(m.common()->TypedStateValues(&empty_types)); |
380 Node* context_sentinel = m.Int32Constant(0); | 380 Node* context_sentinel = m.Int32Constant(0); |
381 Node* state_node = m.AddNode( | 381 Node* state_node = m.AddNode( |
382 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), | 382 m.common()->FrameState(bailout_id, OutputFrameStateCombine::Push(), |
383 m.GetFrameStateFunctionInfo(1, 0)), | 383 m.GetFrameStateFunctionInfo(1, 0)), |
384 parameters, locals, stack, context_sentinel, function_node, | 384 parameters, locals, stack, context_sentinel, function_node, |
385 m.UndefinedConstant()); | 385 m.UndefinedConstant()); |
386 | 386 |
387 // Build the call. | 387 // Build the call. |
388 Node* args[] = {receiver, m.Int32Constant(1), context}; | 388 Node* args[] = {receiver, m.UndefinedConstant(), m.Int32Constant(1), context}; |
389 Node* call = | 389 Node* call = |
390 m.CallNWithFrameState(descriptor, function_node, args, state_node); | 390 m.CallNWithFrameState(descriptor, function_node, args, state_node); |
391 m.Return(call); | 391 m.Return(call); |
392 | 392 |
393 Stream s = m.Build(kAllExceptNopInstructions); | 393 Stream s = m.Build(kAllExceptNopInstructions); |
394 | 394 |
395 // Skip until kArchCallJSFunction. | 395 // Skip until kArchCallJSFunction. |
396 size_t index = 0; | 396 size_t index = 0; |
397 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; | 397 for (; index < s.size() && s[index]->arch_opcode() != kArchCallJSFunction; |
398 index++) { | 398 index++) { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 624 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
625 // Continuation. | 625 // Continuation. |
626 | 626 |
627 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 627 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
628 EXPECT_EQ(index, s.size()); | 628 EXPECT_EQ(index, s.size()); |
629 } | 629 } |
630 | 630 |
631 } // namespace compiler | 631 } // namespace compiler |
632 } // namespace internal | 632 } // namespace internal |
633 } // namespace v8 | 633 } // namespace v8 |
OLD | NEW |