forked from WebAssembly/JS-BigInt-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spec] Normative: Add i64<->BigInt conversion in JS API
With this patch, BigInts have support for bidirectionally converting to 64-bit integer WebAssembly values, which appears as - Parameters and return values to exported WebAssembly functions - Parameters and return values to host functions - Imported and exported globals BigInts can be read or written from WebAssembly memory using the BigInt proposal's BigInt64Array or BigUint64Array; no additional support is needed. This patch includes basic conformance tests in jsapi.js, which tests that the conversion is done properly in the six cases listed above. I don't know of any Wasm implementation that attempts to implement this specification, so I converted most of the test to be against i32 and saw that converted version pass on V8 (this process helped work out a few silly test bugs). Closes WebAssembly/design#1172
- Loading branch information
Showing
2 changed files
with
979 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.