Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_INTERPRETER_BYTECODE_EMITTER_H_ | |
| 6 #define V8_INTERPRETER_BYTECODE_EMITTER_H_ | |
| 7 | |
| 8 #include "src/ast.h" | |
| 9 #include "src/interpreter/bytecodes.h" | |
| 10 | |
| 11 namespace v8 { | |
| 12 namespace internal { | |
| 13 namespace interpreter { | |
| 14 | |
| 15 class BytecodeEmitter : public AstVisitor { | |
|
rmcilroy
2015/07/15 13:33:38
Let's move this off to a separate CL and keep this
oth
2015/07/16 09:15:50
Acknowledged.
| |
| 16 public: | |
| 17 BytecodeEmitter(Isolate* isolate, Zone* zone); | |
| 18 virtual ~BytecodeEmitter(); | |
| 19 | |
| 20 Handle<BytecodeArray> Emit(FunctionLiteral* program); | |
| 21 | |
| 22 #define DECLARE_VISIT(type) void Visit##type(type* node) override; | |
| 23 AST_NODE_LIST(DECLARE_VISIT) | |
| 24 #undef DECLARE_VISIT | |
| 25 | |
| 26 private: | |
| 27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | |
| 28 | |
| 29 std::vector<Bytecode> bytecodes_; | |
| 30 }; | |
| 31 | |
| 32 } // namespace interpreter | |
| 33 } // namespace internal | |
| 34 } // namespace v8 | |
| 35 | |
| 36 #endif // V8_INTERPRETER_BYTECODE_EMITTER_H_ | |
| OLD | NEW |