diff options
Diffstat (limited to 'deps/v8/src/rewriter.cc')
-rw-r--r-- | deps/v8/src/rewriter.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/deps/v8/src/rewriter.cc b/deps/v8/src/rewriter.cc index 867229a650..351c4bd75c 100644 --- a/deps/v8/src/rewriter.cc +++ b/deps/v8/src/rewriter.cc @@ -15,15 +15,13 @@ namespace internal { class Processor: public AstVisitor { public: - Processor(Variable* result, Zone* zone, AstNode::IdGen* ast_node_id_gen) + Processor(Variable* result, AstValueFactory* ast_value_factory) : result_(result), result_assigned_(false), is_set_(false), in_try_(false), - // Passing a null AstValueFactory is fine, because Processor doesn't - // need to create strings or literals. - factory_(zone, NULL, ast_node_id_gen) { - InitializeAstVisitor(zone); + factory_(ast_value_factory) { + InitializeAstVisitor(ast_value_factory->zone()); } virtual ~Processor() { } @@ -61,8 +59,7 @@ class Processor: public AstVisitor { } // Node visitors. -#define DEF_VISIT(type) \ - virtual void Visit##type(type* node); +#define DEF_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; AST_NODE_LIST(DEF_VISIT) #undef DEF_VISIT @@ -240,7 +237,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) { scope->NewTemporary(info->ast_value_factory()->dot_result_string()); // The name string must be internalized at this point. DCHECK(!result->name().is_null()); - Processor processor(result, info->zone(), info->ast_node_id_gen()); + Processor processor(result, info->ast_value_factory()); processor.Process(body); if (processor.HasStackOverflow()) return false; @@ -253,9 +250,8 @@ bool Rewriter::Rewrite(CompilationInfo* info) { // the end position of the function generated for executing the eval code // coincides with the end of the with scope which is the position of '1'. int pos = function->end_position(); - VariableProxy* result_proxy = processor.factory()->NewVariableProxy( - result->raw_name(), false, result->interface(), pos); - result_proxy->BindTo(result); + VariableProxy* result_proxy = + processor.factory()->NewVariableProxy(result, pos); Statement* result_statement = processor.factory()->NewReturnStatement(result_proxy, pos); body->Add(result_statement, info->zone()); |