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/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 void BuildKeyedSuperPropertyLoad(Register receiver, Register home_object, | 102 void BuildKeyedSuperPropertyLoad(Register receiver, Register home_object, |
103 Register key); | 103 Register key); |
104 | 104 |
105 void BuildThrowIfHole(Handle<String> name); | 105 void BuildThrowIfHole(Handle<String> name); |
106 void BuildThrowIfNotHole(Handle<String> name); | 106 void BuildThrowIfNotHole(Handle<String> name); |
107 void BuildThrowReassignConstant(Handle<String> name); | 107 void BuildThrowReassignConstant(Handle<String> name); |
108 void BuildThrowReferenceError(Handle<String> name); | 108 void BuildThrowReferenceError(Handle<String> name); |
109 void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name); | 109 void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name); |
110 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); | 110 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); |
111 | 111 |
112 void BuildGeneratorPrologue(); | |
rmcilroy
2016/04/15 13:17:46
nit - We've been a bit inconsistent with Visit vs.
neis
2016/04/18 08:04:17
Done.
| |
113 | |
112 void VisitArgumentsObject(Variable* variable); | 114 void VisitArgumentsObject(Variable* variable); |
113 void VisitRestArgumentsArray(Variable* rest); | 115 void VisitRestArgumentsArray(Variable* rest); |
114 void VisitCallSuper(Call* call); | 116 void VisitCallSuper(Call* call); |
115 void VisitClassLiteralContents(ClassLiteral* expr); | 117 void VisitClassLiteralContents(ClassLiteral* expr); |
116 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); | 118 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); |
117 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, | 119 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, |
118 Register prototype); | 120 Register prototype); |
119 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); | 121 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); |
120 void VisitThisFunctionVariable(Variable* variable); | 122 void VisitThisFunctionVariable(Variable* variable); |
121 void VisitNewTargetVariable(Variable* variable); | 123 void VisitNewTargetVariable(Variable* variable); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 Isolate* isolate_; | 199 Isolate* isolate_; |
198 Zone* zone_; | 200 Zone* zone_; |
199 BytecodeArrayBuilder* builder_; | 201 BytecodeArrayBuilder* builder_; |
200 CompilationInfo* info_; | 202 CompilationInfo* info_; |
201 Scope* scope_; | 203 Scope* scope_; |
202 ZoneVector<Handle<Object>> globals_; | 204 ZoneVector<Handle<Object>> globals_; |
203 ControlScope* execution_control_; | 205 ControlScope* execution_control_; |
204 ContextScope* execution_context_; | 206 ContextScope* execution_context_; |
205 ExpressionResultScope* execution_result_; | 207 ExpressionResultScope* execution_result_; |
206 RegisterAllocationScope* register_allocator_; | 208 RegisterAllocationScope* register_allocator_; |
209 ZoneVector<BytecodeLabel> resume_points_; // For generator functions. | |
rmcilroy
2016/04/15 13:17:46
just generator_resume_points_, then you don't need
neis
2016/04/18 08:04:17
Done.
| |
207 int try_catch_nesting_level_; | 210 int try_catch_nesting_level_; |
208 int try_finally_nesting_level_; | 211 int try_finally_nesting_level_; |
212 int yield_count_; // For generator functions: number of yields seen so far. | |
rmcilroy
2016/04/15 13:17:46
ditto?
neis
2016/04/18 08:04:17
Done.
| |
209 }; | 213 }; |
210 | 214 |
211 } // namespace interpreter | 215 } // namespace interpreter |
212 } // namespace internal | 216 } // namespace internal |
213 } // namespace v8 | 217 } // namespace v8 |
214 | 218 |
215 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 219 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |