mirror of
https://github.com/golang/go
synced 2024-11-19 23:44:43 -07:00
cmd/compile: simplify check for pointers in map bucket
Change-Id: Ie5e977c54f50274421962a7ca268ae71a6f19cef Reviewed-on: https://go-review.googlesource.com/60050 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
54125d191d
commit
2548d36c86
@ -157,7 +157,7 @@ func mapbucket(t *types.Type) *types.Type {
|
||||
// the type of the overflow field to uintptr in this case.
|
||||
// See comment on hmap.overflow in ../../../../runtime/hashmap.go.
|
||||
otyp := types.NewPtr(bucket)
|
||||
if !types.Haspointers(t.Val()) && !types.Haspointers(t.Key()) && t.Val().Width <= MAXVALSIZE && t.Key().Width <= MAXKEYSIZE {
|
||||
if !types.Haspointers(valtype) && !types.Haspointers(keytype) {
|
||||
otyp = types.Types[TUINTPTR]
|
||||
}
|
||||
overflow := makefield("overflow", otyp)
|
||||
|
Loading…
Reference in New Issue
Block a user