mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 19:40:29 +00:00
b6bc3e54d0
This CL copies and modifies hash map and set base class `_HashBase` currently shared with the VM, to improve types of the fields. The Wasm struct for hash map and set objects was previously: (type $_HashBase (sub $Object (struct (field $field0 i32) (field $field1 (mut i32)) (field $field2 (mut (ref null $Object))) ;; _index (field $field3 (mut i64)) (field $field4 (mut (ref $Object))) ;; _data (field $field5 (mut i64)) (field $field6 (mut i64))))) Now: (type $_HashBase (sub $Object (struct (field $field0 i32) (field $field1 (mut i32)) (field $field2 (mut (ref $Array<WasmI32>))) ;; _index (field $field3 (mut i64)) (field $field4 (mut (ref $Array<Object?>))) ;; _data (field $field5 (mut i64)) (field $field6 (mut i64))))) _index and _data fields are now non-nullable Wasm arrays. This removes downcasts and one layer of indirection when accessing the elements. In addition, when accessing `_index` this eliminates unboxing the integers. Fixes #54961. Change-Id: I4e6bd5129c7c57f5716ccb23e46060d73ffca217 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354843 Commit-Queue: Ömer Ağacan <omersa@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> |
||
---|---|---|
.. | ||
OWNERS | ||
wasm_sources.gni | ||
wasm_types.dart |