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

Unified Diff: src/parsing/parser.cc

Issue 2156013002: Put FunctionLiterals into temp_zone too. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comment -- for try jobs pls see previous patch Created 4 years, 5 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
« src/parsing/parser.h ('K') | « src/parsing/parser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index d0cf28a488d078a317c763be8f6a03038bae8289..506a3d9e294fd11a9dc0ab555670db0595fb96bd 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4420,7 +4420,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
function_type == FunctionLiteral::kDeclaration &&
eager_compile_hint != FunctionLiteral::kShouldEagerCompile &&
!(FLAG_validate_asm && scope->asm_function());
- // Open a new BodyScope, which sets our AstNodeFactory to allocate in the
+ // Open a new zone scope, which sets our AstNodeFactory to allocate in the
// new temporary zone if the preconditions are satisfied, and ensures that
// the previous zone is always restored after parsing the body.
// For the purpose of scope analysis, some ZoneObjects allocated by the
@@ -4429,8 +4429,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// parser-persistent zone (see parser_zone_ in AstNodeFactory).
{
Zone temp_zone(zone()->allocator());
- AstNodeFactory::BodyScope inner(factory(), &temp_zone, use_temp_zone);
-
+ DiscardableZoneScope(this, &temp_zone, use_temp_zone);
body = ParseEagerFunctionBody(function_name, pos, formals, kind,
function_type, CHECK_OK);
}
« src/parsing/parser.h ('K') | « src/parsing/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698