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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); | 67 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); |
68 | 68 |
69 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, | 69 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, |
70 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 70 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
71 void VisitVariableLoadForAccumulatorValue( | 71 void VisitVariableLoadForAccumulatorValue( |
72 Variable* variable, FeedbackVectorSlot slot, | 72 Variable* variable, FeedbackVectorSlot slot, |
73 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 73 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
74 MUST_USE_RESULT Register | 74 MUST_USE_RESULT Register |
75 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot, | 75 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot, |
76 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 76 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
77 void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot); | 77 void VisitVariableAssignment(Variable* variable, Token::Value op, |
| 78 FeedbackVectorSlot slot); |
| 79 void BuildThrowIfHole(Handle<String> name); |
| 80 void BuildThrowIfNotHole(Handle<String> name); |
| 81 void BuildThrowReassignConstant(Handle<String> name); |
| 82 void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name); |
| 83 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); |
78 | 84 |
79 void VisitArgumentsObject(Variable* variable); | 85 void VisitArgumentsObject(Variable* variable); |
80 void VisitRestArgumentsArray(Variable* rest, int index); | 86 void VisitRestArgumentsArray(Variable* rest, int index); |
81 void VisitThisFunctionVariable(Variable* variable); | 87 void VisitThisFunctionVariable(Variable* variable); |
82 void VisitNewTargetVariable(Variable* variable); | 88 void VisitNewTargetVariable(Variable* variable); |
83 void VisitNewLocalFunctionContext(); | 89 void VisitNewLocalFunctionContext(); |
84 void VisitBuildLocalActivationContext(); | 90 void VisitBuildLocalActivationContext(); |
85 void VisitBlockDeclarationsAndStatements(Block* stmt); | 91 void VisitBlockDeclarationsAndStatements(Block* stmt); |
86 void VisitNewLocalBlockContext(Scope* scope); | 92 void VisitNewLocalBlockContext(Scope* scope); |
87 void VisitNewLocalCatchContext(Variable* variable); | 93 void VisitNewLocalCatchContext(Variable* variable); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ContextScope* execution_context_; | 159 ContextScope* execution_context_; |
154 ExpressionResultScope* execution_result_; | 160 ExpressionResultScope* execution_result_; |
155 RegisterAllocationScope* register_allocator_; | 161 RegisterAllocationScope* register_allocator_; |
156 }; | 162 }; |
157 | 163 |
158 } // namespace interpreter | 164 } // namespace interpreter |
159 } // namespace internal | 165 } // namespace internal |
160 } // namespace v8 | 166 } // namespace v8 |
161 | 167 |
162 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 168 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |