mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
cb9bf93078
commit
e1e66a03a6
13 changed files with 104 additions and 82 deletions
|
|
@ -140,7 +140,7 @@ func IsExported(t Type) bool {
|
|||
}
|
||||
|
||||
func ResolveReflectName(s string) {
|
||||
resolveReflectName(newName(s, "", false))
|
||||
resolveReflectName(newName(s, "", false, false))
|
||||
}
|
||||
|
||||
type Buffer struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue