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

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

Issue 2142273003: [interpreter] Inline Star on dispatch for some bytecodes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: move kInterpreterTraceBytecodeExit to the right place Created 4 years, 5 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_INTERPRETER_INTERPRETER_ASSEMBLER_H_ 5 #ifndef V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_
6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ 6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/smart-pointers.h" 9 #include "src/base/smart-pointers.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 compiler::Node* BytecodeSignedOperand(int operand_index, 211 compiler::Node* BytecodeSignedOperand(int operand_index,
212 OperandSize operand_size); 212 OperandSize operand_size);
213 compiler::Node* BytecodeUnsignedOperand(int operand_index, 213 compiler::Node* BytecodeUnsignedOperand(int operand_index,
214 OperandSize operand_size); 214 OperandSize operand_size);
215 215
216 // Jump relative to the current bytecode by |jump_offset| if the 216 // Jump relative to the current bytecode by |jump_offset| if the
217 // |condition| is true. Helper function for JumpIfWordEqual and 217 // |condition| is true. Helper function for JumpIfWordEqual and
218 // JumpIfWordNotEqual. 218 // JumpIfWordNotEqual.
219 void JumpConditional(compiler::Node* condition, compiler::Node* jump_offset); 219 void JumpConditional(compiler::Node* condition, compiler::Node* jump_offset);
220 220
221 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not 221 // Updates and returns BytecodeOffset() advanced by the current bytecode's
222 // update BytecodeOffset() itself. 222 // size. Traces the exit of the current bytecode.
223 compiler::Node* Advance();
224
225 // Updates and returns BytecodeOffset() advanced by delta bytecodes.
226 // Traces the exit of the current bytecode.
223 compiler::Node* Advance(int delta); 227 compiler::Node* Advance(int delta);
224 compiler::Node* Advance(compiler::Node* delta); 228 compiler::Node* Advance(compiler::Node* delta);
225 229
230 // Load the bytecode at |bytecode_offset|.
231 compiler::Node* LoadBytecode(compiler::Node* bytecode_offset);
232
233 // Look ahead for Star and inline it, will bind the next bytecode to dispatch
234 // to, to |target_bytecode| and its offset to |target_offset|.
235 void StarDispatchLookahead(Variable& target_bytecode);
236
237 // Build code for Star at |target_offset| and bind |target_offset| to the
238 // next offset after Star
239 void InlineStar();
240
226 // Starts next instruction dispatch at |new_bytecode_offset|. 241 // Starts next instruction dispatch at |new_bytecode_offset|.
227 compiler::Node* DispatchTo(compiler::Node* new_bytecode_offset); 242 compiler::Node* DispatchTo(compiler::Node* new_bytecode_offset);
228 243
244 // Dispatch to |target_bytecode| at |new_bytecode_offset|.
245 // |target_bytecode| should be equivalent to loading from the offset.
246 compiler::Node* DispatchToBytecode(compiler::Node* target_bytecode,
247 compiler::Node* new_bytecode_offset);
248
229 // Dispatch to the bytecode handler with code offset |handler|. 249 // Dispatch to the bytecode handler with code offset |handler|.
230 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler, 250 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler,
231 compiler::Node* bytecode_offset); 251 compiler::Node* bytecode_offset);
232 252
233 // Dispatch to the bytecode handler with code entry point |handler_entry|. 253 // Dispatch to the bytecode handler with code entry point |handler_entry|.
234 compiler::Node* DispatchToBytecodeHandlerEntry( 254 compiler::Node* DispatchToBytecodeHandlerEntry(
235 compiler::Node* handler_entry, compiler::Node* bytecode_offset); 255 compiler::Node* handler_entry, compiler::Node* bytecode_offset);
236 256
237 OperandScale operand_scale() const { return operand_scale_; } 257 OperandScale operand_scale() const { return operand_scale_; }
238 258
239 Bytecode bytecode_; 259 Bytecode bytecode_;
260 CodeStubAssembler::Variable bytecode_offset_;
rmcilroy 2016/07/19 20:18:27 nit - move one down with other variables.
klaasb 2016/07/20 09:26:24 Done.
240 OperandScale operand_scale_; 261 OperandScale operand_scale_;
241 CodeStubAssembler::Variable interpreted_frame_pointer_; 262 CodeStubAssembler::Variable interpreted_frame_pointer_;
242 CodeStubAssembler::Variable accumulator_; 263 CodeStubAssembler::Variable accumulator_;
243 AccumulatorUse accumulator_use_; 264 AccumulatorUse accumulator_use_;
244 bool made_call_; 265 bool made_call_;
245 266
246 bool disable_stack_check_across_call_; 267 bool disable_stack_check_across_call_;
247 compiler::Node* stack_pointer_before_call_; 268 compiler::Node* stack_pointer_before_call_;
248 269
249 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 270 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
250 }; 271 };
251 272
252 } // namespace interpreter 273 } // namespace interpreter
253 } // namespace internal 274 } // namespace internal
254 } // namespace v8 275 } // namespace v8
255 276
256 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ 277 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698