Passes go build -a -toolexec 'toolstash -cmp' std.
Change-Id: Ica62765d3c1ef052afed34da1b3ac3f80646cc55
Reviewed-on: https://go-review.googlesource.com/14318
Reviewed-by: Dave Cheney <dave@cheney.net>
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
var exportlist []*Node
-var importlist *NodeList // imported functions and methods with inlinable bodies
+var importlist []*Node // imported functions and methods with inlinable bodies
var funcsyms *NodeList
$2.Func.Inl = $3;
funcbody($2);
- importlist = list(importlist, $2);
+ importlist = append(importlist, $2);
if Debug['E'] > 0 {
fmt.Printf("import [%q] func %v \n", importpkg.Path, $2)
if Debug['l'] > 1 {
// Typecheck imported function bodies if debug['l'] > 1,
// otherwise lazily when used or re-exported.
- for l := importlist; l != nil; l = l.Next {
- if l.N.Func.Inl != nil {
+ for _, n := range importlist {
+ if n.Func.Inl != nil {
saveerrors()
- typecheckinl(l.N)
+ typecheckinl(n)
}
}
yyDollar[2].node.Func.Inl = yyDollar[3].list
funcbody(yyDollar[2].node)
- importlist = list(importlist, yyDollar[2].node)
+ importlist = append(importlist, yyDollar[2].node)
if Debug['E'] > 0 {
fmt.Printf("import [%q] func %v \n", importpkg.Path, yyDollar[2].node)