1
0
mirror of https://github.com/golang/go synced 2024-09-25 15:20:13 -06:00

cmd/compile: minor cleanup in mapinit

Change-Id: I7d58d200f7e8b2c0a6e35371da0dafd9b44e9057
Reviewed-on: https://go-review.googlesource.com/26757
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-06-20 08:34:39 -07:00
parent 41943d9639
commit 5bddca64a8

View File

@ -974,13 +974,14 @@ func maplit(ctxt int, n *Node, m *Node, init *Nodes) {
val = temp(m.Type.Val())
}
setlineno(r.Left)
a = Nod(OAS, key, r.Left)
setlineno(index)
a = Nod(OAS, key, index)
a = typecheck(a, Etop)
a = walkstmt(a)
init.Append(a)
setlineno(r.Right)
a = Nod(OAS, val, r.Right)
setlineno(value)
a = Nod(OAS, val, value)
a = typecheck(a, Etop)
a = walkstmt(a)
init.Append(a)