v8/test
Benedikt Meurer 1287688ca7 [turbofan] Inline Map and Set iterators into optimized code.
This CL inlines the following builtins into TurboFan

  - %MapIteratorPrototype%.next
  - %SetIteratorPrototype%.next

following the design that we are using for Array iteration already
(different instance types for the different kinds of iterators). Details
can be found in the relevant design document at:

  https://docs.google.com/document/d/13z1fvRVpe_oEroplXEEX0a3WK94fhXorHjcOMsDmR-8

The key to great performance here is to ensure that the inlined code
allows escape analysis and scalar replacement of aggregates to remove
the allocations for the iterator itself as well as the iterator results
and potential key/value arrays in the simple case of a for-of loop (and
by extension also in other constructs that reduce to for-of loops
internally), i.e.:

  const s = new Set;
  // ... do something with s
  for (const x of s) {
    // ...
  }

Here the for-of loop shouldn't perform any allocations of helper
objects.

Drive-by-fix: Replace the ExistsJSMapWithness in JSBuiltinReducer with a more
general HasInstanceTypeWitness, similar to what's in JSCallReducer. Also
migrate the {Map,Set}.prototype.size getter inlining to the
JSBuiltinReducer, so that everything is in a single place.

R=jgruber@chromium.org

Bug: v8:6344, v8:6571, chromium:740122
Change-Id: I09cb506fe26ed3e10d7dcb2f95ec4415e639582d
Reviewed-on: https://chromium-review.googlesource.com/570159
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46655}
2017-07-14 07:02:00 +00:00
..
benchmarks Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
cctest [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
common Revert "[wasm] Don't store global handles in the interpreter" 2017-07-13 11:04:36 +00:00
debugger [cleanup] Remove always-off support for tail calls 2017-07-13 19:29:05 +00:00
fuzzer [wasm] [fuzzer] Also test validation 2017-07-11 13:43:32 +00:00
inspector [Interpreter] Replace --ignition flag with a --stress-fullcodegen 2017-07-13 13:05:00 +00:00
intl [tests] Fix timezone dependence in an intl test 2017-07-12 12:23:22 +00:00
js-perf-test Add js-perf-test to exercise v8_inspector::String16 2017-07-13 00:22:02 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
mjsunit [turbofan] Inline Map and Set iterators into optimized code. 2017-07-14 07:02:00 +00:00
mkgrokdump Fix compilation failure due to overload of virtual function 2017-05-24 21:19:48 +00:00
mozilla [test] Fix test status file simulator_run not evaluate to boolean error 2017-06-28 21:32:19 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Make test262 test runner check for which exception is thrown 2016-03-14 21:20:37 +00:00
test262 [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
unittests [cleanup] Remove always-off support for tail calls 2017-07-13 19:29:05 +00:00
wasm-spec-tests [wasm][x64] Add an additional stack check for functions with big frames 2017-07-13 13:43:04 +00:00
webkit [runtime] Create only one instance of %ThrowTypeError%. 2017-07-10 08:26:02 +00:00
bot_default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
bot_default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
BUILD.gn [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00