v8/test
Benedikt Meurer 6031f172ed [es2015] Use [[ArrayIteratorNextIndex]] to indicate exhaustion.
Instead of changing the [[IteratedObject]] field to undefined to mark an
array iterator as exhausted, store the appropriate maximum value into
the [[ArrayIteratorNextIndex]] field such that the iterator will never
produce any values again.

Without this change the map check and the "length" access on the
[[IteratedObject]] cannot be eliminated inside the loop, since the
object can either be the array or undefined. Even with this change
it's still not possible immediately due to missing aliasing
information in the LoadElimination, but it paves the way for follow
up improvements. Eventually the goal is to have `for..of` as fast as
a traditional `for` loop even for really tight loops.

This CL also hardens the implementation of the ArrayIterator by using
proper CASTs and CSA_ASSERTs. The readability of the CSA builtin was
improved by utilizing proper helper functions.

Bug: v8:7510, v8:7514, v8:8070
Change-Id: Ib46604fadad1a0f80e77fe71a1f47b0ca31ab841
Reviewed-on: https://chromium-review.googlesource.com/1181902
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55261}
2018-08-21 11:26:00 +00:00
..
benchmarks Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
cctest [scanner] Go back to untemplatized scanning with buffering 2018-08-21 10:52:52 +00:00
common [wasm] Add WasmFeatures to enable/detect features 2018-08-09 10:58:22 +00:00
debugger [debug] remove break_id 2018-08-13 08:48:34 +00:00
fuzzer Reland "[wasm] Implement the new API for WebAssembly.instantiateStreaming" 2018-08-14 08:20:19 +00:00
inspector [inspector] added V8InspectorClient::resourceNameToUrl 2018-08-09 21:36:24 +00:00
intl [Intl] Use JSObject with null proto to prevent side effects 2018-08-10 18:37:41 +00:00
js-perf-test [turbofan] Add JSTests for TurboFan 2018-08-20 14:12:13 +00:00
memory [builtins] Add embedded stats to --serialization-statistics 2018-07-05 12:33:26 +00:00
message Reland "[asmjs] Properly validate asm.js heap sizes" 2018-08-21 09:00:04 +00:00
mjsunit [es2015] Use [[ArrayIteratorNextIndex]] to indicate exhaustion. 2018-08-21 11:26:00 +00:00
mkgrokdump Implement global proposal 2018-08-16 11:07:21 +00:00
mozilla Roll ICU to ICU 62.1 2018-07-11 10:24:26 +00:00
preparser Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
test262 Revert "[builtins] Enable Torque Array.prototype.splice" 2018-08-09 07:29:14 +00:00
torque [torque] only expose safe FixedArray allocation 2018-08-13 15:58:17 +00:00
unittests [scanner] Go back to untemplatized scanning with buffering 2018-08-21 10:52:52 +00:00
wasm-spec-tests [wasm] Update spec tests 2018-07-26 09:54:02 +00:00
webkit [test] Bump shards on slow arm64 trybot 2018-08-10 14:22:01 +00:00
BUILD.gn Reland "[test] Add logic to run tests on Android" 2018-08-10 17:56:12 +00:00