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

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

Issue 1379793004: [Interpreter] Add support for new local function context creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_decl
Patch Set: Fix interpreter-assembler-unittest Created 5 years, 2 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/compiler/bytecode-graph-builder.cc ('k') | 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Node* BytecodeOperandReg8(int operand_index); 53 Node* BytecodeOperandReg8(int operand_index);
54 54
55 // Returns the index immediate for the short (16 bit) bytecode operand 55 // Returns the index immediate for the short (16 bit) bytecode operand
56 // |operand_index| in the current bytecode. 56 // |operand_index| in the current bytecode.
57 Node* BytecodeOperandIdx16(int operand_index); 57 Node* BytecodeOperandIdx16(int operand_index);
58 58
59 // Accumulator. 59 // Accumulator.
60 Node* GetAccumulator(); 60 Node* GetAccumulator();
61 void SetAccumulator(Node* value); 61 void SetAccumulator(Node* value);
62 62
63 // Context.
64 Node* GetContext();
65 void SetContext(Node* value);
66
63 // Loads from and stores to the interpreter register file. 67 // Loads from and stores to the interpreter register file.
64 Node* LoadRegister(Node* reg_index); 68 Node* LoadRegister(Node* reg_index);
65 Node* StoreRegister(Node* value, Node* reg_index); 69 Node* StoreRegister(Node* value, Node* reg_index);
66 70
67 // Returns the location in memory of the register |reg_index| in the 71 // Returns the location in memory of the register |reg_index| in the
68 // interpreter register file. 72 // interpreter register file.
69 Node* RegisterLocation(Node* reg_index); 73 Node* RegisterLocation(Node* reg_index);
70 74
71 // Constants. 75 // Constants.
72 Node* Int32Constant(int value); 76 Node* Int32Constant(int value);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 140
137 private: 141 private:
138 // Returns a raw pointer to start of the register file on the stack. 142 // Returns a raw pointer to start of the register file on the stack.
139 Node* RegisterFileRawPointer(); 143 Node* RegisterFileRawPointer();
140 // Returns a tagged pointer to the current function's BytecodeArray object. 144 // Returns a tagged pointer to the current function's BytecodeArray object.
141 Node* BytecodeArrayTaggedPointer(); 145 Node* BytecodeArrayTaggedPointer();
142 // Returns the offset from the BytecodeArrayPointer of the current bytecode. 146 // Returns the offset from the BytecodeArrayPointer of the current bytecode.
143 Node* BytecodeOffset(); 147 Node* BytecodeOffset();
144 // Returns a raw pointer to first entry in the interpreter dispatch table. 148 // Returns a raw pointer to first entry in the interpreter dispatch table.
145 Node* DispatchTableRawPointer(); 149 Node* DispatchTableRawPointer();
146 // Returns a tagged pointer to the current context.
147 Node* ContextTaggedPointer();
148 150
149 // Returns the offset of register |index| relative to RegisterFilePointer(). 151 // Returns the offset of register |index| relative to RegisterFilePointer().
150 Node* RegisterFrameOffset(Node* index); 152 Node* RegisterFrameOffset(Node* index);
151 153
152 Node* SmiShiftBitsConstant(); 154 Node* SmiShiftBitsConstant();
153 Node* BytecodeOperand(int operand_index); 155 Node* BytecodeOperand(int operand_index);
154 Node* BytecodeOperandSignExtended(int operand_index); 156 Node* BytecodeOperandSignExtended(int operand_index);
155 Node* BytecodeOperandShort(int operand_index); 157 Node* BytecodeOperandShort(int operand_index);
156 158
157 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); 159 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args);
(...skipping 17 matching lines...) Expand all
175 177
176 // Private helpers which delegate to RawMachineAssembler. 178 // Private helpers which delegate to RawMachineAssembler.
177 Isolate* isolate(); 179 Isolate* isolate();
178 Schedule* schedule(); 180 Schedule* schedule();
179 Zone* zone(); 181 Zone* zone();
180 182
181 interpreter::Bytecode bytecode_; 183 interpreter::Bytecode bytecode_;
182 base::SmartPointer<RawMachineAssembler> raw_assembler_; 184 base::SmartPointer<RawMachineAssembler> raw_assembler_;
183 ZoneVector<Node*> end_nodes_; 185 ZoneVector<Node*> end_nodes_;
184 Node* accumulator_; 186 Node* accumulator_;
187 Node* context_;
185 bool code_generated_; 188 bool code_generated_;
186 189
187 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 190 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
188 }; 191 };
189 192
190 } // namespace compiler 193 } // namespace compiler
191 } // namespace internal 194 } // namespace internal
192 } // namespace v8 195 } // namespace v8
193 196
194 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 197 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698