]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove forceObjFileStability
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 6 Apr 2017 22:14:08 +0000 (15:14 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 6 Apr 2017 22:25:19 +0000 (22:25 +0000)
The textual import/export format is ancient history.

Change-Id: Iebe90bfd9bd3074eb191186d86e5f4286ce3b1f3
Reviewed-on: https://go-review.googlesource.com/39850
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/reflect.go

index 1663555b1251cded5d4e62a16e8c35ede14a7b5e..960037da750c0649c8d70b0f6c4555b2740f70c5 100644 (file)
@@ -133,12 +133,6 @@ import (
 // (suspected) format errors, and whenever a change is made to the format.
 const debugFormat = false // default: false
 
-// forceObjFileStability enforces additional constraints in export data
-// and other parts of the compiler to eliminate object file differences
-// only due to the choice of export format.
-// TODO(gri) disable and remove once there is only one export format again
-const forceObjFileStability = true
-
 // Current export format version. Increase with each format change.
 // 4: type name objects support type aliases, uses aliasTag
 // 3: Go1.8 encoding (same as version 2, aliasTag defined but never used)
@@ -979,7 +973,7 @@ func parName(f *Field, numbered bool) string {
        // Functions that can be inlined use numbered parameters so we can distinguish them
        // from other names in their context after inlining (i.e., the parameter numbering
        // is a form of parameter rewriting). See issue 4326 for an example and test case.
-       if forceObjFileStability || numbered {
+       if numbered {
                if !strings.Contains(name, "·") && f.Nname != nil && f.Nname.Name != nil && f.Nname.Name.Vargen > 0 {
                        name = fmt.Sprintf("%s·%d", name, f.Nname.Name.Vargen) // append Vargen
                }
index 815086777a22880abcfbcfd1089c31aff1a5b660..2ba24572093bc67a4aabe7b9186f9e1e849c57c5 100644 (file)
@@ -1501,11 +1501,6 @@ func dumptypestructs() {
        }
 
        // generate import strings for imported packages
-       if forceObjFileStability {
-               // Sorting the packages is not necessary but to compare binaries created
-               // using textual and binary format we sort by path to reduce differences.
-               sort.Sort(pkgByPath(pkgs))
-       }
        for _, p := range pkgs {
                if p.Direct {
                        dimportpath(p)