Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2084623002: Reland: [Interpreter] Map runtime id's to intrinsic id's in InvokeIntrinsic bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reland Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698