v8/test/mjsunit/harmony
keuchel@chromium.org e26093f3d8 Make let/const outside of the extended mode early errors (under harmony flag).
The ES.next drafts require that source code that matches the productions for
let and const bindings outside the extended mode trigger early syntax
errors. This CL adapts the parser / preparser accordingly under the harmony
scoping flag.

Summary:
* Harmony scoping flag not set: Old semantics allowing const in classic mode
with function level scope. Const binding in strict mode and let bindings in
classic and strict mode trigger early syntax errors.
* Harmony scoping is set: Use new harmony const and let in
extended mode and old const in classic mode. This is to preserve
compatibility with current web pages that already use
non-standard implementations of const. An early syntax error is
thrown on const in strict mode and on let in classic and strict
mode.

This depends on:
http://codereview.chromium.org/8562002/

TEST=mjsunit/harmony/block-early-errors.js

Review URL: http://codereview.chromium.org/8564001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 06:38:04 +00:00
..
block-conflicts.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-early-errors.js Make let/const outside of the extended mode early errors (under harmony flag). 2011-11-29 06:38:04 +00:00
block-for.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-lazy-compile.js Preliminary code for block scopes and block contexts. 2011-08-11 16:29:28 +00:00
block-leave.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-let-crankshaft.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-let-declaration.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-let-semantics.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
block-scoping.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
collections.js Fix Harmony sets and maps to allow undefined as keys. 2011-11-03 14:33:58 +00:00
debug-blockscopes.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
debug-evaluate-blockscopes.js Introduce extended mode. 2011-11-24 15:17:04 +00:00
proxies-example-membrane.js A more holistic test case for proxies. 2011-11-10 16:24:43 +00:00
proxies-for.js Implement for-in loop for proxies. 2011-10-24 15:56:18 +00:00
proxies-function.js Fixing test cases for correct assertSame. 2011-11-10 15:48:07 +00:00
proxies-hash.js Implement Harmony sets and maps. 2011-10-25 14:14:56 +00:00
proxies.js Fix instanceof a function proxy. 2011-11-10 13:39:22 +00:00
typeof.js Implement Harmony semantics for typeof null (behind a flag). 2011-08-10 12:12:06 +00:00