| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // register, or just getting the effect. | 117 // register, or just getting the effect. |
| 118 void VisitForAccumulatorValue(Expression* expr); | 118 void VisitForAccumulatorValue(Expression* expr); |
| 119 void VisitForAccumulatorValueOrTheHole(Expression* expr); | 119 void VisitForAccumulatorValueOrTheHole(Expression* expr); |
| 120 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr); | 120 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr); |
| 121 void VisitForEffect(Expression* expr); | 121 void VisitForEffect(Expression* expr); |
| 122 | 122 |
| 123 // Methods for tracking and remapping register. | 123 // Methods for tracking and remapping register. |
| 124 void RecordStoreToRegister(Register reg); | 124 void RecordStoreToRegister(Register reg); |
| 125 Register LoadFromAliasedRegister(Register reg); | 125 Register LoadFromAliasedRegister(Register reg); |
| 126 | 126 |
| 127 // Methods for tracking try-block nesting. |
| 128 bool IsInsideTryCatch() const { return try_catch_nesting_level_ > 0; } |
| 129 bool IsInsideTryFinally() const { return try_finally_nesting_level_ > 0; } |
| 130 |
| 127 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } | 131 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } |
| 128 inline BytecodeArrayBuilder* builder() const { return builder_; } | 132 inline BytecodeArrayBuilder* builder() const { return builder_; } |
| 129 | 133 |
| 130 inline Isolate* isolate() const { return isolate_; } | 134 inline Isolate* isolate() const { return isolate_; } |
| 131 inline Zone* zone() const { return zone_; } | 135 inline Zone* zone() const { return zone_; } |
| 132 | 136 |
| 133 inline Scope* scope() const { return scope_; } | 137 inline Scope* scope() const { return scope_; } |
| 134 inline void set_scope(Scope* scope) { scope_ = scope; } | 138 inline void set_scope(Scope* scope) { scope_ = scope; } |
| 135 inline CompilationInfo* info() const { return info_; } | 139 inline CompilationInfo* info() const { return info_; } |
| 136 inline void set_info(CompilationInfo* info) { info_ = info; } | 140 inline void set_info(CompilationInfo* info) { info_ = info; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 163 Isolate* isolate_; | 167 Isolate* isolate_; |
| 164 Zone* zone_; | 168 Zone* zone_; |
| 165 BytecodeArrayBuilder* builder_; | 169 BytecodeArrayBuilder* builder_; |
| 166 CompilationInfo* info_; | 170 CompilationInfo* info_; |
| 167 Scope* scope_; | 171 Scope* scope_; |
| 168 ZoneVector<Handle<Object>> globals_; | 172 ZoneVector<Handle<Object>> globals_; |
| 169 ControlScope* execution_control_; | 173 ControlScope* execution_control_; |
| 170 ContextScope* execution_context_; | 174 ContextScope* execution_context_; |
| 171 ExpressionResultScope* execution_result_; | 175 ExpressionResultScope* execution_result_; |
| 172 RegisterAllocationScope* register_allocator_; | 176 RegisterAllocationScope* register_allocator_; |
| 177 int try_catch_nesting_level_; |
| 178 int try_finally_nesting_level_; |
| 173 }; | 179 }; |
| 174 | 180 |
| 175 } // namespace interpreter | 181 } // namespace interpreter |
| 176 } // namespace internal | 182 } // namespace internal |
| 177 } // namespace v8 | 183 } // namespace v8 |
| 178 | 184 |
| 179 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 185 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |