From: Keith Randall Date: Tue, 27 Oct 2015 17:15:02 +0000 (-0700) Subject: [dev.ssa] cmd/compile: give GetClosurePtr pointer type X-Git-Tag: go1.7beta1~1623^2^2~125 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=129261ae834fa27307f0ed0363b5f719147f2378;p=gostls13.git [dev.ssa] cmd/compile: give GetClosurePtr pointer type If the closure pointer gets spilled, we need to spill it with pointer type to make stack copy and GC happy. Change-Id: Ic108748e6b9caecd45522141f02c9422567376e3 Reviewed-on: https://go-review.googlesource.com/16363 Run-TryBot: Keith Randall Reviewed-by: David Chase --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 96c9a5fc9c..d4001146b6 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -2335,7 +2335,7 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value { return s.newValue2(ssa.OpAddPtr, p.Type, p, s.constIntPtr(Types[TUINTPTR], n.Xoffset)) case OCLOSUREVAR: return s.newValue2(ssa.OpAddPtr, Ptrto(n.Type), - s.entryNewValue0(ssa.OpGetClosurePtr, Types[TUINTPTR]), + s.entryNewValue0(ssa.OpGetClosurePtr, Ptrto(Types[TUINT8])), s.constIntPtr(Types[TUINTPTR], n.Xoffset)) case OPARAM: p := n.Left