[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>
This commit is contained in:
Cherry Mui 2021-05-20 18:03:49 -04:00
parent f642742678
commit dcaf785add

View file

@ -29,7 +29,7 @@ var experimentBaseline = goexperiment.Flags{
RegabiWrappers: regabiSupported,
RegabiG: regabiSupported,
RegabiReflect: regabiSupported,
RegabiDefer: regabiSupported,
RegabiDefer: true,
RegabiArgs: regabiSupported,
}
@ -103,7 +103,6 @@ func parseExperiments() goexperiment.Flags {
flags.RegabiWrappers = false
flags.RegabiG = false
flags.RegabiReflect = false
flags.RegabiDefer = false
flags.RegabiArgs = false
}
// Check regabi dependencies.