]> Cypherpunks repositories - gostls13.git/commit
internal/abi: move direct/indirect flag from Kind to TFlag
authorKeith Randall <khr@golang.org>
Sun, 15 Jun 2025 00:06:20 +0000 (17:06 -0700)
committerKeith Randall <khr@golang.org>
Tue, 29 Jul 2025 21:03:07 +0000 (14:03 -0700)
commitf7d167fe710501f687fad006125f4ec60be42c35
treeed14eba23207066ceb629427f65220671d80fb98
parente0b07dc22eaab1b003d98ad6d63cdfacc76c5c70
internal/abi: move direct/indirect flag from Kind to TFlag

This info makes more sense in the flags instead of as a high
bit of the kind. This makes kind access simpler because we now
don't need to mask anything.

Cleaned up most direct field accesses to use methods instead.
(reflect making new types is the only remaining direct accessor.)

IfaceIndir -> !IsDirectIface everywhere.

gocore has been updated to handle the new location. So has delve.
TODO: any other tools need updating?

Change-Id: I123f97a4d4bdd0bff1641ee7e276d1cc0bd7e8eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/681936
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
29 files changed:
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/test/inl_test.go
src/cmd/link/internal/ld/decodesym.go
src/internal/abi/type.go
src/internal/reflectlite/export_test.go
src/internal/reflectlite/value.go
src/internal/runtime/maps/map.go
src/reflect/abi.go
src/reflect/badlinkname.go
src/reflect/export_noswiss_test.go
src/reflect/map_swiss.go
src/reflect/type.go
src/reflect/value.go
src/runtime/alg.go
src/runtime/arena.go
src/runtime/cgocall.go
src/runtime/debuglog.go
src/runtime/error.go
src/runtime/export_debug_test.go
src/runtime/export_test.go
src/runtime/heapdump.go
src/runtime/mbitmap.go
src/runtime/mfinal.go
src/runtime/pinner.go
src/runtime/plugin.go
src/runtime/race.go
src/runtime/syscall_windows.go
src/runtime/type.go
src/runtime/typekind.go [deleted file]