]> Cypherpunks repositories - gostls13.git/commit
runtime: replace reflectcall of defers with direct call
authorAustin Clements <austin@google.com>
Tue, 30 Mar 2021 21:55:22 +0000 (17:55 -0400)
committerAustin Clements <austin@google.com>
Wed, 31 Mar 2021 13:52:45 +0000 (13:52 +0000)
commitc847932804467f511b0e123cf29b72dd0d509306
treef14ba730784e978de68edabdd676aca9b693834b
parent135c9f45ecaec719bcc297ec9f9f19042bc9adf6
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>
src/cmd/internal/objabi/funcid.go
src/runtime/panic.go