mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: clean up ONEW node
The list is no longer needed and can be deleted. Doing so reduces the inlining cost of any function containing an explicit call to new by 1 point, so this change is not toolstash -cmp safe. Change-Id: Id29e115d68e466a353708ab4b8c1021e9c85a628 Reviewed-on: https://go-review.googlesource.com/c/go/+/274132 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
b7f67b75d2
commit
2bc814cd18
1 changed files with 0 additions and 5 deletions
|
|
@ -1315,11 +1315,6 @@ func typecheck1(n ir.Node, top int) (res ir.Node) {
|
|||
old := n
|
||||
n = ir.NodAt(n.Pos(), l.SubOp(), arg, nil)
|
||||
n = addinit(n, old.Init().Slice()) // typecheckargs can add to old.Init
|
||||
if l.SubOp() == ir.ONEW {
|
||||
// Bug-compatibility with earlier version.
|
||||
// This extra node is unnecessary but raises the inlining cost by 1.
|
||||
n.SetList(old.List())
|
||||
}
|
||||
|
||||
case ir.OCOMPLEX, ir.OCOPY:
|
||||
typecheckargs(n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue