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

Unified Diff: src/fast-codegen.h

Issue 549108: Rename the toplevel code generator from "Fast" to "Full". It was... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.h
===================================================================
--- src/fast-codegen.h (revision 3659)
+++ src/fast-codegen.h (working copy)
@@ -35,12 +35,35 @@
namespace v8 {
namespace internal {
+class FullCodeGenSyntaxChecker: public AstVisitor {
+ public:
+ FullCodeGenSyntaxChecker() : has_supported_syntax_(true) {}
+
+ void Check(FunctionLiteral* fun);
+
+ bool has_supported_syntax() { return has_supported_syntax_; }
+
+ private:
+ void VisitDeclarations(ZoneList<Declaration*>* decls);
+ void VisitStatements(ZoneList<Statement*>* stmts);
+
+ // AST node visit functions.
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
+ AST_NODE_LIST(DECLARE_VISIT)
+#undef DECLARE_VISIT
+
+ bool has_supported_syntax_;
+
+ DISALLOW_COPY_AND_ASSIGN(FullCodeGenSyntaxChecker);
+};
+
+
// -----------------------------------------------------------------------------
-// Fast code generator.
+// Full code generator.
-class FastCodeGenerator: public AstVisitor {
+class FullCodeGenerator: public AstVisitor {
public:
- FastCodeGenerator(MacroAssembler* masm, Handle<Script> script, bool is_eval)
+ FullCodeGenerator(MacroAssembler* masm, Handle<Script> script, bool is_eval)
: masm_(masm),
function_(NULL),
script_(script),
@@ -68,7 +91,7 @@
class NestedStatement BASE_EMBEDDED {
public:
- explicit NestedStatement(FastCodeGenerator* codegen) : codegen_(codegen) {
+ explicit NestedStatement(FullCodeGenerator* codegen) : codegen_(codegen) {
// Link into codegen's nesting stack.
previous_ = codegen->nesting_stack_;
codegen->nesting_stack_ = this;
@@ -106,14 +129,14 @@
protected:
MacroAssembler* masm() { return codegen_->masm(); }
private:
- FastCodeGenerator* codegen_;
+ FullCodeGenerator* codegen_;
NestedStatement* previous_;
DISALLOW_COPY_AND_ASSIGN(NestedStatement);
};
class Breakable : public NestedStatement {
public:
- Breakable(FastCodeGenerator* codegen,
+ Breakable(FullCodeGenerator* codegen,
BreakableStatement* break_target)
: NestedStatement(codegen),
target_(break_target) {}
@@ -132,7 +155,7 @@
class Iteration : public Breakable {
public:
- Iteration(FastCodeGenerator* codegen,
+ Iteration(FullCodeGenerator* codegen,
IterationStatement* iteration_statement)
: Breakable(codegen, iteration_statement) {}
virtual ~Iteration() {}
@@ -149,7 +172,7 @@
// The environment inside the try block of a try/catch statement.
class TryCatch : public NestedStatement {
public:
- explicit TryCatch(FastCodeGenerator* codegen, Label* catch_entry)
+ explicit TryCatch(FullCodeGenerator* codegen, Label* catch_entry)
: NestedStatement(codegen), catch_entry_(catch_entry) { }
virtual ~TryCatch() {}
virtual TryCatch* AsTryCatch() { return this; }
@@ -163,7 +186,7 @@
// The environment inside the try block of a try/finally statement.
class TryFinally : public NestedStatement {
public:
- explicit TryFinally(FastCodeGenerator* codegen, Label* finally_entry)
+ explicit TryFinally(FullCodeGenerator* codegen, Label* finally_entry)
: NestedStatement(codegen), finally_entry_(finally_entry) { }
virtual ~TryFinally() {}
virtual TryFinally* AsTryFinally() { return this; }
@@ -179,7 +202,7 @@
// the block's parameters from the stack.
class Finally : public NestedStatement {
public:
- explicit Finally(FastCodeGenerator* codegen) : NestedStatement(codegen) { }
+ explicit Finally(FullCodeGenerator* codegen) : NestedStatement(codegen) { }
virtual ~Finally() {}
virtual Finally* AsFinally() { return this; }
virtual int Exit(int stack_depth) {
@@ -196,7 +219,7 @@
// the block's temporary storage from the stack.
class ForIn : public Iteration {
public:
- ForIn(FastCodeGenerator* codegen,
+ ForIn(FullCodeGenerator* codegen,
ForInStatement* statement)
: Iteration(codegen, statement) { }
virtual ~ForIn() {}
@@ -410,7 +433,7 @@
friend class NestedStatement;
- DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
+ DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
};
« no previous file with comments | « src/compiler.cc ('k') | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698