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(Register destination, Handle<String> name); |
| 82 void BuildThrowReassignConstant(Handle<String> name); |
| 83 void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name); |
78 | 84 |
79 void VisitArgumentsObject(Variable* variable); | 85 void VisitArgumentsObject(Variable* variable); |
80 void VisitThisFunctionVariable(Variable* variable); | 86 void VisitThisFunctionVariable(Variable* variable); |
81 void VisitNewTargetVariable(Variable* variable); | 87 void VisitNewTargetVariable(Variable* variable); |
82 void VisitNewLocalFunctionContext(); | 88 void VisitNewLocalFunctionContext(); |
83 void VisitBuildLocalActivationContext(); | 89 void VisitBuildLocalActivationContext(); |
84 void VisitBlockDeclarationsAndStatements(Block* stmt); | 90 void VisitBlockDeclarationsAndStatements(Block* stmt); |
85 void VisitNewLocalBlockContext(Scope* scope); | 91 void VisitNewLocalBlockContext(Scope* scope); |
86 void VisitNewLocalCatchContext(Variable* variable); | 92 void VisitNewLocalCatchContext(Variable* variable); |
87 void VisitFunctionClosureForContext(); | 93 void VisitFunctionClosureForContext(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 ContextScope* execution_context_; | 156 ContextScope* execution_context_; |
151 ExpressionResultScope* execution_result_; | 157 ExpressionResultScope* execution_result_; |
152 RegisterAllocationScope* register_allocator_; | 158 RegisterAllocationScope* register_allocator_; |
153 }; | 159 }; |
154 | 160 |
155 } // namespace interpreter | 161 } // namespace interpreter |
156 } // namespace internal | 162 } // namespace internal |
157 } // namespace v8 | 163 } // namespace v8 |
158 | 164 |
159 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 165 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |