| 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.h" | 8 #include "src/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 Register value_out); | 48 Register value_out); |
| 49 | 49 |
| 50 // Dispatched from VisitUnaryOperation. | 50 // Dispatched from VisitUnaryOperation. |
| 51 void VisitVoid(UnaryOperation* expr); | 51 void VisitVoid(UnaryOperation* expr); |
| 52 void VisitTypeOf(UnaryOperation* expr); | 52 void VisitTypeOf(UnaryOperation* expr); |
| 53 void VisitNot(UnaryOperation* expr); | 53 void VisitNot(UnaryOperation* expr); |
| 54 | 54 |
| 55 inline BytecodeArrayBuilder* builder() { return &builder_; } | 55 inline BytecodeArrayBuilder* builder() { return &builder_; } |
| 56 | 56 |
| 57 inline Isolate* isolate() const { return isolate_; } | 57 inline Isolate* isolate() const { return isolate_; } |
| 58 inline Zone* zone() const { return zone_; } |
| 58 | 59 |
| 59 inline Scope* scope() const { return scope_; } | 60 inline Scope* scope() const { return scope_; } |
| 60 inline void set_scope(Scope* scope) { scope_ = scope; } | 61 inline void set_scope(Scope* scope) { scope_ = scope; } |
| 61 inline CompilationInfo* info() const { return info_; } | 62 inline CompilationInfo* info() const { return info_; } |
| 62 inline void set_info(CompilationInfo* info) { info_ = info; } | 63 inline void set_info(CompilationInfo* info) { info_ = info; } |
| 63 | 64 |
| 64 inline ControlScope* control_scope() const { return control_scope_; } | 65 inline ControlScope* control_scope() const { return control_scope_; } |
| 65 inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; } | 66 inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; } |
| 66 inline Register current_context() const { return current_context_; } | 67 inline Register current_context() const { return current_context_; } |
| 67 inline void set_current_context(Register context) { | 68 inline void set_current_context(Register context) { |
| 68 current_context_ = context; | 69 current_context_ = context; |
| 69 } | 70 } |
| 70 | 71 |
| 71 ZoneVector<Handle<Object>>* globals() { return &globals_; } | 72 ZoneVector<Handle<Object>>* globals() { return &globals_; } |
| 72 inline LanguageMode language_mode() const; | 73 inline LanguageMode language_mode() const; |
| 73 Strength language_mode_strength() const; | 74 Strength language_mode_strength() const; |
| 74 int feedback_index(FeedbackVectorSlot slot) const; | 75 int feedback_index(FeedbackVectorSlot slot) const; |
| 75 | 76 |
| 76 Isolate* isolate_; | 77 Isolate* isolate_; |
| 78 Zone* zone_; |
| 77 BytecodeArrayBuilder builder_; | 79 BytecodeArrayBuilder builder_; |
| 78 CompilationInfo* info_; | 80 CompilationInfo* info_; |
| 79 Scope* scope_; | 81 Scope* scope_; |
| 80 ZoneVector<Handle<Object>> globals_; | 82 ZoneVector<Handle<Object>> globals_; |
| 81 ControlScope* control_scope_; | 83 ControlScope* control_scope_; |
| 82 | 84 |
| 83 Register current_context_; | 85 Register current_context_; |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 } // namespace interpreter | 88 } // namespace interpreter |
| 87 } // namespace internal | 89 } // namespace internal |
| 88 } // namespace v8 | 90 } // namespace v8 |
| 89 | 91 |
| 90 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 92 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |