diff options
| author | David Chase <drchase@google.com> | 2023-04-25 19:14:05 -0400 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2023-05-11 13:45:40 +0000 |
| commit | 2e93fe0a9f55aaa2a762e7fb454d76b2ee3a4e4f (patch) | |
| tree | 6ad00fee3adb58714aa001ece696eeebeb2b5087 /src/runtime/alg.go | |
| parent | a2838ec5f20b56e94a18c873ab4b68397355e214 (diff) | |
| download | go-2e93fe0a9f55aaa2a762e7fb454d76b2ee3a4e4f.tar.xz | |
runtime: move per-type types to internal/abi
Change-Id: I1f031f0f83a94bebe41d3978a91a903dc5bcda66
Reviewed-on: https://go-review.googlesource.com/c/go/+/489276
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/alg.go')
| -rw-r--r-- | src/runtime/alg.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go index 4eda9d4e75..a1f683f68a 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -167,7 +167,7 @@ func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr { return strhash(p, h) case kindInterface: i := (*interfacetype)(unsafe.Pointer(t)) - if len(i.mhdr) == 0 { + if len(i.Methods) == 0 { return nilinterhash(p, h) } return interhash(p, h) @@ -179,11 +179,11 @@ func typehash(t *_type, p unsafe.Pointer, h uintptr) uintptr { return h case kindStruct: s := (*structtype)(unsafe.Pointer(t)) - for _, f := range s.fields { - if f.name.isBlank() { + for _, f := range s.Fields { + if f.Name.IsBlank() { continue } - h = typehash(f.typ, add(p, f.offset), h) + h = typehash(f.Typ, add(p, f.Offset), h) } return h default: |
