Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Unified Diff: src/interpreter/bytecode-emitter.h

Issue 1230753004: [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use BytecodeArray in bytecode emission path in interpreter. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698