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

Side by Side Diff: src/compiler/interpreter-assembler.h

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_
6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Node* arg2, Node* arg3, Node* arg4, Node* arg5); 133 Node* arg2, Node* arg3, Node* arg4, Node* arg5);
134 134
135 // Call runtime function. 135 // Call runtime function.
136 Node* CallRuntime(Node* function_id, Node* first_arg, Node* arg_count, 136 Node* CallRuntime(Node* function_id, Node* first_arg, Node* arg_count,
137 int return_size = 1); 137 int return_size = 1);
138 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1); 138 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1);
139 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2); 139 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2);
140 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2, 140 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2,
141 Node* arg3, Node* arg4); 141 Node* arg3, Node* arg4);
142 142
143 // Optimization for a few supported intrinsics taking only one argument.
144 Node* IntrinsicOneArg(Node* function_id, Node* arg);
145
143 // Jump relative to the current bytecode by |jump_offset|. 146 // Jump relative to the current bytecode by |jump_offset|.
144 void Jump(Node* jump_offset); 147 void Jump(Node* jump_offset);
145 148
146 // Jump relative to the current bytecode by |jump_offset| if the 149 // Jump relative to the current bytecode by |jump_offset| if the
147 // word values |lhs| and |rhs| are equal. 150 // word values |lhs| and |rhs| are equal.
148 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); 151 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset);
149 152
150 // Returns from the function. 153 // Returns from the function.
151 void Return(); 154 void Return();
152 155
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 Node* BytecodeOperandShortSignExtended(int operand_index); 191 Node* BytecodeOperandShortSignExtended(int operand_index);
189 192
190 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); 193 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args);
191 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node** args); 194 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node** args);
192 195
193 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not 196 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not
194 // update BytecodeOffset() itself. 197 // update BytecodeOffset() itself.
195 Node* Advance(int delta); 198 Node* Advance(int delta);
196 Node* Advance(Node* delta); 199 Node* Advance(Node* delta);
197 200
201 // Helper methods to deal with IntrinsicOneArg.
202 Node* ToBoolean(Node* arg);
203 Node* IsJSReceiver(Node* arg);
204 Node* IsJSArray(Node* arg);
205
198 // Starts next instruction dispatch at |new_bytecode_offset|. 206 // Starts next instruction dispatch at |new_bytecode_offset|.
199 void DispatchTo(Node* new_bytecode_offset); 207 void DispatchTo(Node* new_bytecode_offset);
200 208
201 // Abort operations for debug code. 209 // Abort operations for debug code.
202 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason); 210 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason);
203 211
204 // Private helpers which delegate to RawMachineAssembler. 212 // Private helpers which delegate to RawMachineAssembler.
205 Isolate* isolate(); 213 Isolate* isolate();
206 Zone* zone(); 214 Zone* zone();
207 215
208 interpreter::Bytecode bytecode_; 216 interpreter::Bytecode bytecode_;
209 base::SmartPointer<RawMachineAssembler> raw_assembler_; 217 base::SmartPointer<RawMachineAssembler> raw_assembler_;
210 218
211 Node* accumulator_; 219 Node* accumulator_;
212 Node* bytecode_offset_; 220 Node* bytecode_offset_;
213 Node* context_; 221 Node* context_;
214 222
215 bool code_generated_; 223 bool code_generated_;
216 224
217 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 225 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
218 }; 226 };
219 227
220 } // namespace compiler 228 } // namespace compiler
221 } // namespace internal 229 } // namespace internal
222 } // namespace v8 230 } // namespace v8
223 231
224 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 232 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698