v8/test
littledan e5ff10d767 Implement sloppy-mode block-defined functions (Annex B 3.3)
ES2015 specifies very particular semantics for functions defined in blocks.
In strict mode, it is simply a lexical binding scoped to that block. In sloppy
mode, in addition to that lexical binding, there is a var-style binding in
the outer scope, which is overwritten with the local binding when the function
declaration is evaluated, *as long as* introducing ths var binding would not
create a var/let conflict in the outer scope.

This patch implements the semantics by introducing a DelegateStatement, which
is initially filled in with the EmptyStatement and overwritten with the
assignment when the scope is closed out and it can be checked that there is
no conflict.

This patch is tested with a new mjsunit test, and I tried staging it and running
test262, finding that the tests that we have disabled due to lack of Annex B
support now pass.

R=adamk,rossberg
LOG=Y
BUG=v8:4285

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

Cr-Commit-Position: refs/heads/master@{#30842}
2015-09-21 04:31:09 +00:00
..
benchmarks [test] Key variant flags by variant name everywhere. 2015-07-29 07:14:30 +00:00
cctest [heap] Cleanup: Align naming of parallel sweeping with parallel compaction. 2015-09-18 10:49:20 +00:00
intl Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
js-perf-test Remove on-by-default flag --harmony-object 2015-09-18 18:37:57 +00:00
memory Correctly name memory stat for context snapshot size. 2015-04-10 22:36:02 +00:00
message Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
mjsunit Implement sloppy-mode block-defined functions (Annex B 3.3) 2015-09-21 04:31:09 +00:00
mozilla Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
preparser [test] Key variant flags by variant name everywhere. 2015-07-29 07:14:30 +00:00
promises-aplus Remove unnecessary coupling between Promise tests and Object.observe 2015-07-21 17:17:07 +00:00
simdjs Remove on-by-default flag --harmony-object 2015-09-18 18:37:57 +00:00
test262 Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
test262-es6 Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00
unittests [turbofan] Get rid of type lower bounds. 2015-09-16 11:55:43 +00:00
webkit Reland "[test] Fix cctest path separators on Windows" 2015-09-17 13:01:12 +00:00