Skip to content

Commit

Permalink
cmd/compile: remove encoding of safemode bit from export data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer committed Aug 16, 2016
1 parent 2b583a1 commit f50ced6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/cmd/compile/internal/gc/bexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
3 changes: 0 additions & 3 deletions src/cmd/compile/internal/gc/bimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/compile/internal/gc/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit f50ced6

Please sign in to comment.