OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 | 741 |
742 Bind(&end); | 742 Bind(&end); |
743 return return_value.value(); | 743 return return_value.value(); |
744 } | 744 } |
745 | 745 |
746 Node* InterpreterAssembler::CallJS(Node* function, Node* context, | 746 Node* InterpreterAssembler::CallJS(Node* function, Node* context, |
747 Node* first_arg, Node* arg_count, | 747 Node* first_arg, Node* arg_count, |
748 ConvertReceiverMode receiver_mode, | 748 ConvertReceiverMode receiver_mode, |
749 TailCallMode tail_call_mode) { | 749 TailCallMode tail_call_mode) { |
750 DCHECK(Bytecodes::MakesCallAlongCriticalPath(bytecode_)); | 750 DCHECK(Bytecodes::MakesCallAlongCriticalPath(bytecode_)); |
751 DCHECK(Bytecodes::IsCallOrConstruct(bytecode_)); | 751 DCHECK(Bytecodes::IsCallOrConstruct(bytecode_) || |
| 752 bytecode_ == Bytecode::kInvokeIntrinsic); |
752 DCHECK_EQ(Bytecodes::GetReceiverMode(bytecode_), receiver_mode); | 753 DCHECK_EQ(Bytecodes::GetReceiverMode(bytecode_), receiver_mode); |
753 Callable callable = CodeFactory::InterpreterPushArgsThenCall( | 754 Callable callable = CodeFactory::InterpreterPushArgsThenCall( |
754 isolate(), receiver_mode, tail_call_mode, | 755 isolate(), receiver_mode, tail_call_mode, |
755 InterpreterPushArgsMode::kOther); | 756 InterpreterPushArgsMode::kOther); |
756 Node* code_target = HeapConstant(callable.code()); | 757 Node* code_target = HeapConstant(callable.code()); |
757 | 758 |
758 return CallStub(callable.descriptor(), code_target, context, arg_count, | 759 return CallStub(callable.descriptor(), code_target, context, arg_count, |
759 first_arg, function); | 760 first_arg, function); |
760 } | 761 } |
761 | 762 |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 return array; | 1466 return array; |
1466 } | 1467 } |
1467 | 1468 |
1468 int InterpreterAssembler::CurrentBytecodeSize() const { | 1469 int InterpreterAssembler::CurrentBytecodeSize() const { |
1469 return Bytecodes::Size(bytecode_, operand_scale_); | 1470 return Bytecodes::Size(bytecode_, operand_scale_); |
1470 } | 1471 } |
1471 | 1472 |
1472 } // namespace interpreter | 1473 } // namespace interpreter |
1473 } // namespace internal | 1474 } // namespace internal |
1474 } // namespace v8 | 1475 } // namespace v8 |
OLD | NEW |