Go to file
marja@chromium.org 8150464209 Make strict more error messages about "eval" and "arguments" less specific.
We used to have error messages which provide context, like "Variable name may
not be eval or arguments in strict mode", but for other illegal words we only
have non-context specific error messages like "Unexpected reserved word".

Providing the context makes the code unnecessarily complex, since every
individual place must remember to check for eval or arguments. This CL produces
a unified error message ("Unexpected eval or arguments in strict mode"), and puts
the error reporting to (Pre)Parser::ParseIdentifier.

Notes:

- The module feature is so experimental, that I decided to not allow "eval" or
"arguments" as module-related identifiers in the strict mode (even though this
check wasn't there before).

- Unfortunately, there were some inconsistencies, since it was the
responsibility of the caller of ParseIdentifier to check "eval" and "arguments"
and some places didn't have the check for no good reason. This CL is supposed to
keep backward compatibility and *not* introduce any new errors.

- ECMA allows "eval" and "arguments" as labels even in strict mode. (Syntax:
"LabelledStatement: Identifier : Statement", and no strict mode restrictions on
Identifier are listed.)

- Tests which compare error message strings will fail, and need to be updated.

BUG=3126
LOG=N
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/152813005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-05 16:26:48 +00:00
benchmarks Fix bug in nextWeaker function of deltablue benchmark. 2013-10-25 13:21:46 +00:00
build Don't hardcode GCC_VERSION for Xcode in standalone.gypi. 2014-01-23 15:55:20 +00:00
include The current 2014-01-30 10:33:53 +00:00
samples Prepare removal of ObjectTemplate::New without Isolate parameter. 2014-01-08 06:53:31 +00:00
src Make strict more error messages about "eval" and "arguments" less specific. 2014-02-05 16:26:48 +00:00
test Make strict more error messages about "eval" and "arguments" less specific. 2014-02-05 16:26:48 +00:00
tools Temporarily mark reserved-words-as-property as possibly failing. 2014-02-04 13:37:34 +00:00
.clang-format Change clang-format config to allow for two empty lines between functions 2013-12-03 10:39:21 +00:00
.gitignore Migrate to new test status file syntax 2013-09-24 12:08:33 +00:00
AUTHORS Add Opera Software ASA to AUTHORS 2014-01-31 09:18:43 +00:00
ChangeLog Prepare push to trunk. Now working on version 3.24.33. 2014-02-05 03:04:35 +00:00
codereview.settings Add settings for try server. 2013-12-17 12:24:25 +00:00
DEPS Roll gyp 1830:1831 2014-01-08 15:54:46 +00:00
LICENSE Update LICENSE file 2012-01-03 16:38:42 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Fix python path for gyp. 2014-01-31 09:09:43 +00:00
Makefile.android Fix standalone Android and NaCl Makefiles to support arm_version=7 and optdebug 2013-12-16 15:50:34 +00:00
Makefile.nacl Fix standalone Android and NaCl Makefiles to support arm_version=7 and optdebug 2013-12-16 15:50:34 +00:00
OWNERS Add jarin to OWNERS file. 2014-01-23 07:55:58 +00:00
PRESUBMIT.py Revert "Add debug output to presubmit script for investigating tree check behavior." and "Add more temporary debugging output to PRESUBMIT.py". 2014-01-10 15:17:49 +00:00
WATCHLISTS Add myself to a watchlist for the public API. 2013-10-10 11:37:48 +00:00