Files
sdk/pkg/dart2wasm
Ömer Sinan Ağacan 76717f2930 [dart2wasm] Make int and double fields immutable
Make the `value` fields of `BoxedInt` and `BoxedDouble` `final`, to
generate immutable Wasm fields for them.

Immutable fields can potentially generate better code, as loads from the
same object will always generate the same value.

To allow making the `value` fields `final`, add a constructor.

To allow adding a constructor, "implement` base classes instead of
extending them. With `extends` the front-end wants us to call the
superclass constructors, even though they don't have any constructors.

This CL does not do the same to `BoxedBool`. We did that in a previous
iteration of the CL[1], but it caused regressions in post-TFA kernels.

[1]: https://dart-review.googlesource.com/c/sdk/+/393320

Change-Id: Ib44c25d09dcd84d999aa1d92dc9c38632454e443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393842
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-11-06 13:06:06 +00:00
..
2024-09-24 10:21:52 +00:00
2024-03-05 16:57:47 +00:00
2024-07-04 09:25:39 +00:00