aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objabi
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-03-30 17:55:22 -0400
committerAustin Clements <austin@google.com>2021-03-31 13:52:45 +0000
commitc847932804467f511b0e123cf29b72dd0d509306 (patch)
treef14ba730784e978de68edabdd676aca9b693834b /src/cmd/internal/objabi
parent135c9f45ecaec719bcc297ec9f9f19042bc9adf6 (diff)
downloadgo-c847932804467f511b0e123cf29b72dd0d509306.tar.xz
runtime: replace reflectcall of defers with direct call
With GOEXPERIMENT=regabidefer, all deferred functions take no arguments and have no results (their signature is always func()). Since the signature is fixed, we can replace all of the reflectcalls in the defer code with direct closure calls. For #40724. Change-Id: I3acd6742fe665610608a004c675f473b9d0e65ee Reviewed-on: https://go-review.googlesource.com/c/go/+/306010 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/internal/objabi')
-rw-r--r--src/cmd/internal/objabi/funcid.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/internal/objabi/funcid.go b/src/cmd/internal/objabi/funcid.go
index 6e188e31bb..fa28609e4d 100644
--- a/src/cmd/internal/objabi/funcid.go
+++ b/src/cmd/internal/objabi/funcid.go
@@ -75,6 +75,7 @@ var funcIDs = map[string]FuncID{
"deferreturn": FuncID_wrapper,
"runOpenDeferFrame": FuncID_wrapper,
"reflectcallSave": FuncID_wrapper,
+ "deferCallSave": FuncID_wrapper,
}
// Get the function ID for the named function in the named file.