mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 18:31:32 +00:00
fd954d426f
If the literals are * empty: call function with zero arguments * non-empty: call function taking `WasmArray<Object?>` => This avoids making a call for each element we add. Reorganize the map/set mixins: * pull out the `createIndex` into it's own mixin * make mutable set/map implementations use that mixin * remove compiler-knowledge about how to create hash mask (instead set the hashmask field in `_createIndex()`) => Function creating map/set from `WasmArray<Object?>` can create index => Allows the above Outline functions (for now only for list/map/set literal creation functions): * Often many call sites use literals with instantiated types * Make outlined functions that will populate those instantiated types and forward the arguments This turns e.g. `<A, B>{}` (if `A`/`B` are instantiated, e.g. `int`) global.get A global.get B call _WasmDefaultMap._default into call createEmpty<A, B> createEmpty<A, B>: global.get A global.get B call _WasmDefaultMap._default All together this * reduces flute size by a bit more than 0.5% * makes some benchmarks faster Change-Id: I13c7e6060470d74769a3d49816671aceb2cd3aab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356500 Reviewed-by: Ömer Ağacan <omersa@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com> |
||
---|---|---|
.. | ||
js_dev_runtime | ||
js_runtime | ||
js_shared | ||
sdk_library_metadata | ||
vm | ||
vm_shared/lib | ||
wasm | ||
wasm_js_compatibility/lib | ||
allowed_experiments.json | ||
fix_data.yaml |