From ea94e5d3c57fadea088cdc5002e014b3c7ef4bc1 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 23 Jul 2021 15:03:00 -0400 Subject: [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 Run-TryBot: Austin Clements TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- src/runtime/asm_amd64.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/asm_amd64.s') diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s index 50ffa30ac5..0f719b2664 100644 --- a/src/runtime/asm_amd64.s +++ b/src/runtime/asm_amd64.s @@ -662,7 +662,7 @@ TEXT ·publicationBarrier(SB),NOSPLIT,$0-0 // compile barrier. RET -// func jmpdefer(fv *funcval, argp uintptr) +// func jmpdefer(fv func(), argp uintptr) // argp is a caller SP. // called from deferreturn. // 1. pop the caller -- cgit v1.3