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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 void BuildIndexedJump(Register value, size_t start_index, size_t size, | 129 void BuildIndexedJump(Register value, size_t start_index, size_t size, |
130 ZoneVector<BytecodeLabel>& targets); | 130 ZoneVector<BytecodeLabel>& targets); |
131 | 131 |
132 void BuildNewLocalActivationContext(); | 132 void BuildNewLocalActivationContext(); |
133 void BuildLocalActivationContextInitialization(); | 133 void BuildLocalActivationContextInitialization(); |
134 void BuildNewLocalBlockContext(Scope* scope); | 134 void BuildNewLocalBlockContext(Scope* scope); |
135 void BuildNewLocalCatchContext(Scope* scope); | 135 void BuildNewLocalCatchContext(Scope* scope); |
136 void BuildNewLocalWithContext(Scope* scope); | 136 void BuildNewLocalWithContext(Scope* scope); |
137 | 137 |
138 void BuildGeneratorPrologue(); | 138 void BuildGeneratorPrologue(); |
139 void BuildGeneratorSuspend(Suspend* expr, Register generator); | 139 void BuildGeneratorSuspend(Suspend* expr, Register generator, |
140 void BuildGeneratorResume(Suspend* expr, Register generator); | 140 RegisterList registers_to_save); |
| 141 void BuildGeneratorResume(Suspend* expr, Register generator, |
| 142 RegisterList registers_to_restore); |
141 | 143 |
142 void VisitArgumentsObject(Variable* variable); | 144 void VisitArgumentsObject(Variable* variable); |
143 void VisitRestArgumentsArray(Variable* rest); | 145 void VisitRestArgumentsArray(Variable* rest); |
144 void VisitCallSuper(Call* call); | 146 void VisitCallSuper(Call* call); |
145 void VisitClassLiteralProperties(ClassLiteral* expr, Register constructor, | 147 void VisitClassLiteralProperties(ClassLiteral* expr, Register constructor, |
146 Register prototype); | 148 Register prototype); |
147 void BuildClassLiteralNameProperty(ClassLiteral* expr, Register constructor); | 149 void BuildClassLiteralNameProperty(ClassLiteral* expr, Register constructor); |
148 void BuildClassLiteral(ClassLiteral* expr); | 150 void BuildClassLiteral(ClassLiteral* expr); |
149 void VisitThisFunctionVariable(Variable* variable); | 151 void VisitThisFunctionVariable(Variable* variable); |
150 void VisitNewTargetVariable(Variable* variable); | 152 void VisitNewTargetVariable(Variable* variable); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> | 251 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
250 native_function_literals_; | 252 native_function_literals_; |
251 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; | 253 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; |
252 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; | 254 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; |
253 | 255 |
254 ControlScope* execution_control_; | 256 ControlScope* execution_control_; |
255 ContextScope* execution_context_; | 257 ContextScope* execution_context_; |
256 ExpressionResultScope* execution_result_; | 258 ExpressionResultScope* execution_result_; |
257 | 259 |
258 BytecodeJumpTable* generator_jump_table_; | 260 BytecodeJumpTable* generator_jump_table_; |
| 261 Register generator_object_; |
259 Register generator_state_; | 262 Register generator_state_; |
260 int loop_depth_; | 263 int loop_depth_; |
261 }; | 264 }; |
262 | 265 |
263 } // namespace interpreter | 266 } // namespace interpreter |
264 } // namespace internal | 267 } // namespace internal |
265 } // namespace v8 | 268 } // namespace v8 |
266 | 269 |
267 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 270 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |