mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change get{this,inarg,outarg}x? into methods
More idiomatic naming (in particular, matches the naming used for go/types.Signature). Also, convert more code to use these methods and/or IterFields. (Still more to go; only made a quick pass for low hanging fruit.) Passes toolstash -cmp. Change-Id: I61831bfb1ec2cd50d4c7efc6062bca4e0dcf267b Reviewed-on: https://go-review.googlesource.com/20451 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
8df733bd22
commit
db506fe98c
21 changed files with 158 additions and 210 deletions
|
|
@ -1677,7 +1677,7 @@ func Igen(n *Node, a *Node, res *Node) {
|
|||
cgen_callinter(n, nil, 0)
|
||||
}
|
||||
|
||||
fp, _ := IterFields(getoutargx(n.Left.Type))
|
||||
fp, _ := IterFields(n.Left.Type.Results())
|
||||
*a = Node{}
|
||||
a.Op = OINDREG
|
||||
a.Reg = int16(Thearch.REGSP)
|
||||
|
|
@ -2225,7 +2225,7 @@ func stkof(n *Node) int64 {
|
|||
t = t.Type
|
||||
}
|
||||
|
||||
t, _ = IterFields(getoutargx(t))
|
||||
t, _ = IterFields(t.Results())
|
||||
if t != nil {
|
||||
return t.Width + Ctxt.FixedFrameSize()
|
||||
}
|
||||
|
|
@ -2561,7 +2561,7 @@ func cgen_callret(n *Node, res *Node) {
|
|||
t = t.Type
|
||||
}
|
||||
|
||||
fp, _ := IterFields(getoutargx(t))
|
||||
fp, _ := IterFields(t.Results())
|
||||
if fp == nil {
|
||||
Fatalf("cgen_callret: nil")
|
||||
}
|
||||
|
|
@ -2585,7 +2585,7 @@ func cgen_aret(n *Node, res *Node) {
|
|||
t = t.Type
|
||||
}
|
||||
|
||||
fp, _ := IterFields(getoutargx(t))
|
||||
fp, _ := IterFields(t.Results())
|
||||
if fp == nil {
|
||||
Fatalf("cgen_aret: nil")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue