]> Cypherpunks repositories - gostls13.git/commit
reflect: make Value.IsZero not escape
authorCherry Mui <cherryyz@google.com>
Fri, 7 Oct 2022 22:11:10 +0000 (18:11 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 12 May 2023 21:13:39 +0000 (21:13 +0000)
commit3e19dc2b237339420fc7e97a2766710a68ac29c2
treebeb6242e6f086f24a4eda9386618aee5f85f061f
parentbe4fe08b57b3365f3f5db2e2def296904557442d
reflect: make Value.IsZero not escape

With CL 408826 reflect.Value not always escape. IsZero still
escapes the Value because in some cases it passes the Value
pointer to the equal function, which is function pointer. Equal
functions are compiler generated and never escapes, but the escape
analysis doesn't know. Add noescape to help.

Change-Id: Ica397c2be77cac9e8a46d03d70bac385b0aa9e82
Reviewed-on: https://go-review.googlesource.com/c/go/+/441937
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/reflect/value.go