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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 74 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
75 void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot); | 75 void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot); |
76 | 76 |
77 void VisitArgumentsObject(Variable* variable); | 77 void VisitArgumentsObject(Variable* variable); |
78 void VisitThisFunctionVariable(Variable* variable); | 78 void VisitThisFunctionVariable(Variable* variable); |
79 void VisitNewTargetVariable(Variable* variable); | 79 void VisitNewTargetVariable(Variable* variable); |
80 void VisitNewLocalFunctionContext(); | 80 void VisitNewLocalFunctionContext(); |
81 void VisitBuildLocalActivationContext(); | 81 void VisitBuildLocalActivationContext(); |
82 void VisitBlockDeclarationsAndStatements(Block* stmt); | 82 void VisitBlockDeclarationsAndStatements(Block* stmt); |
83 void VisitNewLocalBlockContext(Scope* scope); | 83 void VisitNewLocalBlockContext(Scope* scope); |
| 84 void VisitNewLocalCatchContext(Variable* variable); |
84 void VisitFunctionClosureForContext(); | 85 void VisitFunctionClosureForContext(); |
85 void VisitSetHomeObject(Register value, Register home_object, | 86 void VisitSetHomeObject(Register value, Register home_object, |
86 ObjectLiteralProperty* property, int slot_number = 0); | 87 ObjectLiteralProperty* property, int slot_number = 0); |
87 void VisitObjectLiteralAccessor(Register home_object, | 88 void VisitObjectLiteralAccessor(Register home_object, |
88 ObjectLiteralProperty* property, | 89 ObjectLiteralProperty* property, |
89 Register value_out); | 90 Register value_out); |
90 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); | 91 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); |
91 | 92 |
| 93 // Visit a statement and switch scopes, the context is in the accumulator. |
| 94 void VisitInScope(Statement* stmt, Scope* scope); |
| 95 |
92 // Visitors for obtaining expression result in the accumulator, in a | 96 // Visitors for obtaining expression result in the accumulator, in a |
93 // register, or just getting the effect. | 97 // register, or just getting the effect. |
94 void VisitForAccumulatorValue(Expression* expression); | 98 void VisitForAccumulatorValue(Expression* expression); |
95 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); | 99 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); |
96 void VisitForEffect(Expression* node); | 100 void VisitForEffect(Expression* node); |
97 | 101 |
98 // Methods for tracking and remapping register. | 102 // Methods for tracking and remapping register. |
99 void RecordStoreToRegister(Register reg); | 103 void RecordStoreToRegister(Register reg); |
100 Register LoadFromAliasedRegister(Register reg); | 104 Register LoadFromAliasedRegister(Register reg); |
101 | 105 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 ContextScope* execution_context_; | 148 ContextScope* execution_context_; |
145 ExpressionResultScope* execution_result_; | 149 ExpressionResultScope* execution_result_; |
146 RegisterAllocationScope* register_allocator_; | 150 RegisterAllocationScope* register_allocator_; |
147 }; | 151 }; |
148 | 152 |
149 } // namespace interpreter | 153 } // namespace interpreter |
150 } // namespace internal | 154 } // namespace internal |
151 } // namespace v8 | 155 } // namespace v8 |
152 | 156 |
153 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 157 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |