| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void BuildThrowIfNotHole(Handle<String> name); | 118 void BuildThrowIfNotHole(Handle<String> name); |
| 119 void BuildThrowReferenceError(Handle<String> name); | 119 void BuildThrowReferenceError(Handle<String> name); |
| 120 void BuildHoleCheckForVariableLoad(Variable* variable); | 120 void BuildHoleCheckForVariableLoad(Variable* variable); |
| 121 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); | 121 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); |
| 122 | 122 |
| 123 // Build jump to targets[value], where | 123 // Build jump to targets[value], where |
| 124 // start_index <= value < start_index + size. | 124 // start_index <= value < start_index + size. |
| 125 void BuildIndexedJump(Register value, size_t start_index, size_t size, | 125 void BuildIndexedJump(Register value, size_t start_index, size_t size, |
| 126 ZoneVector<BytecodeLabel>& targets); | 126 ZoneVector<BytecodeLabel>& targets); |
| 127 | 127 |
| 128 void BuildNewLocalActivationContext(); |
| 129 void BuildLocalActivationContextInitialization(); |
| 130 void BuildNewLocalBlockContext(Scope* scope); |
| 131 void BuildNewLocalCatchContext(Variable* variable, Scope* scope); |
| 132 void BuildNewLocalWithContext(Scope* scope); |
| 133 |
| 128 void VisitGeneratorPrologue(); | 134 void VisitGeneratorPrologue(); |
| 129 | 135 |
| 130 void VisitArgumentsObject(Variable* variable); | 136 void VisitArgumentsObject(Variable* variable); |
| 131 void VisitRestArgumentsArray(Variable* rest); | 137 void VisitRestArgumentsArray(Variable* rest); |
| 132 void VisitCallSuper(Call* call); | 138 void VisitCallSuper(Call* call); |
| 133 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); | 139 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); |
| 134 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, | 140 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, |
| 135 Register prototype); | 141 Register prototype); |
| 136 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); | 142 void VisitClassLiteralStaticPrototypeWithComputedName(Register name); |
| 137 void VisitThisFunctionVariable(Variable* variable); | 143 void VisitThisFunctionVariable(Variable* variable); |
| 138 void VisitNewTargetVariable(Variable* variable); | 144 void VisitNewTargetVariable(Variable* variable); |
| 139 void VisitNewLocalFunctionContext(); | |
| 140 void VisitBuildLocalActivationContext(); | |
| 141 void VisitBlockDeclarationsAndStatements(Block* stmt); | 145 void VisitBlockDeclarationsAndStatements(Block* stmt); |
| 142 void VisitNewLocalBlockContext(Scope* scope); | |
| 143 void VisitNewLocalCatchContext(Variable* variable, Scope* scope); | |
| 144 void VisitNewLocalWithContext(Scope* scope); | |
| 145 void VisitFunctionClosureForContext(); | 146 void VisitFunctionClosureForContext(); |
| 146 void VisitSetHomeObject(Register value, Register home_object, | 147 void VisitSetHomeObject(Register value, Register home_object, |
| 147 LiteralProperty* property, int slot_number = 0); | 148 LiteralProperty* property, int slot_number = 0); |
| 148 void VisitObjectLiteralAccessor(Register home_object, | 149 void VisitObjectLiteralAccessor(Register home_object, |
| 149 ObjectLiteralProperty* property, | 150 ObjectLiteralProperty* property, |
| 150 Register value_out); | 151 Register value_out); |
| 151 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); | 152 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); |
| 152 | 153 |
| 153 // Visit the header/body of a loop iteration. | 154 // Visit the header/body of a loop iteration. |
| 154 void VisitIterationHeader(IterationStatement* stmt, | 155 void VisitIterationHeader(IterationStatement* stmt, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 231 |
| 231 Handle<Name> home_object_symbol_; | 232 Handle<Name> home_object_symbol_; |
| 232 Handle<Name> prototype_string_; | 233 Handle<Name> prototype_string_; |
| 233 }; | 234 }; |
| 234 | 235 |
| 235 } // namespace interpreter | 236 } // namespace interpreter |
| 236 } // namespace internal | 237 } // namespace internal |
| 237 } // namespace v8 | 238 } // namespace v8 |
| 238 | 239 |
| 239 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 240 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |