Commit 391cc54d authored by Håvard Haugen's avatar Håvard Haugen Committed by Dave Cheney

cmd/compile: make importlist a []*Node instead of *NodeList

Passes go build -a -toolexec 'toolstash -cmp' std.

Change-Id: Ica62765d3c1ef052afed34da1b3ac3f80646cc55
Reviewed-on: https://go-review.googlesource.com/14318Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 8937780c
......@@ -589,7 +589,7 @@ var externdcl *NodeList
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
......
......@@ -2038,7 +2038,7 @@ hidden_import:
$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)
......
......@@ -423,10 +423,10 @@ func Main() {
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)
}
}
......
......@@ -3241,7 +3241,7 @@ yydefault:
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment