This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
Int64
as a wrapper around int
On AOT, JIT, and Wasm we don't need to emulate 64-bit integers as the `int` type is already 64 bits. This PR adds another implementation of `Int64` that is just a wrapper around `int`: class Int64 implements IntX { final int _i; ... } `int64` library imports this implementation in VM and dart2wasm, and the old (emulated) `Int64` implementation on dart2js. The conditional import is implemented based on availability of the library `dart:html`, which is only available on dart2js. (In principle dart2wasm could support `dart:html` as well, but it won't be supported, instead dart2wasm will support `package:web`) Documentations of `Int64` and its members are copied directly from the old emulated `Int64` class to make sure the documentation will look the same as before. The old `toRadixStringUnsigned` implementation is moved to the utilities library and reused in the new class.
- Loading branch information