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

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

Issue 1640213002: [Interpreter] Add option to trace bytecode execution. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments 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
« no previous file with comments | « no previous file | src/compiler/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_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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Node* arg2, Node* arg3, Node* arg4); 131 Node* arg2, Node* arg3, Node* arg4);
132 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, 132 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1,
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);
142 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2,
141 Node* arg3, Node* arg4); 143 Node* arg3, Node* arg4);
142 144
143 // Jump relative to the current bytecode by |jump_offset|. 145 // Jump relative to the current bytecode by |jump_offset|.
144 void Jump(Node* jump_offset); 146 void Jump(Node* jump_offset);
145 147
146 // Jump relative to the current bytecode by |jump_offset| if the 148 // Jump relative to the current bytecode by |jump_offset| if the
147 // word values |lhs| and |rhs| are equal. 149 // word values |lhs| and |rhs| are equal.
148 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); 150 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset);
149 151
150 // Returns from the function. 152 // Returns from the function.
(...skipping 18 matching lines...) Expand all
169 // Returns a tagged pointer to the current function's BytecodeArray object. 171 // Returns a tagged pointer to the current function's BytecodeArray object.
170 Node* BytecodeArrayTaggedPointer(); 172 Node* BytecodeArrayTaggedPointer();
171 // Returns the offset from the BytecodeArrayPointer of the current bytecode. 173 // Returns the offset from the BytecodeArrayPointer of the current bytecode.
172 Node* BytecodeOffset(); 174 Node* BytecodeOffset();
173 // Returns a raw pointer to first entry in the interpreter dispatch table. 175 // Returns a raw pointer to first entry in the interpreter dispatch table.
174 Node* DispatchTableRawPointer(); 176 Node* DispatchTableRawPointer();
175 177
176 // Saves and restores interpreter bytecode offset to the interpreter stack 178 // Saves and restores interpreter bytecode offset to the interpreter stack
177 // frame when performing a call. 179 // frame when performing a call.
178 void CallPrologue(); 180 void CallPrologue();
179 void CallEpilogue(); 181
182 // Traces the current bytecode by calling |function_id|.
183 void TraceBytecode(Runtime::FunctionId function_id);
180 184
181 // Returns the offset of register |index| relative to RegisterFilePointer(). 185 // Returns the offset of register |index| relative to RegisterFilePointer().
182 Node* RegisterFrameOffset(Node* index); 186 Node* RegisterFrameOffset(Node* index);
183 187
184 Node* SmiShiftBitsConstant(); 188 Node* SmiShiftBitsConstant();
185 Node* BytecodeOperand(int operand_index); 189 Node* BytecodeOperand(int operand_index);
186 Node* BytecodeOperandSignExtended(int operand_index); 190 Node* BytecodeOperandSignExtended(int operand_index);
187 Node* BytecodeOperandShort(int operand_index); 191 Node* BytecodeOperandShort(int operand_index);
188 Node* BytecodeOperandShortSignExtended(int operand_index); 192 Node* BytecodeOperandShortSignExtended(int operand_index);
189 193
(...skipping 12 matching lines...) Expand all
202 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason); 206 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason);
203 207
204 // Private helpers which delegate to RawMachineAssembler. 208 // Private helpers which delegate to RawMachineAssembler.
205 Isolate* isolate(); 209 Isolate* isolate();
206 Zone* zone(); 210 Zone* zone();
207 211
208 interpreter::Bytecode bytecode_; 212 interpreter::Bytecode bytecode_;
209 base::SmartPointer<RawMachineAssembler> raw_assembler_; 213 base::SmartPointer<RawMachineAssembler> raw_assembler_;
210 214
211 Node* accumulator_; 215 Node* accumulator_;
212 Node* bytecode_offset_;
213 Node* context_; 216 Node* context_;
214 217
215 bool code_generated_; 218 bool code_generated_;
216 219
217 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 220 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
218 }; 221 };
219 222
220 } // namespace compiler 223 } // namespace compiler
221 } // namespace internal 224 } // namespace internal
222 } // namespace v8 225 } // namespace v8
223 226
224 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 227 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698