]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow more types for wasmimport/wasmexport parameters and results
authorCherry Mui <cherryyz@google.com>
Fri, 8 Nov 2024 17:43:06 +0000 (12:43 -0500)
committerCherry Mui <cherryyz@google.com>
Mon, 11 Nov 2024 17:11:50 +0000 (17:11 +0000)
commit5a9aeef9d54321702253257eb983d7a0cc1d97bf
treed3b8c5c88e831fac35f7c5bd4196e2d20d8e1804
parent583d750fa119d504686c737be6a898994b674b69
cmd/compile: allow more types for wasmimport/wasmexport parameters and results

As proposed on #66984, this CL allows more types to be used as
wasmimport/wasmexport function parameters and results.
Specifically, bool, string, and uintptr are now allowed, and also
pointer types that point to allowed element types. Allowed element
types includes sized integer and floating point types (including
small integer types like uint8 which are not directly allowed as
a parameter type), bool, array whose element type is allowed, and
struct whose fields are allowed element type and also include a
struct.HostLayout field.

For #66984.

Change-Id: Ie5452a1eda21c089780dfb4d4246de6008655c84
Reviewed-on: https://go-review.googlesource.com/c/go/+/626615
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssagen/abi.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/wasm/wasmobj.go
src/cmd/link/internal/wasm/asm.go
test/wasmexport2.go