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

Unified Diff: src/fast-codegen.h

Issue 558042: Add fast code generator visitor. (Closed)
Patch Set: Created 10 years, 11 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
« no previous file with comments | « src/compiler.cc ('k') | src/fast-codegen.cc » ('j') | src/fast-codegen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.h
diff --git a/src/fast-codegen.h b/src/fast-codegen.h
index 4f2628d7c31b7ddf38cf98684027e9fa02adfdd0..f28a0ea810a0b6e76d79b1c428206f79f494266e 100644
--- a/src/fast-codegen.h
+++ b/src/fast-codegen.h
@@ -63,6 +63,40 @@ class FastCodeGenSyntaxChecker: public AstVisitor {
};
+class FastCodeGenerator: public AstVisitor {
+ public:
+ FastCodeGenerator(Handle<Script> script, bool is_eval)
+ : masm_(NULL),
+ script_(script),
+ is_eval_(is_eval),
+ function_(NULL),
+ info_(NULL) {
+ }
+
+ static void MakeCode(FunctionLiteral* fun,
+ Handle<Script> script,
+ bool is_eval,
+ CompilationInfo* info);
+
+ void Generate(FunctionLiteral* fun, CompilationInfo* info);
+
+ private:
+ // AST node visit functions.
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
+ AST_NODE_LIST(DECLARE_VISIT)
+#undef DECLARE_VISIT
+
+ MacroAssembler* masm_;
+ Handle<Script> script_;
+ bool is_eval_;
+
+ FunctionLiteral* function_;
+ CompilationInfo* info_;
+
+ DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
+};
+
+
} } // namespace v8::internal
#endif // V8_FAST_CODEGEN_H_
« no previous file with comments | « src/compiler.cc ('k') | src/fast-codegen.cc » ('j') | src/fast-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698