cmd/compile: rewrite code to omit many nodeSeq calls

This CL was automatically generated using a special-purpose AST
rewriting tool, followed by manual editing to put some comments back in
the right places and fix some bad line breaks.

The result is not perfect but it's a big step toward getting back to
sanity, and because it was automatically generated there is a decent
chance that it is correct.

Passes toolstash -cmp.

Update #14473.

Change-Id: I01c09078a6d78e2b008bc304d744b79469a38d3d
Reviewed-on: https://go-review.googlesource.com/20440
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-03-08 15:10:26 -08:00
parent db506fe98c
commit 38921b36ba
25 changed files with 794 additions and 811 deletions

View file

@ -26,12 +26,12 @@ func unsafenmagic(nn *Node) *Node {
return nil
}
if nodeSeqLen(args) == 0 {
if args.Len() == 0 {
Yyerror("missing argument for %v", s)
return nil
}
r := nodeSeqFirst(args)
r := args.First()
var v int64
if s.Name == "Sizeof" {
@ -129,7 +129,7 @@ bad:
goto ret
yes:
if nodeSeqLen(args) > 1 {
if args.Len() > 1 {
Yyerror("extra arguments for %v", s)
}