[strong] Implement static restrictions on binding/assignment to 'undefined'
authorconradw <conradw@chromium.org>
Fri, 10 Apr 2015 12:04:51 +0000 (05:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 12:04:55 +0000 (12:04 +0000)
commit8ef7159582dde933c71a7c6d73b6e936cf42a5cb
treef7d7e32c9e23bbd52b6497a4aea6ab679bd702e7
parentfd0556efa0fa3c2b851477e8ac9c1b8e9948ead7
[strong] Implement static restrictions on binding/assignment to 'undefined'
identifier. Delete unused (and now incorrect) function IsValidStrictVariable.

Implements the strong mode proposal's static restrictions on the use of the
identifier 'undefined'. Assumes these restrictions are intended to be identical
to the restrictions on the use of 'eval' and 'arguments' in strict mode. The
AllowEvalOrArgumentsAsIdentifier enum has been renamed to
AllowRestrictedIdentifiers as logic involving it is now also used for this case.

BUG=v8:3956

LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27744}
src/ast-value-factory.h
src/messages.js
src/parser.cc
src/parser.h
src/preparser.cc
src/preparser.h
test/cctest/test-parsing.cc
test/mjsunit/strong/undefined.js [new file with mode: 0644]