src/cmd/internal/obj/wasm: optimize blocks in wasm binary
This change optimizes the blocks in the wasm binary by generating the entryPointLoop only if it is used and adding an unwindExit block to be able to use the short BrIf instruction for unwinding the stack. These changes were suggested by the wasm-opt tool and reduce the wasm binary size of "hello world" by 1.5%. Change-Id: Ie52db2fa2d9b8482f9a78b7c189231750811fe97 Reviewed-on: https://go-review.googlesource.com/c/go/+/167937 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Showing
Please register or sign in to comment