OLD | NEW |
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_BYTECODE_GENERATOR_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/interpreter/bytecode-array-builder.h" | 9 #include "src/interpreter/bytecode-array-builder.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 void RecordStoreToRegister(Register reg); | 168 void RecordStoreToRegister(Register reg); |
169 Register LoadFromAliasedRegister(Register reg); | 169 Register LoadFromAliasedRegister(Register reg); |
170 | 170 |
171 // Initialize an array of temporary registers with consecutive registers. | 171 // Initialize an array of temporary registers with consecutive registers. |
172 template <size_t N> | 172 template <size_t N> |
173 void InitializeWithConsecutiveRegisters(Register (®isters)[N]); | 173 void InitializeWithConsecutiveRegisters(Register (®isters)[N]); |
174 | 174 |
175 inline BytecodeArrayBuilder* builder() const { return builder_; } | 175 inline BytecodeArrayBuilder* builder() const { return builder_; } |
176 inline Isolate* isolate() const { return isolate_; } | 176 inline Isolate* isolate() const { return isolate_; } |
177 inline Zone* zone() const { return zone_; } | 177 inline Zone* zone() const { return zone_; } |
178 inline Scope* scope() const { return scope_; } | 178 inline DeclarationScope* scope() const { return scope_; } |
179 inline CompilationInfo* info() const { return info_; } | 179 inline CompilationInfo* info() const { return info_; } |
180 | 180 |
181 inline ControlScope* execution_control() const { return execution_control_; } | 181 inline ControlScope* execution_control() const { return execution_control_; } |
182 inline void set_execution_control(ControlScope* scope) { | 182 inline void set_execution_control(ControlScope* scope) { |
183 execution_control_ = scope; | 183 execution_control_ = scope; |
184 } | 184 } |
185 inline ContextScope* execution_context() const { return execution_context_; } | 185 inline ContextScope* execution_context() const { return execution_context_; } |
186 inline void set_execution_context(ContextScope* context) { | 186 inline void set_execution_context(ContextScope* context) { |
187 execution_context_ = context; | 187 execution_context_ = context; |
188 } | 188 } |
(...skipping 10 matching lines...) Expand all Loading... |
199 } | 199 } |
200 | 200 |
201 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } | 201 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } |
202 inline LanguageMode language_mode() const; | 202 inline LanguageMode language_mode() const; |
203 int feedback_index(FeedbackVectorSlot slot) const; | 203 int feedback_index(FeedbackVectorSlot slot) const; |
204 | 204 |
205 Isolate* isolate_; | 205 Isolate* isolate_; |
206 Zone* zone_; | 206 Zone* zone_; |
207 BytecodeArrayBuilder* builder_; | 207 BytecodeArrayBuilder* builder_; |
208 CompilationInfo* info_; | 208 CompilationInfo* info_; |
209 Scope* scope_; | 209 DeclarationScope* scope_; |
210 GlobalDeclarationsBuilder* globals_builder_; | 210 GlobalDeclarationsBuilder* globals_builder_; |
211 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; | 211 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; |
212 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; | 212 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; |
213 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> | 213 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
214 native_function_literals_; | 214 native_function_literals_; |
215 ControlScope* execution_control_; | 215 ControlScope* execution_control_; |
216 ContextScope* execution_context_; | 216 ContextScope* execution_context_; |
217 ExpressionResultScope* execution_result_; | 217 ExpressionResultScope* execution_result_; |
218 RegisterAllocationScope* register_allocator_; | 218 RegisterAllocationScope* register_allocator_; |
219 ZoneVector<BytecodeLabel> generator_resume_points_; | 219 ZoneVector<BytecodeLabel> generator_resume_points_; |
220 Register generator_state_; | 220 Register generator_state_; |
221 int loop_depth_; | 221 int loop_depth_; |
222 }; | 222 }; |
223 | 223 |
224 } // namespace interpreter | 224 } // namespace interpreter |
225 } // namespace internal | 225 } // namespace internal |
226 } // namespace v8 | 226 } // namespace v8 |
227 | 227 |
228 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 228 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |