| 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 11 matching lines...) Expand all Loading... |
| 22 #define DECLARE_VISIT(type) void Visit##type(type* node) override; | 22 #define DECLARE_VISIT(type) void Visit##type(type* node) override; |
| 23 AST_NODE_LIST(DECLARE_VISIT) | 23 AST_NODE_LIST(DECLARE_VISIT) |
| 24 #undef DECLARE_VISIT | 24 #undef DECLARE_VISIT |
| 25 | 25 |
| 26 // Visiting function for declarations list is overridden. | 26 // Visiting function for declarations list is overridden. |
| 27 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; | 27 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 class ContextScope; | 30 class ContextScope; |
| 31 class ControlScope; | 31 class ControlScope; |
| 32 class ControlScopeForBreakable; |
| 32 class ControlScopeForIteration; | 33 class ControlScopeForIteration; |
| 33 class ControlScopeForSwitch; | |
| 34 class ExpressionResultScope; | 34 class ExpressionResultScope; |
| 35 class EffectResultScope; | 35 class EffectResultScope; |
| 36 class AccumulatorResultScope; | 36 class AccumulatorResultScope; |
| 37 class RegisterResultScope; | 37 class RegisterResultScope; |
| 38 class AssignmentHazardScope; | 38 class AssignmentHazardScope; |
| 39 | 39 |
| 40 // Helper class that aliases locals and parameters when assignment | 40 // Helper class that aliases locals and parameters when assignment |
| 41 // hazards occur in binary expressions. For y = x + (x = 1) has an | 41 // hazards occur in binary expressions. For y = x + (x = 1) has an |
| 42 // assignment hazard because the lhs evaluates to the register | 42 // assignment hazard because the lhs evaluates to the register |
| 43 // holding x and the rhs (x = 1) potentially updates x. When this | 43 // holding x and the rhs (x = 1) potentially updates x. When this |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ContextScope* execution_context_; | 168 ContextScope* execution_context_; |
| 169 ExpressionResultScope* execution_result_; | 169 ExpressionResultScope* execution_result_; |
| 170 AssignmentHazardHelper assignment_hazard_helper_; | 170 AssignmentHazardHelper assignment_hazard_helper_; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace interpreter | 173 } // namespace interpreter |
| 174 } // namespace internal | 174 } // namespace internal |
| 175 } // namespace v8 | 175 } // namespace v8 |
| 176 | 176 |
| 177 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 177 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |