Commit f0e347b1 authored by Joe Tsai's avatar Joe Tsai Committed by Joe Tsai

Revert "cmd/compile: cleanup toolstash hacks from previous CL"

This partially reverts commit 01bf5cc2.

For unknown reasons, this CL was causing an internal test to allocate
1.2GB when it used to allocate less than 300MB.

Change-Id: I41d767781e0ae9e43bf670e2a186ee074821eca4
Reviewed-on: https://go-review.googlesource.com/31674Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b7c79498
...@@ -248,6 +248,10 @@ func ishairy(n *Node, budget *int32, reason *string) bool { ...@@ -248,6 +248,10 @@ func ishairy(n *Node, budget *int32, reason *string) bool {
} }
(*budget)-- (*budget)--
// TODO(mdempsky): Hack to appease toolstash; remove.
if n.Op == OSTRUCTKEY {
(*budget)--
}
return *budget < 0 || ishairy(n.Left, budget, reason) || ishairy(n.Right, budget, reason) || return *budget < 0 || ishairy(n.Left, budget, reason) || ishairy(n.Right, budget, reason) ||
ishairylist(n.List, budget, reason) || ishairylist(n.Rlist, budget, reason) || ishairylist(n.List, budget, reason) || ishairylist(n.Rlist, budget, reason) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment