v8/test/cctest/interpreter
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
..
bytecode_expectations [destructuring] Get non-coercible message contents in runtime 2019-01-10 15:23:05 +00:00
bytecode-expectations-printer.cc [objects.h splitting] Move HeapNumber to heap-number.h 2018-12-17 17:58:09 +00:00
bytecode-expectations-printer.h [ubsan] Port Name/String/Symbol to the new design 2018-11-27 01:42:36 +00:00
generate-bytecode-expectations.cc Remove bytecode expectations for do expressions 2018-12-07 08:26:45 +00:00
interpreter-tester.cc [reland] Don't allocate feedback vectors and feedback metadata in lite mode 2018-12-19 14:29:30 +00:00
interpreter-tester.h [reland] Don't allocate feedback vectors and feedback metadata in lite mode 2018-12-19 14:29:30 +00:00
source-position-matcher.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
source-position-matcher.h Use source position table for unoptimized code. 2016-06-28 05:52:52 +00:00
test-bytecode-generator.cc [intepreter] Make bytecode mismatch failures more verbose 2019-01-08 12:58:15 +00:00
test-interpreter-intrinsics.cc [cleanup] Remove a lot of dead intrinsics/runtime functions. 2018-09-20 12:48:57 +00:00
test-interpreter.cc Workaround VS/UCRT fmod bug 2018-12-19 18:05:18 +00:00
test-source-positions.cc [cleanup] Refactor TestCaseData to use delete 2018-09-12 07:54:35 +00:00