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

Unified Diff: src/preparser.h

Issue 1164073003: [es6] super.prop, eval and lazy functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make the logger use 2 fields Created 5 years, 6 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/preparse-data-format.h ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 34295c71f297bce5cdca1fc81aa80252298304e5..7a68e835ff2870e5397c2be37f7f17acb4fed00f 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1624,9 +1624,13 @@ class PreParserTraits {
static void CheckAssigningFunctionLiteralToProperty(
PreParserExpression left, PreParserExpression right) {}
- // PreParser doesn't need to keep track of eval calls.
static void CheckPossibleEvalCall(PreParserExpression expression,
- Scope* scope) {}
+ Scope* scope) {
+ if (IsIdentifier(expression) && IsEval(AsIdentifier(expression))) {
+ scope->DeclarationScope()->RecordEvalCall();
+ scope->RecordEvalCall();
+ }
+ }
static PreParserExpression MarkExpressionAsAssigned(
PreParserExpression expression) {
« no previous file with comments | « src/preparse-data-format.h ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698