cmd/compile: don't mutate shared nodes in orderinit
A few gc.Node ops may be shared across functions. The compiler is (mostly) already careful to avoid mutating them. However, from a concurrency perspective, replacing (say) an empty list with an empty list still counts as a mutation. One place this occurs is orderinit. Avoid it. This requires fixing one spot where shared nodes were mutated. It doesn't result in any functional or performance changes. Passes toolstash-check. Updates #15756 Change-Id: I63c93b31baeeac62d7574804acb6b7f2bc9d14a9 Reviewed-on: https://go-review.googlesource.com/39196 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Showing
Please register or sign in to comment