]> Cypherpunks.ru repositories - gostls13.git/commit
internal/pkgbits: change EnableSync into a dynamic knob
authorMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jul 2022 18:04:44 +0000 (11:04 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jul 2022 19:30:30 +0000 (19:30 +0000)
commit9371a6558412f621b5fbb54c42b43b93f8080e68
treeb0600040e687216364408726e46b74e66b042f71
parentd667be88310de6f91d9f1a88d949ea6c5b48650d
internal/pkgbits: change EnableSync into a dynamic knob

Rather than requiring users to recompile the compiler and all tools to
enable/disable sync markers, this CL adds a flag word into the Unified
IR file format to allow indicating whether they're enabled or not.
This in turn requires bumping the file format version.

Thanks to drchase@ for benchmarks showing this isn't as expensive as I
feared it would be.

Change-Id: I99afa0ee0b6ef5f30ed8ca840805ff9fd46b1857
Reviewed-on: https://go-review.googlesource.com/c/go/+/417097
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/base/flag.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go
src/internal/pkgbits/decoder.go
src/internal/pkgbits/encoder.go
src/internal/pkgbits/flags.go [new file with mode: 0644]
src/internal/pkgbits/sync.go