-
- Downloads
cmd/internal/obj: minor refactor of wasmimport code
This CL does some minor refactoring of the code handling wasmimport. - Put the WasmImport aux reading and writing code together for symmetry. - Define WasmFuncType, embedded in WasmImport. WasmFuncType could also be used (later) for wasmexport. - Move code generation code to a separate function. The containing function is already pretty large. - Simplify linker code a little bit. The loader convention is to return the 0 Sym for nonexistent symbol, instead of a separate boolean. No change in generated code. Passes toolstash -cmp (GOARCH=wasm GOOS=wasip1 go build -toolexec "toolstash -cmp" -a std cmd). Change-Id: Idc2514f84a08621333841ae4034b81130e0ce411 Reviewed-on: https://go-review.googlesource.com/c/go/+/603135 Reviewed-by:Than McIntosh <thanm@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by:
David Chase <drchase@google.com>
Showing
- src/cmd/internal/obj/link.go 94 additions, 20 deletionssrc/cmd/internal/obj/link.go
- src/cmd/internal/obj/objfile.go 8 additions, 5 deletionssrc/cmd/internal/obj/objfile.go
- src/cmd/internal/obj/sym.go 4 additions, 1 deletionsrc/cmd/internal/obj/sym.go
- src/cmd/internal/obj/wasm/wasmobj.go 111 additions, 105 deletionssrc/cmd/internal/obj/wasm/wasmobj.go
- src/cmd/link/internal/loader/loader.go 2 additions, 12 deletionssrc/cmd/link/internal/loader/loader.go
- src/cmd/link/internal/wasm/asm.go 3 additions, 51 deletionssrc/cmd/link/internal/wasm/asm.go
Please register or sign in to comment