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

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: restrict InterpreterAssemblerTest.Jump to jumps 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
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/interpreter-assembler.cc » ('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 #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
226 // Starts next instruction dispatch at |new_bytecode_offset|. 230 // Load the bytecode at |bytecode_offset|.
227 compiler::Node* DispatchTo(compiler::Node* new_bytecode_offset); 231 compiler::Node* LoadBytecode(compiler::Node* bytecode_offset);
232
233 // Look ahead for Star and inline it in a branch. Returns a new target
234 // bytecode node for dispatch.
235 compiler::Node* StarDispatchLookahead(compiler::Node* target_bytecode);
236
237 // Build code for Star at the current BytecodeOffset() and Advance() to the
238 // next dispatch offset.
239 void InlineStar();
240
241 // Dispatch to |target_bytecode| at |new_bytecode_offset|.
242 // |target_bytecode| should be equivalent to loading from the offset.
243 compiler::Node* DispatchToBytecode(compiler::Node* target_bytecode,
244 compiler::Node* new_bytecode_offset);
228 245
229 // Dispatch to the bytecode handler with code offset |handler|. 246 // Dispatch to the bytecode handler with code offset |handler|.
230 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler, 247 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler,
231 compiler::Node* bytecode_offset); 248 compiler::Node* bytecode_offset);
232 249
233 // Dispatch to the bytecode handler with code entry point |handler_entry|. 250 // Dispatch to the bytecode handler with code entry point |handler_entry|.
234 compiler::Node* DispatchToBytecodeHandlerEntry( 251 compiler::Node* DispatchToBytecodeHandlerEntry(
235 compiler::Node* handler_entry, compiler::Node* bytecode_offset); 252 compiler::Node* handler_entry, compiler::Node* bytecode_offset);
236 253
237 OperandScale operand_scale() const { return operand_scale_; } 254 OperandScale operand_scale() const { return operand_scale_; }
238 255
239 Bytecode bytecode_; 256 Bytecode bytecode_;
240 OperandScale operand_scale_; 257 OperandScale operand_scale_;
258 CodeStubAssembler::Variable bytecode_offset_;
241 CodeStubAssembler::Variable interpreted_frame_pointer_; 259 CodeStubAssembler::Variable interpreted_frame_pointer_;
242 CodeStubAssembler::Variable accumulator_; 260 CodeStubAssembler::Variable accumulator_;
243 AccumulatorUse accumulator_use_; 261 AccumulatorUse accumulator_use_;
244 bool made_call_; 262 bool made_call_;
245 263
246 bool disable_stack_check_across_call_; 264 bool disable_stack_check_across_call_;
247 compiler::Node* stack_pointer_before_call_; 265 compiler::Node* stack_pointer_before_call_;
248 266
249 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 267 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
250 }; 268 };
251 269
252 } // namespace interpreter 270 } // namespace interpreter
253 } // namespace internal 271 } // namespace internal
254 } // namespace v8 272 } // namespace v8
255 273
256 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ 274 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698