mirror of
https://github.com/golang/go.git
synced 2025-11-01 01:00:56 +00:00
[dev.regabi] cmd/compile: remove CallExpr.Rargs
Instead, push the temps assignments to init. This does not pass toolstash, since when before this, the temps were evaluated after function callee, now we evaluate them before. Change-Id: Icb9cb10e036925b56c1ef3eec468416a11f4932f Reviewed-on: https://go-review.googlesource.com/c/go/+/284894 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
19a6db6b63
commit
fd9a391cdd
4 changed files with 8 additions and 48 deletions
|
|
@ -535,15 +535,15 @@ func walkCall1(n *ir.CallExpr, init *ir.Nodes) {
|
|||
if mayCall(arg) {
|
||||
// assignment of arg to Temp
|
||||
tmp := typecheck.Temp(param.Type)
|
||||
a := convas(ir.NewAssignStmt(base.Pos, tmp, arg), init)
|
||||
a := convas(typecheck.Stmt(ir.NewAssignStmt(base.Pos, tmp, arg)).(*ir.AssignStmt), init)
|
||||
tempAssigns = append(tempAssigns, a)
|
||||
// replace arg with temp
|
||||
args[i] = tmp
|
||||
}
|
||||
}
|
||||
|
||||
n.Args = tempAssigns
|
||||
n.Rargs = args
|
||||
init.Append(tempAssigns...)
|
||||
n.Args = args
|
||||
}
|
||||
|
||||
// walkDivMod walks an ODIV or OMOD node.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue