]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove -f flag
authorMatthew Dempsky <mdempsky@google.com>
Sat, 27 Oct 2018 00:46:36 +0000 (17:46 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 27 Oct 2018 02:10:07 +0000 (02:10 +0000)
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>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/subr.go

index 68aac8b99ece90e20803ae7e1b94285183fb6e90..3d7011aafd0f2bf0c0879571576393a9edcab6e7 100644 (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.IntVar(&genDwarfInline, "gendwarfinl", 2, "generate DWARF inline info records")
        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.Flagfn1("importmap", "add `definition` of the form source=actual to import map", addImportMap)
        objabi.Flagfn1("importcfg", "read import configuration from `file`", readImportCfg)
@@ -478,9 +477,6 @@ func Main(archInit func(*Arch)) {
        finishUniverse()
 
        typecheckok = true
-       if Debug['f'] != 0 {
-               frame(1)
-       }
 
        // Process top-level declarations in phases.
 
index 65271df360a6bf05df1825b122e82ff6564d298b..e655d437f5217b7d2e20c8615ffe6329e01166f0 100644 (file)
@@ -5239,9 +5239,6 @@ func genssa(f *ssa.Func, pp *Progs) {
        }
 
        defframe(&s, e)
-       if Debug['f'] != 0 {
-               frame(0)
-       }
 
        f.HTMLWriter.Close()
        f.HTMLWriter = nil
index 8e643e6690a5b636c7acb44e124c37474804e949..68803b65df6799ac03797cfcfec2f16b25f88a8a 100644 (file)
@@ -954,36 +954,6 @@ func typehash(t *types.Type) uint32 {
        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
 // calls and sets the n.HasCall flag if so.
 func updateHasCall(n *Node) {