| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Visitors for obtaining expression result in the accumulator, in a | 98 // Visitors for obtaining expression result in the accumulator, in a |
| 99 // register, or just getting the effect. | 99 // register, or just getting the effect. |
| 100 void VisitForAccumulatorValue(Expression* expression); | 100 void VisitForAccumulatorValue(Expression* expression); |
| 101 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); | 101 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); |
| 102 void VisitForEffect(Expression* node); | 102 void VisitForEffect(Expression* node); |
| 103 | 103 |
| 104 // Methods for tracking and remapping register. | 104 // Methods for tracking and remapping register. |
| 105 void RecordStoreToRegister(Register reg); | 105 void RecordStoreToRegister(Register reg); |
| 106 Register LoadFromAliasedRegister(Register reg); | 106 Register LoadFromAliasedRegister(Register reg); |
| 107 | 107 |
| 108 inline BytecodeArrayBuilder* builder() { return &builder_; } | 108 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } |
| 109 inline BytecodeArrayBuilder* builder() const { return builder_; } |
| 109 | 110 |
| 110 inline Isolate* isolate() const { return isolate_; } | 111 inline Isolate* isolate() const { return isolate_; } |
| 111 inline Zone* zone() const { return zone_; } | 112 inline Zone* zone() const { return zone_; } |
| 112 | 113 |
| 113 inline Scope* scope() const { return scope_; } | 114 inline Scope* scope() const { return scope_; } |
| 114 inline void set_scope(Scope* scope) { scope_ = scope; } | 115 inline void set_scope(Scope* scope) { scope_ = scope; } |
| 115 inline CompilationInfo* info() const { return info_; } | 116 inline CompilationInfo* info() const { return info_; } |
| 116 inline void set_info(CompilationInfo* info) { info_ = info; } | 117 inline void set_info(CompilationInfo* info) { info_ = info; } |
| 117 | 118 |
| 118 inline ControlScope* execution_control() const { return execution_control_; } | 119 inline ControlScope* execution_control() const { return execution_control_; } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 135 return register_allocator_; | 136 return register_allocator_; |
| 136 } | 137 } |
| 137 | 138 |
| 138 ZoneVector<Handle<Object>>* globals() { return &globals_; } | 139 ZoneVector<Handle<Object>>* globals() { return &globals_; } |
| 139 inline LanguageMode language_mode() const; | 140 inline LanguageMode language_mode() const; |
| 140 Strength language_mode_strength() const; | 141 Strength language_mode_strength() const; |
| 141 int feedback_index(FeedbackVectorSlot slot) const; | 142 int feedback_index(FeedbackVectorSlot slot) const; |
| 142 | 143 |
| 143 Isolate* isolate_; | 144 Isolate* isolate_; |
| 144 Zone* zone_; | 145 Zone* zone_; |
| 145 BytecodeArrayBuilder builder_; | 146 BytecodeArrayBuilder* builder_; |
| 146 CompilationInfo* info_; | 147 CompilationInfo* info_; |
| 147 Scope* scope_; | 148 Scope* scope_; |
| 148 ZoneVector<Handle<Object>> globals_; | 149 ZoneVector<Handle<Object>> globals_; |
| 149 ControlScope* execution_control_; | 150 ControlScope* execution_control_; |
| 150 ContextScope* execution_context_; | 151 ContextScope* execution_context_; |
| 151 ExpressionResultScope* execution_result_; | 152 ExpressionResultScope* execution_result_; |
| 152 RegisterAllocationScope* register_allocator_; | 153 RegisterAllocationScope* register_allocator_; |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace interpreter | 156 } // namespace interpreter |
| 156 } // namespace internal | 157 } // namespace internal |
| 157 } // namespace v8 | 158 } // namespace v8 |
| 158 | 159 |
| 159 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 160 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |