]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: fix potential closure waste in Order
authorRuss Cox <rsc@golang.org>
Mon, 7 Dec 2020 21:07:38 +0000 (16:07 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2020 03:49:57 +0000 (03:49 +0000)
commita997543292df533f5951cd8fda39692a44077151
treefd8f402c200c4f44e62e8911c89605f84512266d
parent578fbbe3aa5cada6e32b686d71a5832d6ca846dc
[dev.regabi] cmd/compile: fix potential closure waste in Order

I haven't measured this, but it's the only use of EditChildren
where we aren't careful to allocate a closure once and use it
for the whole recursion. This one is allocating a closure at
every level of the recursion, and it was an oversight that it
wasn't cleaned up in the original CL.

Passes buildall w/ toolstash -cmp.

Change-Id: I5e3f1795c6f64c5867a19c077f797643aa1066a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/277914
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/order.go