Skip to content

Commit

Permalink
cmd/compile: minor cleanup in mapinit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
josharian committed Aug 24, 2016
1 parent 41943d9 commit 5bddca6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cmd/compile/internal/gc/sinit.go
Expand Up @@ -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)
Expand Down

0 comments on commit 5bddca6

Please sign in to comment.