Skip to content
Snippets Groups Projects
  • Cherry Mui's avatar
    03e5d83c
    cmd/internal/obj: minor refactor of wasmimport code · 03e5d83c
    Cherry Mui authored
    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: default avatarThan McIntosh <thanm@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: default avatarDavid Chase <drchase@google.com>
    03e5d83c
    History
    cmd/internal/obj: minor refactor of wasmimport code
    Cherry Mui authored
    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: default avatarThan McIntosh <thanm@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: default avatarDavid Chase <drchase@google.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.