v8/test/unittests
Hai Dang 5f8a42727d Reland "[interpreter] Add bytecode for leading array spreads."
This is a reland of 1c48d52bb1.

It turned out that IterableToList doesn't always behave according to
the ES operation with the same name. Specifically, it allows holey arrays
to take its fast path, which produces an output array with holes where
actually "undefined" elements should appear.

This CL changes the version of IterableToList that is used for spreads
(IterableToListWithSymbolLookup) such that holey arrays take the slow path.
It also includes tests for such situations.

Original change's description:
> [interpreter] Add bytecode for leading array spreads.
>
> This CL improves the performance of creating [...a, b] or [...a].
> If the array literal has a leading spread, this CL emits the bytecode
> [CreateArrayFromIterable] to create the literal. CreateArrayFromIterable
> is implemented by [IterableToListDefault] builtin to create the initial
> array for the leading spread. IterableToListDefault has a fast path to
> clone efficiently if the spread is an actual array.
>
> The bytecode generated is now shorter. Bytecode generation is refactored
> into to BuildCreateArrayLiteral, which allows VisitCallSuper to benefit
> from this optimization also.
> For now, turbofan also lowers the bytecode to the builtin.
>
> The idiomatic use of [...a] to clone the array a now performs better
> than a simple for-loop, but still does not match the performance of slice.
>
> Bug: v8:7980
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ibde659c82d3c7aa1b1777a3d2f6426ac8cc15e35
> Reviewed-on: https://chromium-review.googlesource.com/1181024
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Commit-Queue: Hai Dang <dhai@google.com>
> Cr-Commit-Position: refs/heads/master@{#55520}

Bug: v8:7980
Change-Id: I0b5603a12d2b588327658bf0a9b214bd0f22e237
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1201882
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55639}
2018-09-05 09:29:51 +00:00
..
api [api][runtime] Support all-in ctors of {Named,Indexed}PropertyHandlerConfiguration 2018-08-15 21:28:09 +00:00
asmjs [scanner] Go back to untemplatized scanning with buffering 2018-08-21 10:52:52 +00:00
assembler PPC/s390: Reland "[turboassembler] Introduce hard-abort mode" 2018-08-08 14:41:22 +00:00
base [ptr-compr] Introduce RegionAllocator and respective unittests. 2018-08-30 14:33:42 +00:00
compiler [turbofan] Cleanup JSFunction and NativeContext serialization. 2018-09-03 08:15:10 +00:00
compiler-dispatcher [cleanup] Split off api-inl.h from api.h to make latter self contained 2018-07-23 16:03:49 +00:00
heap [heap] Record UMA for Scavenger sub phases 2018-09-04 18:57:11 +00:00
interpreter Reland "[interpreter] Add bytecode for leading array spreads." 2018-09-05 09:29:51 +00:00
libplatform [V8 Platform] Better WorkerThreads APIs. 2018-04-30 19:05:40 +00:00
parser [cleanup] Split off api-inl.h from api.h to make latter self contained 2018-07-23 16:03:49 +00:00
torque [torque] add unittest for Earley parser 2018-07-24 14:01:33 +00:00
wasm [wasm] Fix ordering check of exception section. 2018-09-04 14:45:14 +00:00
zone Fix a bug in ZoneChunkList::Find() at chunk boundaries. 2018-08-22 09:37:41 +00:00
allocation-unittest.cc [heap] Add a read-only permission 2018-04-17 08:26:43 +00:00
bigint-unittest.cc Reland: [cleanup] Refactor the Factory 2018-04-09 19:52:22 +00:00
BUILD.gn [ptr-compr] Introduce RegionAllocator and respective unittests. 2018-08-30 14:33:42 +00:00
cancelable-tasks-unittest.cc Make CancelableTask ids unique 2017-08-02 16:10:42 +00:00
char-predicates-unittest.cc Use ICU for ID_START, ID_CONTINUE and WhiteSpace check 2017-06-14 20:32:49 +00:00
code-stub-assembler-unittest.cc Make CallInterfaceDescriptor isolate-independent 2018-06-18 15:55:53 +00:00
code-stub-assembler-unittest.h [csa] Add constant folding more universally to CodeAssembler operators 2017-09-12 10:03:10 +00:00
counters-unittest.cc [callbacks] Properly support RCS for ApiAccessors and Callbacks. 2018-08-15 15:25:14 +00:00
DEPS Move unit tests to test/unittests. 2014-10-01 08:34:25 +00:00
detachable-vector-unittest.cc [cleanup] Replace List with std::vector in api. 2017-09-28 09:32:18 +00:00
eh-frame-iterator-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
eh-frame-writer-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
locked-queue-unittest.cc Add lock-based unbounded queue 2015-11-18 10:54:13 +00:00
object-unittest.cc [cleanup] Split off api-inl.h from api.h to make latter self contained 2018-07-23 16:03:49 +00:00
register-configuration-unittest.cc [Turbofan] Add concept of FP register aliasing on ARM 32. 2016-10-26 16:04:33 +00:00
run-all-unittests.cc [cleanup] use unique_ptr for the DefaultPlatform 2017-11-14 09:57:18 +00:00
source-position-table-unittest.cc Decouple SourcePositionTableBuilder from Zone 2017-11-21 12:56:13 +00:00
strings-storage-unittest.cc Extend hash seed to 64 bits 2018-07-16 11:19:42 +00:00
test-helpers.cc [sfi] Remove SFI function identifier field 2018-07-19 09:07:11 +00:00
test-helpers.h [unittests] Add TestWithIsolate::RunJS helper method 2017-11-13 14:27:51 +00:00
test-utils.cc [callbacks] Properly support RCS for ApiAccessors and Callbacks. 2018-08-15 15:25:14 +00:00
test-utils.h [callbacks] Properly support RCS for ApiAccessors and Callbacks. 2018-08-15 15:25:14 +00:00
testcfg.py [test] Remove dead code from suites and tests 2018-02-01 14:12:49 +00:00
unicode-unittest.cc Consolidate UTF-8 Vector<char> to uc16 decoding into Iterator 2018-02-20 20:04:41 +00:00
unittests.status [heap] Fix SpacesTest.WriteBarrierFromHeapObject 2018-07-26 11:17:14 +00:00
utils-unittest.cc [turbofan] Add --trace-turbo-filter 2018-05-16 09:33:15 +00:00
value-serializer-unittest.cc Remove unnecessary 'size' argument from TYPED_ARRAYS macro. 2018-07-31 12:29:13 +00:00