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

Unified Diff: src/parsing/parser.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/messages.h ('k') | 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.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 3ae2619a6562f24f56666df021e81b440f14eba8..aa2d0e87cedd1df11a6e7e2387be095ea5a25405 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -371,6 +371,12 @@ class ParserTraits {
return expression->AsVariableProxy()->raw_name();
}
+ bool IsDirectEvalCall(Expression* expression) {
+ if (!expression->IsCall()) return false;
+ expression = expression->AsCall()->expression();
+ return IsIdentifier(expression) && IsEval(AsIdentifier(expression));
+ }
+
static bool IsBoilerplateProperty(ObjectLiteral::Property* property) {
return ObjectLiteral::IsBoilerplateProperty(property);
}
« no previous file with comments | « src/messages.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698