v8/test
Peter Marshall c7c0e110f5 [typedarray] Use fast path for Float32Array.from(float_64_array) and similar
Currently, because the source float_64_array has an iterator, it hits
the code in the "check_iterator" section of TypedArrayFrom which calls
IterableToList. This builds a temporary PACKED_ELEMENTS array (and boxes
all of the numeric values as HeapNumbers), then uses this as the source
array.

This patch checks if the source array is a TypedArray, and if the iterator
is the built-in one (where we know the iterator's behaviour). If both are
true then it bypasses the creation of this temporary array and uses the
original TypedArray as the source.

This allows it to take advantage of the existing fast code for copying one
typed array to another.

R=hablich@chromium.org, petermarshall@chromium.org

Bug: chromium:884671
Change-Id: I19a944c9d6d5d07699c7dc3ad7196fc871200b62
Reviewed-on: https://chromium-review.googlesource.com/c/1297312
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57022}
2018-10-26 09:47:46 +00:00
..
benchmarks [test] Share resource-fetching logic with all d8 test cases 2018-08-29 17:51:43 +00:00
cctest [cpu-profiler] Enable Issue1398 test which has been fixed 2018-10-26 08:34:53 +00:00
common [wasm] Use getter for WasmResult::value 2018-10-19 14:32:02 +00:00
debugger [test] Skip slow tests on arm simulators 2018-10-17 08:52:47 +00:00
fuzzer [wasm][fuzzer] Enforce input size limit 2018-10-25 15:57:29 +00:00
inspector [tools] Move path-specific try-builders to the CQ config 2018-10-24 13:52:21 +00:00
intl [Intl] Add "position" to the return of next() 2018-10-24 18:25:41 +00:00
js-perf-test Extend Array.from micro-benchmarks. 2018-10-24 14:17:51 +00:00
memory [snapshot] Add tracking for read-only snapshot size. 2018-10-23 13:34:13 +00:00
message [parser] Token-range-check for callable identifier tokens 2018-10-17 10:21:44 +00:00
mjsunit [typedarray] Use fast path for Float32Array.from(float_64_array) and similar 2018-10-26 09:47:46 +00:00
mkgrokdump [cleanup] Cleanup IMMORTAL_IMMOVABLE_ROOT_LIST 2018-10-09 09:05:37 +00:00
mozilla [test] Add more test suites to Android testing 2018-09-07 09:53:15 +00:00
preparser [test] Share resource-fetching logic with all d8 test cases 2018-08-29 17:51:43 +00:00
test262 [d8] only add arguments object if arguments are provided 2018-10-23 11:46:53 +00:00
torque [torque] add test for loop that only exits from the middle 2018-10-24 10:05:42 +00:00
unittests [wasm] Store WasmEngine in NativeModule 2018-10-25 14:18:01 +00:00
wasm-js Reland "[wasm] Add a new wasm-js testsuite to run js-api tests" 2018-10-18 20:18:55 +00:00
wasm-spec-tests [wasm] Update wasm spec tests 2018-10-23 08:57:08 +00:00
webkit [class] Ship instance and static public class fields 2018-10-18 18:14:52 +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