| Index: src/parsing/parser-base.h
|
| diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
|
| index 1aa4f3722a6a61d4f571e9add299b8e0bf1352af..a5e757782b064ccae49e4c49f20cc47e70abdd8b 100644
|
| --- a/src/parsing/parser-base.h
|
| +++ b/src/parsing/parser-base.h
|
| @@ -830,6 +830,17 @@ class ParserBase : public Traits {
|
| return true;
|
| }
|
|
|
| + // Keep track of eval() calls since they disable all local variable
|
| + // optimizations. This checks if expression is an eval call, and if yes,
|
| + // forwards the information to scope.
|
| + void CheckPossibleEvalCall(ExpressionT expression, Scope* scope) {
|
| + if (Traits::IsIdentifier(expression) &&
|
| + Traits::IsEval(Traits::AsIdentifier(expression))) {
|
| + scope->DeclarationScope()->RecordEvalCall();
|
| + scope->RecordEvalCall();
|
| + }
|
| + }
|
| +
|
| // Used to validate property names in object literals and class literals
|
| enum PropertyKind {
|
| kAccessorProperty,
|
|
|