-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm: restrict supported types in go:wasmimport function signatures
Changes the set of types supported in functions declared with the go:wasmimport directive to only allow 32 bits and 64 bits integers and floats, as well as unsafe.Pointer in parameters only. Both the compiler code and the standard library are updated because the new restrictions require modifying the use of go:wasmimport in the syscall and runtime packages. In preparation of enabling packages outside of the standard library to use the go:wasmimport directive, the error messages are modified to carry more context and use ErrorfAt instead of Fatalf to avoid printing the compiler stack trace when a function with an invalid signature is encountered. Fixes #59156 Change-Id: Ied8317f8ead9c28f0297060ac35a5b5255ab49db Reviewed-on: https://go-review.googlesource.com/c/go/+/483415 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Johan Brandhorst-Satzkorn <[email protected]>
- Loading branch information
1 parent
92a3cb9
commit 53c0158
Showing
4 changed files
with
106 additions
and
73 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
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.