Commit 3eb16c05 authored by David Chase's avatar David Chase

cmd/compile: repair GOSSAFUNC functionality

GOSSAFUNC=foo had previously only done printing for the
single function foo, and didn't quite clean up after itself
properly. Changes ensures that Config.HTML != nil iff
GOSSAFUNC==name-of-current-function.

Change-Id: I255e2902dfc64f715d93225f0d29d9525c06f764
Reviewed-on: https://go-review.googlesource.com/29250
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: 's avatarKeith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ad7732a9
......@@ -26,6 +26,7 @@ func initssa() *ssa.Config {
ssaConfig.Set387(Thearch.Use387)
}
}
ssaConfig.HTML = nil
return ssaConfig
}
......@@ -71,11 +72,6 @@ func buildssa(fn *Node) *ssa.Func {
s.config.HTML = ssa.NewHTMLWriter("ssa.html", s.config, name)
// TODO: generate and print a mapping from nodes to values and blocks
}
defer func() {
if !printssa {
s.config.HTML.Close()
}
}()
// Allocate starting block
s.f.Entry = s.f.NewBlock(ssa.BlockPlain)
......@@ -4298,6 +4294,7 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
removevardef(ptxt)
f.Config.HTML.Close()
f.Config.HTML = nil
}
type FloatingEQNEJump struct {
......
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