From ac0844ec274bf6cfd64bc8fa1e2cc8b24c789dee Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Wed, 27 Jul 2022 00:33:56 -0700 Subject: [dev.unified] cmd/compile: move "has init" to private metadata Currently, there's a "has init" bool in the public metadata section, which is only needed by cmd/compile; but because it's in the public metadata section, it's known to the go/types importers too. This CL moves it instead to the new compiler-only private metadata section added in the last CL for the inline bodies index. The existing bool in the public metadata section is left in place, and just always set to false, to avoid breaking the x/tools importer. The next time we bump the export version number, we can remove the bool properly. But no urgency just yet. Change-Id: I380f358652374b5a221f85020a53dc65912ddb29 Reviewed-on: https://go-review.googlesource.com/c/go/+/419676 Run-TryBot: Matthew Dempsky Reviewed-by: David Chase TryBot-Result: Gopher Robot --- src/internal/pkgbits/encoder.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/internal/pkgbits/encoder.go') diff --git a/src/internal/pkgbits/encoder.go b/src/internal/pkgbits/encoder.go index c0f2252909..f1bc8367ef 100644 --- a/src/internal/pkgbits/encoder.go +++ b/src/internal/pkgbits/encoder.go @@ -19,6 +19,10 @@ import ( // - v0: initial prototype // // - v1: adds the flags uint32 word +// +// TODO(mdempsky): For the next version bump: +// - remove the unused dict.derived.needed bool +// - remove the legacy "has init" bool from the public root const currentVersion uint32 = 1 // A PkgEncoder provides methods for encoding a package's Unified IR -- cgit v1.3