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

Unified Diff: src/parsing/parser.cc

Issue 2509143003: Treat a '!' preceding a function literal as eager-compile hint. (Closed)
Patch Set: remove empty line. Created 4 years, 1 month 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 | « no previous file | src/parsing/parser-base.h » ('j') | 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 262ce278cf94cf256b5424a5261faa3f2f3cb121..900f87401d205d88cc47f49671f50b6004644c2c 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2531,7 +2531,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
}
FunctionLiteral::EagerCompileHint eager_compile_hint =
- function_state_->next_function_is_parenthesized()
+ (function_state_->next_function_is_parenthesized() ||
Toon Verwaest 2016/11/17 13:56:48 What about just something like: next_function_is_l
vogelheim 2016/11/17 14:56:31 I thought about it... the reason why I prefer it t
+ function_state_->next_function_is_exclaimed())
? FunctionLiteral::kShouldEagerCompile
: default_eager_compile_hint();
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698