[dev.regabi] cmd/compile: fix ICE during ir.Dump
fmt.go:dumpNodeHeader uses reflection to call all "func() bool"-typed methods on Nodes during printing, but the OnStack method that I added in CL 283233 isn't meant to be called on non-variables. dumpNodeHeader does already guard against panics, as happen in some other accessors, but not against Fatalf, as I was using in OnStack. So simply change OnStack to use panic too. Thanks to drchase@ for the report. Change-Id: I0cfac84a96292193401a32fc5e7fd3c48773e008 Reviewed-on: https://go-review.googlesource.com/c/go/+/284074 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Loading
Please sign in to comment