]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: minor cleanup in mapinit
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 20 Jun 2016 15:34:39 +0000 (08:34 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 24 Aug 2016 01:37:44 +0000 (01:37 +0000)
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>
src/cmd/compile/internal/gc/sinit.go

index f6ff9069996d50f5f71e12512aaae4f25233bbe0..e073a5fad4e49dea3c2c4d8394c8aac6032e30e6 100644 (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)