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

Unified Diff: src/parsing/parser-base.h

Issue 2419663005: Only guard the eager compile hint by whether the target literal was same-zone parsed (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/ast/ast.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 42ac368a00377e2d8620131cfb4de45037bd8e80..8d7c100001240b22c0a7b4d7825241dcee6cf28d 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -3080,7 +3080,7 @@ ParserBase<Impl>::ParseLeftHandSideExpression(bool* ok) {
// Also the trailing parenthesis are a hint that the function will
// be called immediately. If we happen to have parsed a preceding
// function literal eagerly, we can also compile it eagerly.
- if (result->IsFunctionLiteral() && mode() == PARSE_EAGERLY) {
+ if (result->IsFunctionLiteral()) {
result->AsFunctionLiteral()->SetShouldEagerCompile();
}
}
@@ -3410,7 +3410,7 @@ ParserBase<Impl>::ParseMemberExpressionContinuation(ExpressionT expression,
pos = position();
} else {
pos = peek_position();
- if (expression->IsFunctionLiteral() && mode() == PARSE_EAGERLY) {
+ if (expression->IsFunctionLiteral()) {
// If the tag function looks like an IIFE, set_parenthesized() to
// force eager compilation.
expression->AsFunctionLiteral()->SetShouldEagerCompile();
« no previous file with comments | « src/ast/ast.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698