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); |
}; |