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 16 matching lines...) Expand all Loading... |
27 private: | 27 private: |
28 class ControlScope; | 28 class ControlScope; |
29 class ControlScopeForIteration; | 29 class ControlScopeForIteration; |
30 | 30 |
31 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 31 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
32 | 32 |
33 void VisitArithmeticExpression(BinaryOperation* binop); | 33 void VisitArithmeticExpression(BinaryOperation* binop); |
34 void VisitPropertyLoad(Register obj, Property* expr); | 34 void VisitPropertyLoad(Register obj, Property* expr); |
35 void VisitVariableLoad(Variable* variable); | 35 void VisitVariableLoad(Variable* variable); |
36 | 36 |
| 37 // Dispatched from VisitUnaryOperation. |
| 38 void VisitVoid(UnaryOperation* expr); |
| 39 void VisitTypeOf(UnaryOperation* expr); |
| 40 void VisitNot(UnaryOperation* expr); |
| 41 |
37 inline BytecodeArrayBuilder* builder() { return &builder_; } | 42 inline BytecodeArrayBuilder* builder() { return &builder_; } |
38 inline Scope* scope() const { return scope_; } | 43 inline Scope* scope() const { return scope_; } |
39 inline void set_scope(Scope* scope) { scope_ = scope; } | 44 inline void set_scope(Scope* scope) { scope_ = scope; } |
40 inline ControlScope* control_scope() const { return control_scope_; } | 45 inline ControlScope* control_scope() const { return control_scope_; } |
41 inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; } | 46 inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; } |
42 inline CompilationInfo* info() const { return info_; } | 47 inline CompilationInfo* info() const { return info_; } |
43 inline void set_info(CompilationInfo* info) { info_ = info; } | 48 inline void set_info(CompilationInfo* info) { info_ = info; } |
44 | 49 |
45 LanguageMode language_mode() const; | 50 LanguageMode language_mode() const; |
46 int feedback_index(FeedbackVectorSlot slot) const; | 51 int feedback_index(FeedbackVectorSlot slot) const; |
47 | 52 |
48 BytecodeArrayBuilder builder_; | 53 BytecodeArrayBuilder builder_; |
49 CompilationInfo* info_; | 54 CompilationInfo* info_; |
50 Scope* scope_; | 55 Scope* scope_; |
51 ControlScope* control_scope_; | 56 ControlScope* control_scope_; |
52 }; | 57 }; |
53 | 58 |
54 } // namespace interpreter | 59 } // namespace interpreter |
55 } // namespace internal | 60 } // namespace internal |
56 } // namespace v8 | 61 } // namespace v8 |
57 | 62 |
58 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 63 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |