]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add a dowidth call to convas
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 28 Mar 2017 19:10:38 +0000 (12:10 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 7 Apr 2017 22:00:54 +0000 (22:00 +0000)
This dowidth currently happens during AST to SSA conversion.
As such, it is a concurrency pinch point.
It's a bit silly, but do it here in walk instead.
This appears (fingers crossed) to be the last
unresolved dowidth concurrency problem.

Updates #15756

Change-Id: I87cbf718a14ad21aca74586003d79320cca75953
Reviewed-on: https://go-review.googlesource.com/39994
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/walk.go

index 7a8becb35a4dd0346632f92143954668c8b18184..4c06fe5e6c9e880289bb02fe1520fbd966d86e84 100644 (file)
@@ -2127,6 +2127,7 @@ func convas(n *Node, init *Nodes) *Node {
                n.Right = assignconv(n.Right, lt, "assignment")
                n.Right = walkexpr(n.Right, init)
        }
+       dowidth(n.Right.Type)
 
 out:
        updateHasCall(n)