From 2e93fe0a9f55aaa2a762e7fb454d76b2ee3a4e4f Mon Sep 17 00:00:00 2001 From: David Chase Date: Tue, 25 Apr 2023 19:14:05 -0400 Subject: 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 Reviewed-by: Keith Randall Run-TryBot: David Chase TryBot-Result: Gopher Robot --- src/runtime/alg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/alg.go') 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: -- cgit v1.3