v8/test
Daniel Ehrenberg d54ffadfda [scopes] Fix sloppy-mode block-scoped function hoisting edge case
In edge cases such as the following, sloppy-mode block-scoped function
hoisting is expected to occur:

  eval(`
    with({a: 1}) {
      function a() {}
    }
  `)

In this case, there should be the equivalent of a var declaration
outside of the eval, which gets set to the value of the local function
a when the body of the with is executed.

Previously, the way that var declarations are hoisted out of eval
meant that the assignment to that var was an ordinary DYNAMIC_GLOBAL
assignment. However, such a lookup mode meant that the object in the
with scope received the assignment!

This patch fixes that error by marking the assignments produced by
the sloppy mode block scoped function hoisting desugaring so as to
generate a different runtime call which skips with scopes.

Bug: chromium:720247, v8:5135
Change-Id: Ie36322ddc9ca848bf680163e8c016f50d4597748
Reviewed-on: https://chromium-review.googlesource.com/529230
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46116}
2017-06-22 08:18:55 +00:00
..
benchmarks Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
cctest [scopes] Fix sloppy-mode block-scoped function hoisting edge case 2017-06-22 08:18:55 +00:00
common [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
debugger [debugger] removed BreakPositionAlignment.STATEMENT_ALIGNED 2017-06-20 15:01:47 +00:00
fuzzer [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
inspector [inspector] expose module variables for Debugger.evaluateOnCallFrame method 2017-06-14 14:58:12 +00:00
intl Add COMPONENT tags to OWNERS files where appropriate 2017-05-22 10:15:28 +00:00
js-perf-test [inspector] added simple js-perf-test for inspector 2017-06-20 10:32:05 +00:00
memory
message [parser] Better error msg for destructuring non iterable 2017-06-19 17:44:21 +00:00
mjsunit [scopes] Fix sloppy-mode block-scoped function hoisting edge case 2017-06-22 08:18:55 +00:00
mkgrokdump Fix compilation failure due to overload of virtual function 2017-05-24 21:19:48 +00:00
mozilla [parser] Treat \ufffe as non-whitespace. 2017-06-20 16:44:51 +00:00
preparser
promises-aplus
test262 [test262] Remove outdated SKIPs from status file. 2017-06-21 14:59:47 +00:00
unittests [scopes] Fix sloppy-mode block-scoped function hoisting edge case 2017-06-22 08:18:55 +00:00
wasm-spec-tests PPC/S390: Disable skip-stack-guard-page.js test in simulator build 2017-06-12 15:49:52 +00:00
webkit Use ICU for ID_START, ID_CONTINUE and WhiteSpace check 2017-06-14 20:32:49 +00:00
bot_default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
bot_default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
BUILD.gn [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
optimize_for_size.gyp
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00