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.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 | 8 |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 void Interpreter::DoCallRuntime(InterpreterAssembler* assembler) { | 1038 void Interpreter::DoCallRuntime(InterpreterAssembler* assembler) { |
1039 DoCallRuntimeCommon(assembler); | 1039 DoCallRuntimeCommon(assembler); |
1040 } | 1040 } |
1041 | 1041 |
1042 // InvokeIntrinsic <function_id> <first_arg> <arg_count> | 1042 // InvokeIntrinsic <function_id> <first_arg> <arg_count> |
1043 // | 1043 // |
1044 // Implements the semantic equivalent of calling the runtime function | 1044 // Implements the semantic equivalent of calling the runtime function |
1045 // |function_id| with the first argument in |first_arg| and |arg_count| | 1045 // |function_id| with the first argument in |first_arg| and |arg_count| |
1046 // arguments in subsequent registers. | 1046 // arguments in subsequent registers. |
1047 void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) { | 1047 void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) { |
1048 Node* function_id = __ BytecodeOperandRuntimeId(0); | 1048 Node* function_id = __ BytecodeOperandIntrinsicId(0); |
1049 Node* first_arg_reg = __ BytecodeOperandReg(1); | 1049 Node* first_arg_reg = __ BytecodeOperandReg(1); |
1050 Node* arg_count = __ BytecodeOperandCount(2); | 1050 Node* arg_count = __ BytecodeOperandCount(2); |
1051 Node* context = __ GetContext(); | 1051 Node* context = __ GetContext(); |
1052 IntrinsicsHelper helper(assembler); | 1052 IntrinsicsHelper helper(assembler); |
1053 Node* result = | 1053 Node* result = |
1054 helper.InvokeIntrinsic(function_id, context, first_arg_reg, arg_count); | 1054 helper.InvokeIntrinsic(function_id, context, first_arg_reg, arg_count); |
1055 __ SetAccumulator(result); | 1055 __ SetAccumulator(result); |
1056 __ Dispatch(); | 1056 __ Dispatch(); |
1057 } | 1057 } |
1058 | 1058 |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 1849 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
1850 __ SmiTag(new_state)); | 1850 __ SmiTag(new_state)); |
1851 __ SetAccumulator(old_state); | 1851 __ SetAccumulator(old_state); |
1852 | 1852 |
1853 __ Dispatch(); | 1853 __ Dispatch(); |
1854 } | 1854 } |
1855 | 1855 |
1856 } // namespace interpreter | 1856 } // namespace interpreter |
1857 } // namespace internal | 1857 } // namespace internal |
1858 } // namespace v8 | 1858 } // namespace v8 |
OLD | NEW |