mirror of
https://github.com/golang/go
synced 2024-11-18 18:14:43 -07:00
cmd/compile: use dereference boundedness hint in ssa.addr
Follow-up to (and similar to) CL 228885. Triggers a handful of times in std+cmd. Change-Id: Ie04057ca3974ef9eef669335e326a5ed4b7472cc Reviewed-on: https://go-review.googlesource.com/c/go/+/228999 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
4e550bdacd
commit
f8ff12d480
@ -4638,12 +4638,12 @@ func (s *state) addr(n *Node) *ssa.Value {
|
||||
return s.newValue2(ssa.OpPtrIndex, types.NewPtr(n.Left.Type.Elem()), a, i)
|
||||
}
|
||||
case ODEREF:
|
||||
return s.exprPtr(n.Left, false, n.Pos)
|
||||
return s.exprPtr(n.Left, n.Bounded(), n.Pos)
|
||||
case ODOT:
|
||||
p := s.addr(n.Left)
|
||||
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset, p)
|
||||
case ODOTPTR:
|
||||
p := s.exprPtr(n.Left, false, n.Pos)
|
||||
p := s.exprPtr(n.Left, n.Bounded(), n.Pos)
|
||||
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset, p)
|
||||
case OCLOSUREVAR:
|
||||
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset,
|
||||
|
Loading…
Reference in New Issue
Block a user