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

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

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 9 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
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 "src/ast/prettyprinter.h" 7 #include "src/ast/prettyprinter.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
11 #include "src/interpreter/bytecode-generator.h" 11 #include "src/interpreter/bytecode-generator.h"
12 #include "src/interpreter/bytecodes.h" 12 #include "src/interpreter/bytecodes.h"
13 #include "src/interpreter/interpreter-assembler.h" 13 #include "src/interpreter/interpreter-assembler.h"
14 #include "src/interpreter/interpreter-intrinsics.h"
14 #include "src/zone.h" 15 #include "src/zone.h"
15 16
16 namespace v8 { 17 namespace v8 {
17 namespace internal { 18 namespace internal {
18 namespace interpreter { 19 namespace interpreter {
19 20
20 using compiler::Node; 21 using compiler::Node;
21 22
22 #define __ assembler-> 23 #define __ assembler->
23 24
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 // in the accumulator. 1911 // in the accumulator.
1911 void Interpreter::DoForInStep(InterpreterAssembler* assembler) { 1912 void Interpreter::DoForInStep(InterpreterAssembler* assembler) {
1912 Node* index_reg = __ BytecodeOperandReg(0); 1913 Node* index_reg = __ BytecodeOperandReg(0);
1913 Node* index = __ LoadRegister(index_reg); 1914 Node* index = __ LoadRegister(index_reg);
1914 Node* one = __ SmiConstant(Smi::FromInt(1)); 1915 Node* one = __ SmiConstant(Smi::FromInt(1));
1915 Node* result = __ SmiAdd(index, one); 1916 Node* result = __ SmiAdd(index, one);
1916 __ SetAccumulator(result); 1917 __ SetAccumulator(result);
1917 __ Dispatch(); 1918 __ Dispatch();
1918 } 1919 }
1919 1920
1921 void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) {
rmcilroy 2016/03/05 04:21:46 nit - could you move these below CallRuntime
epertoso 2016/03/07 11:26:35 Done. I've also added a comment.
1922 Node* function_id = __ BytecodeOperandIdx(0);
1923 Node* first_arg_reg = __ BytecodeOperandReg(1);
1924 Node* arg_count = __ BytecodeOperandCount(2);
1925 Node* context = __ GetContext();
1926 IntrinsicsHelper helper(assembler);
1927 Node* result =
1928 helper.DispatchIntrinsic(function_id, context, first_arg_reg, arg_count);
1929 __ SetAccumulator(result);
1930 __ Dispatch();
1931 }
1932
1933 void Interpreter::DoInvokeIntrinsicWide(InterpreterAssembler* assembler) {
1934 DoInvokeIntrinsic(assembler);
1935 }
1936
1920 } // namespace interpreter 1937 } // namespace interpreter
1921 } // namespace internal 1938 } // namespace internal
1922 } // namespace v8 1939 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698