]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile,runtime,reflect: move embedded bit from offset to name
authorKeith Randall <khr@golang.org>
Tue, 14 Jun 2022 20:38:02 +0000 (13:38 -0700)
committerKeith Randall <khr@google.com>
Tue, 14 Jun 2022 23:22:11 +0000 (23:22 +0000)
commite1e66a03a6bb3210034b640923fa253d7def1a26
tree03dea7b25888433788a5ec80d8cd3cd083a6d96a
parentcb9bf93078c54187f5be9d8a65c81c249d12d3c5
cmd/compile,runtime,reflect: move embedded bit from offset to name

Previously we stole a bit from the field offset to encode whether
a struct field was embedded.

Instead, encode that bit in the name field, where we already have
some unused bits to play with. The bit associates naturally with
the name in any case.

This leaves a full uintptr to specify field offsets. This will make
the fix for #52740 cleaner.

Change-Id: I0bfb85564dc26e8c18101bc8b432f332176d7836
Reviewed-on: https://go-review.googlesource.com/c/go/+/412138
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
13 files changed:
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/link/internal/ld/decodesym.go
src/cmd/link/internal/ld/dwarf.go
src/internal/reflectlite/export_test.go
src/internal/reflectlite/type.go
src/reflect/abi.go
src/reflect/export_test.go
src/reflect/type.go
src/reflect/value.go
src/runtime/alg.go
src/runtime/cgocall.go
src/runtime/syscall_windows.go
src/runtime/type.go