1
0
mirror of https://github.com/golang/go synced 2024-11-07 10:46:18 -07:00

cmd/compile: remove -f flag

This is supposed to print out function stack frames, but it's been
broken since golang.org/cl/38593, and no one has noticed.

Change-Id: Iad428a9097d452b878b1f8c5df22afd6f671ac2e
Reviewed-on: https://go-review.googlesource.com/c/145199
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2018-10-26 17:46:36 -07:00
parent 7ec3b5e81f
commit c68e3bcb03
3 changed files with 0 additions and 37 deletions

View File

@ -205,7 +205,6 @@ func Main(archInit func(*Arch)) {
flag.BoolVar(&Ctxt.Flag_locationlists, "dwarflocationlists", true, "add location lists to DWARF in optimized mode") flag.BoolVar(&Ctxt.Flag_locationlists, "dwarflocationlists", true, "add location lists to DWARF in optimized mode")
flag.IntVar(&genDwarfInline, "gendwarfinl", 2, "generate DWARF inline info records") flag.IntVar(&genDwarfInline, "gendwarfinl", 2, "generate DWARF inline info records")
objabi.Flagcount("e", "no limit on number of errors reported", &Debug['e']) objabi.Flagcount("e", "no limit on number of errors reported", &Debug['e'])
objabi.Flagcount("f", "debug stack frames", &Debug['f'])
objabi.Flagcount("h", "halt on error", &Debug['h']) objabi.Flagcount("h", "halt on error", &Debug['h'])
objabi.Flagfn1("importmap", "add `definition` of the form source=actual to import map", addImportMap) objabi.Flagfn1("importmap", "add `definition` of the form source=actual to import map", addImportMap)
objabi.Flagfn1("importcfg", "read import configuration from `file`", readImportCfg) objabi.Flagfn1("importcfg", "read import configuration from `file`", readImportCfg)
@ -478,9 +477,6 @@ func Main(archInit func(*Arch)) {
finishUniverse() finishUniverse()
typecheckok = true typecheckok = true
if Debug['f'] != 0 {
frame(1)
}
// Process top-level declarations in phases. // Process top-level declarations in phases.

View File

@ -5239,9 +5239,6 @@ func genssa(f *ssa.Func, pp *Progs) {
} }
defframe(&s, e) defframe(&s, e)
if Debug['f'] != 0 {
frame(0)
}
f.HTMLWriter.Close() f.HTMLWriter.Close()
f.HTMLWriter = nil f.HTMLWriter = nil

View File

@ -954,36 +954,6 @@ func typehash(t *types.Type) uint32 {
return binary.LittleEndian.Uint32(h[:4]) return binary.LittleEndian.Uint32(h[:4])
} }
func frame(context int) {
if context != 0 {
fmt.Printf("--- external frame ---\n")
for _, n := range externdcl {
printframenode(n)
}
return
}
if Curfn != nil {
fmt.Printf("--- %v frame ---\n", Curfn.Func.Nname.Sym)
for _, ln := range Curfn.Func.Dcl {
printframenode(ln)
}
}
}
func printframenode(n *Node) {
w := int64(-1)
if n.Type != nil {
w = n.Type.Width
}
switch n.Op {
case ONAME:
fmt.Printf("%v %v G%d %v width=%d\n", n.Op, n.Sym, n.Name.Vargen, n.Type, w)
case OTYPE:
fmt.Printf("%v %v width=%d\n", n.Op, n.Type, w)
}
}
// updateHasCall checks whether expression n contains any function // updateHasCall checks whether expression n contains any function
// calls and sets the n.HasCall flag if so. // calls and sets the n.HasCall flag if so.
func updateHasCall(n *Node) { func updateHasCall(n *Node) {