diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 09:25:14 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 09:56:31 +0100 |
commit | 6313e1fe4c27755adde87e62db1c2f9fac534ae4 (patch) | |
tree | c57bb29f65e02fbfcc07895a8cc2903fff9300ba /src/3rdparty/v8/src/rewriter.cc | |
parent | b5a49a260d03249c386f1b63c249089383dd81fa (diff) | |
parent | cac65e7a222b848a735a974b0aeb43209b0cfa18 (diff) | |
download | qtjsbackend-6313e1fe4c27755adde87e62db1c2f9fac534ae4.tar.gz |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: I892bbc73c276842894a720f761ce31ad1b015672
Diffstat (limited to 'src/3rdparty/v8/src/rewriter.cc')
-rw-r--r-- | src/3rdparty/v8/src/rewriter.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/3rdparty/v8/src/rewriter.cc b/src/3rdparty/v8/src/rewriter.cc index e58ddb4..6541546 100644 --- a/src/3rdparty/v8/src/rewriter.cc +++ b/src/3rdparty/v8/src/rewriter.cc @@ -38,12 +38,12 @@ namespace internal { class Processor: public AstVisitor { public: - explicit Processor(Variable* result) + Processor(Variable* result, Zone* zone) : result_(result), result_assigned_(false), is_set_(false), in_try_(false), - factory_(isolate()) { } + factory_(isolate(), zone) { } virtual ~Processor() { } @@ -230,8 +230,8 @@ EXPRESSION_NODE_LIST(DEF_VISIT) #undef DEF_VISIT -// Assumes code has been parsed and scopes have been analyzed. Mutates the -// AST, so the AST should not continue to be used in the case of failure. +// Assumes code has been parsed. Mutates the AST, so the AST should not +// continue to be used in the case of failure. bool Rewriter::Rewrite(CompilationInfo* info) { FunctionLiteral* function = info->function(); ASSERT(function != NULL); @@ -243,7 +243,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) { if (!body->is_empty()) { Variable* result = scope->NewTemporary( info->isolate()->factory()->result_symbol()); - Processor processor(result); + Processor processor(result, info->zone()); processor.Process(body); if (processor.HasStackOverflow()) return false; @@ -257,12 +257,12 @@ bool Rewriter::Rewrite(CompilationInfo* info) { // coincides with the end of the with scope which is the position of '1'. int position = function->end_position(); VariableProxy* result_proxy = processor.factory()->NewVariableProxy( - result->name(), false, position); + result->name(), false, Interface::NewValue(), position); result_proxy->BindTo(result); Statement* result_statement = processor.factory()->NewReturnStatement(result_proxy); result_statement->set_statement_pos(position); - body->Add(result_statement); + body->Add(result_statement, info->zone()); } } |