mirror of
https://github.com/golang/go
synced 2024-11-18 03:54:50 -07:00
cmd/compile: use newnamel in ssa.go
For concurrency safety. Passes toolstash-check. Updates #15756. Change-Id: I1caca231a962781ff8f4f589b2e0454d2820ffb6 Reviewed-on: https://go-review.googlesource.com/39192 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
3d90378df5
commit
8caf21da47
@ -3003,7 +3003,8 @@ func (s *state) call(n *Node, k callKind) *ssa.Value {
|
||||
// Make a PFUNC node out of that, then evaluate it.
|
||||
// We get back an SSA value representing &sync.(*Mutex).Unlock·f.
|
||||
// We can then pass that to defer or go.
|
||||
n2 := newname(fn.Sym)
|
||||
n2 := newnamel(fn.Pos, fn.Sym)
|
||||
n2.Name.Curfn = s.curfn
|
||||
n2.Class = PFUNC
|
||||
n2.Pos = fn.Pos
|
||||
n2.Type = Types[TUINT8] // dummy type for a static closure. Could use runtime.funcval if we had it.
|
||||
|
Loading…
Reference in New Issue
Block a user