]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: len(n.List.Slice()) -> n.List.Len()
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 3 Apr 2017 02:12:19 +0000 (19:12 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 3 Apr 2017 02:22:17 +0000 (02:22 +0000)
Minor cleanup.

This is the only such instance in the compiler.

Change-Id: I4e8ecde57d71867c7e1ac4d17e2154a91dd262b0
Reviewed-on: https://go-review.googlesource.com/39209
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>

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

index 365cd69d4484ca854b46c162bca46fe6814cb4f5..6011f0c0c4c3e458320ee1e167e854f507a27e5f 100644 (file)
@@ -927,7 +927,7 @@ func maplit(n *Node, m *Node, init *Nodes) {
        nerr := nerrors
 
        a := nod(OMAKE, nil, nil)
-       a.List.Set2(typenod(n.Type), nodintconst(int64(len(n.List.Slice()))))
+       a.List.Set2(typenod(n.Type), nodintconst(int64(n.List.Len())))
        litas(m, a, init)
 
        // count the initializers