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

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

Issue 1964603002: [es8] Throw SyntaxError when trying to tail call a direct eval. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@stc-strict-mode
Patch Set: Created 4 years, 7 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/parsing/parser.h ('k') | src/parsing/preparser.h » ('j') | 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 89b5b10da965e0068fbfc66c42a30c2c4fd3e4ba..1cdcc3f66767c3af7c9ecd9107a18cdffb91e82f 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -2234,6 +2234,12 @@ ParserBase<Traits>::ParseTailCallExpression(ExpressionClassifier* classifier,
*ok = false;
return Traits::EmptyExpression();
}
+ if (Traits::IsDirectEvalCall(expression)) {
+ Scanner::Location sub_loc(sub_expression_pos, loc.end_pos);
+ ReportMessageAt(sub_loc, MessageTemplate::kUnexpectedTailCallOfEval);
+ *ok = false;
+ return Traits::EmptyExpression();
+ }
if (!is_strict(language_mode())) {
ReportMessageAt(loc, MessageTemplate::kUnexpectedSloppyTailCall);
*ok = false;
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698