]> Cypherpunks repositories - gostls13.git/commit
internal/abi: define EmptyInterface, TypeOf, and NoEscape
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 22 Mar 2024 21:42:02 +0000 (21:42 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 17 Apr 2024 21:09:59 +0000 (21:09 +0000)
commit4742c52e101ecf4aacebe5148a1cb172bdadb1d4
tree7e405c1591233beaca9c0e75d945e9386183001c
parent2073b35e07ce9cea47ee1fbe763b304d2371954f
internal/abi: define EmptyInterface, TypeOf, and NoEscape

This change defines two commonly-defined functions and a
commonly-defined type in internal/abi to try and deduplicate some
definitions. This is motivated by a follow-up CL which will want access
to TypeOf in yet another package.

There still exist duplicate definitions of all three of these things in
the runtime, and this CL doesn't try to handle that yet. There are far
too many uses in the runtime to handle manually in a way that feels
comfortable; automated refactoring will help.

For #62483.

Change-Id: I02fc64a28f11af618f6071f94d27f45c135fa8ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/573955
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
src/internal/abi/escape.go [new file with mode: 0644]
src/internal/abi/iface.go
src/internal/abi/type.go
src/internal/reflectlite/type.go
src/internal/reflectlite/value.go
src/reflect/type.go
src/reflect/value.go
src/strings/builder.go