| 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 10 matching lines...) Expand all Loading... |
| 21 Handle<BytecodeArray> MakeBytecode(CompilationInfo* info); | 21 Handle<BytecodeArray> MakeBytecode(CompilationInfo* info); |
| 22 | 22 |
| 23 #define DECLARE_VISIT(type) void Visit##type(type* node) override; | 23 #define DECLARE_VISIT(type) void Visit##type(type* node) override; |
| 24 AST_NODE_LIST(DECLARE_VISIT) | 24 AST_NODE_LIST(DECLARE_VISIT) |
| 25 #undef DECLARE_VISIT | 25 #undef DECLARE_VISIT |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 28 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| 29 | 29 |
| 30 void VisitArithmeticExpression(BinaryOperation* binop); | 30 void VisitArithmeticExpression(BinaryOperation* binop); |
| 31 void VisitPropertyLoad(Register obj, Property* expr); |
| 31 | 32 |
| 32 inline BytecodeArrayBuilder& builder() { return builder_; } | 33 inline BytecodeArrayBuilder& builder() { return builder_; } |
| 33 inline Scope* scope() const { return scope_; } | 34 inline Scope* scope() const { return scope_; } |
| 34 inline void set_scope(Scope* scope) { scope_ = scope; } | 35 inline void set_scope(Scope* scope) { scope_ = scope; } |
| 35 inline CompilationInfo* info() const { return info_; } | 36 inline CompilationInfo* info() const { return info_; } |
| 36 inline void set_info(CompilationInfo* info) { info_ = info; } | 37 inline void set_info(CompilationInfo* info) { info_ = info; } |
| 37 | 38 |
| 38 LanguageMode language_mode() const; | 39 LanguageMode language_mode() const; |
| 39 int feedback_index(FeedbackVectorICSlot slot) const; | 40 int feedback_index(FeedbackVectorICSlot slot) const; |
| 40 | 41 |
| 41 BytecodeArrayBuilder builder_; | 42 BytecodeArrayBuilder builder_; |
| 42 CompilationInfo* info_; | 43 CompilationInfo* info_; |
| 43 Scope* scope_; | 44 Scope* scope_; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace interpreter | 47 } // namespace interpreter |
| 47 } // namespace internal | 48 } // namespace internal |
| 48 } // namespace v8 | 49 } // namespace v8 |
| 49 | 50 |
| 50 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 51 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |