v8/test
Leszek Swirski 5e2c23e2d3 [destructuring] Get non-coercible message contents in runtime
For desrtucturing assignments from null/undefined, we throw an error
that references the destructuring object literal's property name, e.g.
for
  var { x } = null;
we report that we cannot destructure 'x' from null.

Rather than calculating this property during bytecode generation (and
including it in the bytecode as an argument to the type error
constructor), we can calculate it at exception throwing time, by
re-parsing the source in a similar way to the existing call site
rendering.

This slightly decreases bytecode size and slightly decreases the amount
of work the bytecode compiler needs to do. In the future, it could also
allow us to give more detailed error messages, as we now have access to
the entire AST and are on the slow path anyway.

Bug: v8:6499
Change-Id: Icdbd4667db548b4e5e62ef97797a3771b5c1bf72
Reviewed-on: https://chromium-review.googlesource.com/c/1396080
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58706}
2019-01-10 15:23:05 +00:00
..
benchmarks [Test] CSuite benchmark runner 2018-12-21 13:15:57 +00:00
cctest [destructuring] Get non-coercible message contents in runtime 2019-01-10 15:23:05 +00:00
common [objects.h splitting] Move HeapNumber to heap-number.h 2018-12-17 17:58:09 +00:00
debugger [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
fuzzer [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
inspector [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
intl [Intl] Fix getting undefined property crash 2019-01-10 00:59:53 +00:00
js-perf-test Revert "[test] add perf tests for String.p.startsWith" 2019-01-10 12:34:51 +00:00
memory [snapshot] Remove the builtins snapshot 2018-10-31 10:18:28 +00:00
message [destructuring] Get non-coercible message contents in runtime 2019-01-10 15:23:05 +00:00
mjsunit [ignition] Fix iteration finalization exception suppression 2019-01-10 11:29:12 +00:00
mkgrokdump [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
mozilla Revert "[runtime] Reduce spread/apply call max arguments" 2018-11-30 09:54:47 +00:00
preparser [test] Share resource-fetching logic with all d8 test cases 2018-08-29 17:51:43 +00:00
test262 [Intl] Remove skipped tests depend on stable sort 2019-01-08 19:11:47 +00:00
torque [nojit] Change builtin pointers to use Smis underneath 2018-12-17 15:35:59 +00:00
unittests [ubsan] Fix various cases of undefined behavior 2019-01-10 13:52:04 +00:00
wasm-js [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
wasm-spec-tests [nojit] Don't allocate executable memory in jitless mode 2019-01-10 10:55:48 +00:00
webkit Fixed typos 2019-01-08 07:31:02 +00:00
BUILD.gn Reland "[wasm] Add a new wasm-js testsuite to run js-api tests" 2018-10-18 20:18:55 +00:00