]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] internal/buildcfg: enable defer/go wrapping everywhere
authorCherry Mui <cherryyz@google.com>
Thu, 20 May 2021 22:03:49 +0000 (18:03 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 24 May 2021 22:07:39 +0000 (22:07 +0000)
commitdcaf785add683fdda9bd0e53395c17c55779a8ac
tree3634d66351e1bd1df4083441a7484bc5b9dfaf6e
parentf6427426787b292ec28cfd826615e3ae9a66b54a
[dev.typeparams] internal/buildcfg: enable defer/go wrapping everywhere

For register ABI, we wrap deferred/go'd function with arguments
or results in an argumentless closure, so the runtime can call the
function without knowing how to marshal the arguments, or
reserving frame for arguments and results.

The wrapping mechanism works everywhere, regardless of whether the
register ABI is used. And wrapping will simplify the compiler and
runtime's implementation for defer and go calls. For example, the
compiler will not need to marshal arguments for defer/go calls,
the opendefer metadata will not need to contain argument
information, and _defer record will be fixed-sized.

Enable wrapping everywhere.

Change-Id: I2032ba87249ceb686310dc640fb00696669ae912
Reviewed-on: https://go-review.googlesource.com/c/go/+/321958
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/internal/buildcfg/exp.go