mirror of
https://github.com/golang/go
synced 2024-11-18 22:55:23 -07:00
go/gcimporter15: update to match latest changes to cmd/compiler exporter
Backport of https://go-review.googlesource.com/27814 changes to bexport.go. With this, the gcimporter15 is again up-to-date and in sync with both the compiler's export code, and the compiler's and std lib gcimporter's import code. Change-Id: I8e229660eb78ddc1506b7b96a89c81ff083e0412 Reviewed-on: https://go-review.googlesource.com/27914 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
e545a4ce60
commit
a832035fe5
@ -40,9 +40,8 @@ const debugFormat = false // default: false
|
||||
// If trace is set, debugging output is printed to std out.
|
||||
const trace = false // default: false
|
||||
|
||||
// Current export format version.
|
||||
// Must not start with 'c' or 'd' (initials of prior format).
|
||||
const exportVersion = "version 1"
|
||||
// Current export format version. Increase with each format change.
|
||||
const exportVersion = 1
|
||||
|
||||
// trackAllTypes enables cycle tracking for all types, not just named
|
||||
// types. The existing compiler invariants assume that unnamed types
|
||||
@ -86,7 +85,10 @@ func BExportData(fset *token.FileSet, pkg *types.Package) []byte {
|
||||
}
|
||||
|
||||
// write version info
|
||||
p.rawStringln(exportVersion)
|
||||
// The version string must start with "version %d" where %d is the version
|
||||
// number. Additional debugging information may follow after a blank; that
|
||||
// text is ignored by the importer.
|
||||
p.rawStringln(fmt.Sprintf("version %d", exportVersion))
|
||||
var debug string
|
||||
if debugFormat {
|
||||
debug = "debug"
|
||||
|
Loading…
Reference in New Issue
Block a user