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

Unified Diff: src/parsing/parser.cc

Issue 2583843002: Make inner functions less lazy. (Closed)
Patch Set: Created 4 years 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/flag-definitions.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 e9813cc7d7f56e39bb530c97c38078523b4d43f5..329c12f1616a13e0b9ddec00d3bd139e0b37d34c 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2612,11 +2612,18 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// will migrate unresolved variable into a Scope in the main Zone.
// TODO(marja): Refactor parsing modes: simplify this.
bool use_temp_zone =
- (FLAG_lazy_inner_functions
+ (FLAG_aggressive_lazy_inner_functions
? can_preparse
: (is_lazy_top_level_function ||
- (allow_lazy_ && function_type == FunctionLiteral::kDeclaration &&
+ (parse_lazily() &&
+ function_type == FunctionLiteral::kDeclaration &&
eager_compile_hint == FunctionLiteral::kShouldLazyCompile)));
+
+ DCHECK_IMPLIES(
+ (is_lazy_top_level_function ||
+ (parse_lazily() && function_type == FunctionLiteral::kDeclaration &&
+ eager_compile_hint == FunctionLiteral::kShouldLazyCompile)),
+ can_preparse);
bool is_lazy_inner_function =
use_temp_zone && FLAG_lazy_inner_functions && !is_lazy_top_level_function;
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698