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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 BytecodeRegisterAllocator* register_allocator() const { | 189 BytecodeRegisterAllocator* register_allocator() const { |
190 return builder()->register_allocator(); | 190 return builder()->register_allocator(); |
191 } | 191 } |
192 | 192 |
193 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } | 193 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } |
194 inline LanguageMode language_mode() const; | 194 inline LanguageMode language_mode() const; |
195 int feedback_index(FeedbackVectorSlot slot) const; | 195 int feedback_index(FeedbackVectorSlot slot) const; |
196 | 196 |
197 Handle<Name> home_object_symbol() const { return home_object_symbol_; } | 197 Handle<Name> home_object_symbol() const { return home_object_symbol_; } |
198 Handle<Name> iterator_symbol() const { return iterator_symbol_; } | 198 Handle<Name> iterator_symbol() const { return iterator_symbol_; } |
| 199 Handle<Name> async_iterator_symbol() const { return async_iterator_symbol_; } |
199 Handle<Name> prototype_string() const { return prototype_string_; } | 200 Handle<Name> prototype_string() const { return prototype_string_; } |
200 Handle<FixedArray> empty_fixed_array() const { return empty_fixed_array_; } | 201 Handle<FixedArray> empty_fixed_array() const { return empty_fixed_array_; } |
201 const AstRawString* undefined_string() const { return undefined_string_; } | 202 const AstRawString* undefined_string() const { return undefined_string_; } |
202 | 203 |
203 Zone* zone_; | 204 Zone* zone_; |
204 BytecodeArrayBuilder* builder_; | 205 BytecodeArrayBuilder* builder_; |
205 CompilationInfo* info_; | 206 CompilationInfo* info_; |
206 DeclarationScope* scope_; | 207 DeclarationScope* scope_; |
207 | 208 |
208 GlobalDeclarationsBuilder* globals_builder_; | 209 GlobalDeclarationsBuilder* globals_builder_; |
209 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; | 210 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; |
210 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; | 211 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; |
211 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> | 212 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
212 native_function_literals_; | 213 native_function_literals_; |
213 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; | 214 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; |
214 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; | 215 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; |
215 | 216 |
216 ControlScope* execution_control_; | 217 ControlScope* execution_control_; |
217 ContextScope* execution_context_; | 218 ContextScope* execution_context_; |
218 ExpressionResultScope* execution_result_; | 219 ExpressionResultScope* execution_result_; |
219 | 220 |
220 ZoneVector<BytecodeLabel> generator_resume_points_; | 221 ZoneVector<BytecodeLabel> generator_resume_points_; |
221 Register generator_state_; | 222 Register generator_state_; |
222 int loop_depth_; | 223 int loop_depth_; |
223 | 224 |
224 Handle<Name> home_object_symbol_; | 225 Handle<Name> home_object_symbol_; |
225 Handle<Name> iterator_symbol_; | 226 Handle<Name> iterator_symbol_; |
| 227 Handle<Name> async_iterator_symbol_; |
226 Handle<Name> prototype_string_; | 228 Handle<Name> prototype_string_; |
227 Handle<FixedArray> empty_fixed_array_; | 229 Handle<FixedArray> empty_fixed_array_; |
228 const AstRawString* undefined_string_; | 230 const AstRawString* undefined_string_; |
229 }; | 231 }; |
230 | 232 |
231 } // namespace interpreter | 233 } // namespace interpreter |
232 } // namespace internal | 234 } // namespace internal |
233 } // namespace v8 | 235 } // namespace v8 |
234 | 236 |
235 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 237 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |