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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class ControlScopeForTryCatch; | 44 class ControlScopeForTryCatch; |
45 class ControlScopeForTryFinally; | 45 class ControlScopeForTryFinally; |
46 class ExpressionResultScope; | 46 class ExpressionResultScope; |
47 class EffectResultScope; | 47 class EffectResultScope; |
48 class GlobalDeclarationsBuilder; | 48 class GlobalDeclarationsBuilder; |
49 class RegisterResultScope; | 49 class RegisterResultScope; |
50 class RegisterAllocationScope; | 50 class RegisterAllocationScope; |
51 | 51 |
52 void GenerateBytecode(); | 52 void GenerateBytecode(); |
53 void GenerateBytecodeBody(); | 53 void GenerateBytecodeBody(); |
| 54 void FinalizeBytecode(); |
54 | 55 |
55 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 56 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
56 | 57 |
57 // Dispatched from VisitBinaryOperation. | 58 // Dispatched from VisitBinaryOperation. |
58 void VisitArithmeticExpression(BinaryOperation* binop); | 59 void VisitArithmeticExpression(BinaryOperation* binop); |
59 void VisitCommaExpression(BinaryOperation* binop); | 60 void VisitCommaExpression(BinaryOperation* binop); |
60 void VisitLogicalOrExpression(BinaryOperation* binop); | 61 void VisitLogicalOrExpression(BinaryOperation* binop); |
61 void VisitLogicalAndExpression(BinaryOperation* binop); | 62 void VisitLogicalAndExpression(BinaryOperation* binop); |
62 | 63 |
63 // Dispatched from VisitUnaryOperation. | 64 // Dispatched from VisitUnaryOperation. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 inline LanguageMode language_mode() const; | 202 inline LanguageMode language_mode() const; |
202 int feedback_index(FeedbackVectorSlot slot) const; | 203 int feedback_index(FeedbackVectorSlot slot) const; |
203 | 204 |
204 Isolate* isolate_; | 205 Isolate* isolate_; |
205 Zone* zone_; | 206 Zone* zone_; |
206 BytecodeArrayBuilder* builder_; | 207 BytecodeArrayBuilder* builder_; |
207 CompilationInfo* info_; | 208 CompilationInfo* info_; |
208 Scope* scope_; | 209 Scope* scope_; |
209 GlobalDeclarationsBuilder* globals_builder_; | 210 GlobalDeclarationsBuilder* globals_builder_; |
210 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; | 211 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; |
| 212 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; |
| 213 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
| 214 native_function_literals_; |
211 ControlScope* execution_control_; | 215 ControlScope* execution_control_; |
212 ContextScope* execution_context_; | 216 ContextScope* execution_context_; |
213 ExpressionResultScope* execution_result_; | 217 ExpressionResultScope* execution_result_; |
214 RegisterAllocationScope* register_allocator_; | 218 RegisterAllocationScope* register_allocator_; |
215 ZoneVector<BytecodeLabel> generator_resume_points_; | 219 ZoneVector<BytecodeLabel> generator_resume_points_; |
216 Register generator_state_; | 220 Register generator_state_; |
217 }; | 221 }; |
218 | 222 |
219 } // namespace interpreter | 223 } // namespace interpreter |
220 } // namespace internal | 224 } // namespace internal |
221 } // namespace v8 | 225 } // namespace v8 |
222 | 226 |
223 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 227 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |