]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] runtime: use func() for deferred functions
authorAustin Clements <austin@google.com>
Fri, 23 Jul 2021 19:03:00 +0000 (15:03 -0400)
committerAustin Clements <austin@google.com>
Fri, 30 Jul 2021 18:49:41 +0000 (18:49 +0000)
commitea94e5d3c57fadea088cdc5002e014b3c7ef4bc1
tree6bdf36c5ced4fb4ff263f20f454410f2a0cb2c40
parent4480e3b11ab6dcd8d4c6a1e87388f573ff49f429
[dev.typeparams] runtime: use func() for deferred functions

Prior to regabi, a deferred function could have any signature, so the
runtime always manipulated them as funcvals. Now, a deferred function
is always func(). Hence, this CL makes the runtime's manipulation of
deferred functions more type-safe by using func() directly instead of
*funcval.

Change-Id: Ib55f38ed49107f74149725c65044e4690761971d
Reviewed-on: https://go-review.googlesource.com/c/go/+/337650
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/asm_amd64.s
src/runtime/asm_riscv64.s
src/runtime/heapdump.go
src/runtime/panic.go
src/runtime/runtime2.go
src/runtime/stubs.go