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

Unified Diff: src/fast-codegen.h

Issue 302002: Adding declaration of global variables and functions in new compiler.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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 3095)
+++ src/fast-codegen.h (working copy)
@@ -38,17 +38,23 @@
class FastCodeGenerator: public AstVisitor {
public:
- explicit FastCodeGenerator(MacroAssembler* masm)
- : masm_(masm), function_(NULL) {
+ FastCodeGenerator(MacroAssembler* masm, Handle<Script> script, bool is_eval)
+ : masm_(masm), function_(NULL), script_(script), is_eval_(is_eval) {
}
- static Handle<Code> MakeCode(FunctionLiteral* fun, Handle<Script> script);
+ static Handle<Code> MakeCode(FunctionLiteral* fun,
+ Handle<Script> script,
+ bool is_eval);
void Generate(FunctionLiteral* fun);
private:
int SlotOffset(Slot* slot);
+ void VisitDeclarations(ZoneList<Declaration*>* declarations);
+ Handle<JSFunction> BuildBoilerplate(FunctionLiteral* fun);
+ void DeclareGlobals(Handle<FixedArray> pairs);
+
void SetFunctionPosition(FunctionLiteral* fun);
void SetReturnPosition(FunctionLiteral* fun);
void SetStatementPosition(Statement* stmt);
@@ -61,6 +67,8 @@
MacroAssembler* masm_;
FunctionLiteral* function_;
+ Handle<Script> script_;
+ bool is_eval_;
DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
};
« 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