-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[js-api] Allow creating i64 globals #827
Comments
Given that BigInt is already relatively far along, I wonder if it would make sense to make this change together with the WebAssembly i64/BigInt integration proposal. This could leave the world with fewer states in the compatibility matrix to worry about. Anyway, @rossberg 's proposal doesn't seem so bad to me. |
BigInt support is not going to be in 1.0. This suggestion is to tweak what we ship in 1.0, so not gonna change the size of the matrix. |
If WebAssembly has already shipped to the web without this feature, it's part of the matrix even if the 1.0 document already includes the feature. |
The Global constructor has not shipped in most browsers yet. |
This issue has been closed by #829. During WebAssembly/meetings#268, we discussed about coercing values to/from i64 for function exports and globals but It's not covered by #829. |
Right, closing this. Allowing coercions is a separate question. |
The JS API does not yet support i64 for functions or globals because JS cannot represent int64.
However, there is no reason to disallow creating WebAssembly.Global instances of type i64. It is sufficient to disallow accessing them from JS through the getter and setter. After all, such objects can already be created indirectly by exporting an i64 global from a module.
I hence suggest the following relaxations:
That way, a Global of type i64 can be created in JS but only with a default initialisation value.
Motivation: It is problematic for a generic linker, mocker or other module-level abstractions if they cannot externally create every possible export object (even if unusable in JS).
The text was updated successfully, but these errors were encountered: