cmd/compile: remove conditional code dealing with two export formats

This removes some scaffolding introduced pre-1.7, introduced to
fix an export format bug, and to minimize conflicts with older
formats. The currently deployed and recognized format is "v1",
so don't worry about other versions. This is a step towards a
better scheme for internal export format versioning.

For #16244.

Change-Id: Ic7cf99dd2a24ad5484cc54aed44fa09332c2cf72
Reviewed-on: https://go-review.googlesource.com/27205
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
This commit is contained in:
Robert Griesemer 2016-08-16 17:32:54 -07:00
parent f50ced6d73
commit 074d6a649c
3 changed files with 11 additions and 33 deletions

View file

@ -153,13 +153,9 @@ const debugFormat = false // default: false
// TODO(gri) disable and remove once there is only one export format again
const forceObjFileStability = true
// Supported export format versions.
// Current export format version.
// TODO(gri) Make this more systematic (issue #16244).
const (
exportVersion0 = "v0"
exportVersion1 = "v1"
exportVersion = exportVersion1
)
const exportVersion = "v1"
// exportInlined enables the export of inlined function bodies and related
// dependencies. The compiler should work w/o any loss of functionality with
@ -734,14 +730,7 @@ func (p *exporter) typ(t *Type) {
p.paramList(sig.Recvs(), inlineable)
p.paramList(sig.Params(), inlineable)
p.paramList(sig.Results(), inlineable)
// for issue #16243
// We make this conditional for 1.7 to avoid consistency problems
// with installed packages compiled with an older version.
// TODO(gri) Clean up after 1.7 is out (issue #16244)
if exportVersion == exportVersion1 {
p.bool(m.Nointerface)
}
p.bool(m.Nointerface) // record go:nointerface pragma value (see also #16243)
var f *Func
if inlineable {