| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 void VisitGeneratorPrologue(); | 134 void VisitGeneratorPrologue(); |
| 135 | 135 |
| 136 void VisitArgumentsObject(Variable* variable); | 136 void VisitArgumentsObject(Variable* variable); |
| 137 void VisitRestArgumentsArray(Variable* rest); | 137 void VisitRestArgumentsArray(Variable* rest); |
| 138 void VisitCallSuper(Call* call); | 138 void VisitCallSuper(Call* call); |
| 139 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); | 139 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); |
| 140 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, | 140 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, |
| 141 Register prototype); | 141 Register prototype); |
| 142 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); | 142 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); |
| 143 void VisitClassLiteralNameProperty(ClassLiteral* expr, Register literal); |
| 143 void VisitThisFunctionVariable(Variable* variable); | 144 void VisitThisFunctionVariable(Variable* variable); |
| 144 void VisitNewTargetVariable(Variable* variable); | 145 void VisitNewTargetVariable(Variable* variable); |
| 145 void VisitBlockDeclarationsAndStatements(Block* stmt); | 146 void VisitBlockDeclarationsAndStatements(Block* stmt); |
| 146 void VisitFunctionClosureForContext(); | 147 void VisitFunctionClosureForContext(); |
| 147 void VisitSetHomeObject(Register value, Register home_object, | 148 void VisitSetHomeObject(Register value, Register home_object, |
| 148 LiteralProperty* property, int slot_number = 0); | 149 LiteralProperty* property, int slot_number = 0); |
| 149 void VisitObjectLiteralAccessor(Register home_object, | 150 void VisitObjectLiteralAccessor(Register home_object, |
| 150 ObjectLiteralProperty* property, | 151 ObjectLiteralProperty* property, |
| 151 Register value_out); | 152 Register value_out); |
| 152 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); | 153 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 RegisterAllocationScope* register_allocator() const { | 202 RegisterAllocationScope* register_allocator() const { |
| 202 return register_allocator_; | 203 return register_allocator_; |
| 203 } | 204 } |
| 204 | 205 |
| 205 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } | 206 GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; } |
| 206 inline LanguageMode language_mode() const; | 207 inline LanguageMode language_mode() const; |
| 207 int feedback_index(FeedbackVectorSlot slot) const; | 208 int feedback_index(FeedbackVectorSlot slot) const; |
| 208 | 209 |
| 209 Handle<Name> home_object_symbol() const { return home_object_symbol_; } | 210 Handle<Name> home_object_symbol() const { return home_object_symbol_; } |
| 210 Handle<Name> prototype_string() const { return prototype_string_; } | 211 Handle<Name> prototype_string() const { return prototype_string_; } |
| 212 Handle<Name> name_string() const { return name_string_; } |
| 213 Handle<Name> empty_string() const { return empty_string_; } |
| 211 | 214 |
| 212 Zone* zone_; | 215 Zone* zone_; |
| 213 BytecodeArrayBuilder* builder_; | 216 BytecodeArrayBuilder* builder_; |
| 214 CompilationInfo* info_; | 217 CompilationInfo* info_; |
| 215 DeclarationScope* scope_; | 218 DeclarationScope* scope_; |
| 216 | 219 |
| 217 GlobalDeclarationsBuilder* globals_builder_; | 220 GlobalDeclarationsBuilder* globals_builder_; |
| 218 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; | 221 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; |
| 219 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; | 222 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; |
| 220 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> | 223 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
| 221 native_function_literals_; | 224 native_function_literals_; |
| 222 | 225 |
| 223 ControlScope* execution_control_; | 226 ControlScope* execution_control_; |
| 224 ContextScope* execution_context_; | 227 ContextScope* execution_context_; |
| 225 ExpressionResultScope* execution_result_; | 228 ExpressionResultScope* execution_result_; |
| 226 RegisterAllocationScope* register_allocator_; | 229 RegisterAllocationScope* register_allocator_; |
| 227 | 230 |
| 228 ZoneVector<BytecodeLabel> generator_resume_points_; | 231 ZoneVector<BytecodeLabel> generator_resume_points_; |
| 229 Register generator_state_; | 232 Register generator_state_; |
| 230 int loop_depth_; | 233 int loop_depth_; |
| 231 | 234 |
| 232 Handle<Name> home_object_symbol_; | 235 Handle<Name> home_object_symbol_; |
| 233 Handle<Name> prototype_string_; | 236 Handle<Name> prototype_string_; |
| 237 Handle<Name> name_string_; |
| 238 Handle<Name> empty_string_; |
| 234 }; | 239 }; |
| 235 | 240 |
| 236 } // namespace interpreter | 241 } // namespace interpreter |
| 237 } // namespace internal | 242 } // namespace internal |
| 238 } // namespace v8 | 243 } // namespace v8 |
| 239 | 244 |
| 240 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 245 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |