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

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

Issue 2600183004: [turbofan] Remove virtual methods from CodeAssembler. (Closed)
Patch Set: Created 3 years, 11 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/builtins/builtins.h" 9 #include "src/builtins/builtins.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
11 #include "src/frames.h" 11 #include "src/frames.h"
12 #include "src/globals.h" 12 #include "src/globals.h"
13 #include "src/interpreter/bytecode-register.h" 13 #include "src/interpreter/bytecode-register.h"
14 #include "src/interpreter/bytecodes.h" 14 #include "src/interpreter/bytecodes.h"
15 #include "src/runtime/runtime.h" 15 #include "src/runtime/runtime.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 namespace interpreter { 19 namespace interpreter {
20 20
21 class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler { 21 class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
22 public: 22 public:
23 InterpreterAssembler(compiler::CodeAssemblerState* state, Bytecode bytecode, 23 InterpreterAssembler(compiler::CodeAssemblerState* state, Bytecode bytecode,
24 OperandScale operand_scale); 24 OperandScale operand_scale);
25 virtual ~InterpreterAssembler(); 25 ~InterpreterAssembler();
26 26
27 // Returns the 32-bit unsigned count immediate for bytecode operand 27 // Returns the 32-bit unsigned count immediate for bytecode operand
28 // |operand_index| in the current bytecode. 28 // |operand_index| in the current bytecode.
29 compiler::Node* BytecodeOperandCount(int operand_index); 29 compiler::Node* BytecodeOperandCount(int operand_index);
30 // Returns the 32-bit unsigned flag for bytecode operand |operand_index| 30 // Returns the 32-bit unsigned flag for bytecode operand |operand_index|
31 // in the current bytecode. 31 // in the current bytecode.
32 compiler::Node* BytecodeOperandFlag(int operand_index); 32 compiler::Node* BytecodeOperandFlag(int operand_index);
33 // Returns the 32-bit zero-extended index immediate for bytecode operand 33 // Returns the 32-bit zero-extended index immediate for bytecode operand
34 // |operand_index| in the current bytecode. 34 // |operand_index| in the current bytecode.
35 compiler::Node* BytecodeOperandIdx(int operand_index); 35 compiler::Node* BytecodeOperandIdx(int operand_index);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // uses it. This is intended to be used only in dispatch and in 211 // uses it. This is intended to be used only in dispatch and in
212 // tracing as these need to bypass accumulator use validity checks. 212 // tracing as these need to bypass accumulator use validity checks.
213 compiler::Node* GetAccumulatorUnchecked(); 213 compiler::Node* GetAccumulatorUnchecked();
214 214
215 // Returns the frame pointer for the interpreted frame of the function being 215 // Returns the frame pointer for the interpreted frame of the function being
216 // interpreted. 216 // interpreted.
217 compiler::Node* GetInterpretedFramePointer(); 217 compiler::Node* GetInterpretedFramePointer();
218 218
219 // Saves and restores interpreter bytecode offset to the interpreter stack 219 // Saves and restores interpreter bytecode offset to the interpreter stack
220 // frame when performing a call. 220 // frame when performing a call.
221 void CallPrologue() override; 221 void CallPrologue();
222 void CallEpilogue() override; 222 void CallEpilogue();
223 223
224 // Increment the dispatch counter for the (current, next) bytecode pair. 224 // Increment the dispatch counter for the (current, next) bytecode pair.
225 void TraceBytecodeDispatch(compiler::Node* target_index); 225 void TraceBytecodeDispatch(compiler::Node* target_index);
226 226
227 // Traces the current bytecode by calling |function_id|. 227 // Traces the current bytecode by calling |function_id|.
228 void TraceBytecode(Runtime::FunctionId function_id); 228 void TraceBytecode(Runtime::FunctionId function_id);
229 229
230 // Updates the bytecode array's interrupt budget by a 32-bit signed |weight| 230 // Updates the bytecode array's interrupt budget by a 32-bit signed |weight|
231 // and calls Runtime::kInterrupt if counter reaches zero. 231 // and calls Runtime::kInterrupt if counter reaches zero.
232 void UpdateInterruptBudget(compiler::Node* weight); 232 void UpdateInterruptBudget(compiler::Node* weight);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 compiler::Node* stack_pointer_before_call_; 312 compiler::Node* stack_pointer_before_call_;
313 313
314 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 314 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
315 }; 315 };
316 316
317 } // namespace interpreter 317 } // namespace interpreter
318 } // namespace internal 318 } // namespace internal
319 } // namespace v8 319 } // namespace v8
320 320
321 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ 321 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698