Wasm compilation of int
#59936
Labels
area-dart2wasm
Issues for the dart2wasm compiler.
type-question
A question about expected behavior or functionality
When compiling Dart to wasm, numeric types are compiled as
JSNumber
:https://dart.dev/interop/js-interop/js-types
However, wasm has two different native types 64-bit numerical types, i64 and f64:
https://webassembly.github.io/gc/core/syntax/types.html
When Dart is compiled to native code,
int
is compiled as a 64-bit int, rather than a Javascript-compatible 52-bit integer type packed into anumber
.Why does Dart not compile
int
toi64
on wasm? In other words, why is there not aWASMi64
type and aWASMf64
type, rather than justJSNumber
?The text was updated successfully, but these errors were encountered: