Chromium Code Reviews| Index: src/interpreter/bytecode-emitter.h |
| diff --git a/src/interpreter/bytecode-emitter.h b/src/interpreter/bytecode-emitter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9f891e8e9949a2cb6833d1c2e4836740d10b19e1 |
| --- /dev/null |
| +++ b/src/interpreter/bytecode-emitter.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2015 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef V8_INTERPRETER_BYTECODE_EMITTER_H_ |
| +#define V8_INTERPRETER_BYTECODE_EMITTER_H_ |
| + |
| +#include "src/ast.h" |
| +#include "src/interpreter/bytecodes.h" |
| + |
| +namespace v8 { |
| +namespace internal { |
| +namespace interpreter { |
| + |
| +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.
|
| + public: |
| + BytecodeEmitter(Isolate* isolate, Zone* zone); |
| + virtual ~BytecodeEmitter(); |
| + |
| + Handle<BytecodeArray> Emit(FunctionLiteral* program); |
| + |
| +#define DECLARE_VISIT(type) void Visit##type(type* node) override; |
| + AST_NODE_LIST(DECLARE_VISIT) |
| +#undef DECLARE_VISIT |
| + |
| + private: |
| + DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| + |
| + std::vector<Bytecode> bytecodes_; |
| +}; |
| + |
| +} // namespace interpreter |
| +} // namespace internal |
| +} // namespace v8 |
| + |
| +#endif // V8_INTERPRETER_BYTECODE_EMITTER_H_ |