]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: cleanups from C transition and delete dead code
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 17 Apr 2015 16:36:19 +0000 (09:36 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 17 Apr 2015 17:28:17 +0000 (17:28 +0000)
Change-Id: Id1ecad2565edd5937a764dcf56b89263353f47c2
Reviewed-on: https://go-review.googlesource.com/8947
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/cmd/internal/obj/fmt.go
src/cmd/internal/obj/go.go

index b1936ef1aef0c56492b602afd48789ae3cdb8d83..1268f426a5aeac19ed1c69c350be1916599b14e0 100644 (file)
 package obj
 
 const (
-       FmtWidth    = 1
-       FmtLeft     = FmtWidth << 1
-       FmtPrec     = FmtLeft << 1
-       FmtSharp    = FmtPrec << 1
-       FmtSpace    = FmtSharp << 1
-       FmtSign     = FmtSpace << 1
-       FmtApost    = FmtSign << 1
-       FmtZero     = FmtApost << 1
-       FmtUnsigned = FmtZero << 1
-       FmtShort    = FmtUnsigned << 1
-       FmtLong     = FmtShort << 1
-       FmtVLong    = FmtLong << 1
-       FmtComma    = FmtVLong << 1
-       FmtByte     = FmtComma << 1
-       FmtLDouble  = FmtByte << 1
-       FmtFlag     = FmtLDouble << 1
+       FmtWidth = 1 << iota
+       FmtLeft
+       FmtPrec
+       FmtSharp
+       FmtSpace
+       FmtSign
+       FmtApost
+       FmtZero
+       FmtUnsigned
+       FmtShort
+       FmtLong
+       FmtVLong
+       FmtComma
+       FmtByte
+       FmtLDouble
+       FmtFlag
 )
index 3d6ba85ba1b204a1a5b4fb6d0adf720416247d7f..24ed07f94d0a074d1f1299e983b1f3485a9469ae 100644 (file)
@@ -6,16 +6,16 @@ package obj
 
 import (
        "fmt"
-       "math"
        "os"
        "strings"
 )
 
 // go-specific code shared across loaders (5l, 6l, 8l).
 
-var Framepointer_enabled int
-
-var Fieldtrack_enabled int
+var (
+       Framepointer_enabled int
+       Fieldtrack_enabled   int
+)
 
 // Toolchain experiments.
 // These are controlled by the GOEXPERIMENT environment
@@ -51,15 +51,6 @@ func init() {
        }
 }
 
-// replace all "". with pkg.
-func Expandpkg(t0 string, pkg string) string {
-       return strings.Replace(t0, `"".`, pkg+".", -1)
-}
-
-func double2ieee(ieee *uint64, f float64) {
-       *ieee = math.Float64bits(f)
-}
-
 func Nopout(p *Prog) {
        p.As = ANOP
        p.Scond = 0
@@ -76,53 +67,6 @@ func Nocache(p *Prog) {
        p.To.Class = 0
 }
 
-/*
- *     bv.c
- */
-
-/*
- *     closure.c
- */
-
-/*
- *     const.c
- */
-
-/*
- *     cplx.c
- */
-
-/*
- *     dcl.c
- */
-
-/*
- *     esc.c
- */
-
-/*
- *     export.c
- */
-
-/*
- *     fmt.c
- */
-
-/*
- *     gen.c
- */
-
-/*
- *     init.c
- */
-
-/*
- *     inl.c
- */
-
-/*
- *     lex.c
- */
 func Expstring() string {
        buf := "X"
        for i := range exper {