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

Unified Diff: src/preparser.h

Issue 899363002: Allow eval and arguments as property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: expand test Created 5 years, 10 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/parser.cc ('k') | src/preparser.cc » ('j') | src/preparser.cc » ('J')
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 29a2b55e83e89719ee6472c35f9826765adb5be6..e999118ed3188c1e7fad130501d4b50b5ec350b3 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -446,6 +446,17 @@ class ParserBase : public Traits {
*ok = false;
return;
}
+ CheckStrictFunctionParameters(eval_args_error_loc, dupe_error_loc,
+ reserved_loc, ok);
+ }
+
+ // Validates strict mode for function parameter lists. This has to be
+ // done after parsing the function, since the function can declare
+ // itself strict.
+ void CheckStrictFunctionParameters(
+ const Scanner::Location& eval_args_error_loc,
+ const Scanner::Location& dupe_error_loc,
+ const Scanner::Location& reserved_loc, bool* ok) {
if (eval_args_error_loc.IsValid()) {
Traits::ReportMessageAt(eval_args_error_loc, "strict_eval_arguments");
*ok = false;
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | src/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698