Commit 8caf21da authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarRobert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 3d90378d
...@@ -3003,7 +3003,8 @@ func (s *state) call(n *Node, k callKind) *ssa.Value { ...@@ -3003,7 +3003,8 @@ func (s *state) call(n *Node, k callKind) *ssa.Value {
// Make a PFUNC node out of that, then evaluate it. // Make a PFUNC node out of that, then evaluate it.
// We get back an SSA value representing &sync.(*Mutex).Unlock·f. // We get back an SSA value representing &sync.(*Mutex).Unlock·f.
// We can then pass that to defer or go. // 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.Class = PFUNC
n2.Pos = fn.Pos n2.Pos = fn.Pos
n2.Type = Types[TUINT8] // dummy type for a static closure. Could use runtime.funcval if we had it. n2.Type = Types[TUINT8] // dummy type for a static closure. Could use runtime.funcval if we had it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment