]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add setNodeSeq, and use it in bimport.go
authorIan Lance Taylor <iant@golang.org>
Thu, 3 Mar 2016 22:11:17 +0000 (14:11 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 3 Mar 2016 22:28:00 +0000 (22:28 +0000)
commitca56c590d4dfaa655d2355b382d6a950911f3263
treeebbebec643ea1f29ad82bbb03a78dd83adc7a264
parentd55a099e220ae2d1d9cee861e9750b9f92fcb4fe
cmd/compile: add setNodeSeq, and use it in bimport.go

Also rewrite bexport.go to use nodeSeqIterate.

The new setNodeSeq is a transitional generic function to set either a
NodeList or a slice to either a NodeList or a slice.  This should permit
us to flip fields from *NodeList to []*Node, or Nodes, without changing
other code.

Passes toolstash -cmp.

Change-Id: I872cbfe45bc5f432595737c1f6da641c502b1ab6
Reviewed-on: https://go-review.googlesource.com/20194
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/typecheck.go