1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:50:05 -07:00

cmd/compile: remove encoding of safemode bit from export data

Removes the encoding of this bit which was ignored but left behind
for 1.7 to minimize pre-1.7 export format changes. See the issue
for more details.

Fixes #15772.

Change-Id: I46cd7a66ad4c6003b78c64295cf3bda503ebf2dd
Reviewed-on: https://go-review.googlesource.com/27201
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2016-08-16 16:43:34 -07:00
parent 2b583a190e
commit f50ced6d73
3 changed files with 3 additions and 7 deletions

View File

@ -346,7 +346,6 @@ func export(out *bufio.Writer, trace bool) int {
}
// write compiler-specific flags
p.bool(safemode)
if p.trace {
p.tracef("\n")
}

View File

@ -106,9 +106,6 @@ func Import(in *bufio.Reader) {
// read compiler-specific flags
// read but ignore safemode bit (see issue #15772)
p.bool() // formerly: importpkg.Safe = p.bool()
// phase 2
objcount = 0
for {

View File

@ -103,9 +103,9 @@ const runtimeimport = "" +
"write\x00\x01\x16d\x00\t\x19racereadrange\x00\x04\x16\raddr·1\x00d\x16\r" +
"size·2\x00d\x00\t\x1bracewriterange\x00\x04\x16\x98\x03\x00d\x16\x9a\x03\x00d\x00\t" +
"\x0fmsanread\x00\x04\x16\x98\x03\x00d\x16\x9a\x03\x00d\x00\t\x11msanwrite\x00\x04\x16\x98\x03\x00d" +
"\x16\x9a\x03\x00d\x00\v\xf8\x01\x02\v\x00\x01\x00\n$$\n"
"\x16\x9a\x03\x00d\x00\v\xf8\x01\v\x00\x01\x00\n$$\n"
const unsafeimport = "" +
"cn\x00\x03v1\x01\vunsafe\x00\x05\r\rPointer\x00\x16\x00\t\x0fOffsetof\x00\x01" +
":\x00\x01\x16\x00\t\vSizeof\x00\x01:\x00\x01\x16\x00\t\rAlignof\x00\x01:\x00\x01\x16\x00\v\b\x00\v" +
"\x00\x01\x00\n$$\n"
":\x00\x01\x16\x00\t\vSizeof\x00\x01:\x00\x01\x16\x00\t\rAlignof\x00\x01:\x00\x01\x16\x00\v\b\v\x00" +
"\x01\x00\n$$\n"