Skip to content

Commit f0e347b

Browse files
committed
Revert "cmd/compile: cleanup toolstash hacks from previous CL"
This partially reverts commit 01bf5cc. 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/31674 Reviewed-by: Matthew Dempsky <[email protected]> Run-TryBot: Joe Tsai <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent b7c7949 commit f0e347b

File tree

1 file changed

+4
-0
lines changed
  • src/cmd/compile/internal/gc

1 file changed

+4
-0
lines changed

src/cmd/compile/internal/gc/inl.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ func ishairy(n *Node, budget *int32, reason *string) bool {
248248
}
249249

250250
(*budget)--
251+
// TODO(mdempsky): Hack to appease toolstash; remove.
252+
if n.Op == OSTRUCTKEY {
253+
(*budget)--
254+
}
251255

252256
return *budget < 0 || ishairy(n.Left, budget, reason) || ishairy(n.Right, budget, reason) ||
253257
ishairylist(n.List, budget, reason) || ishairylist(n.Rlist, budget, reason) ||

0 commit comments

Comments
 (0)