]> Cypherpunks repositories - gostls13.git/commitdiff
internal/pkgbits: add DerivedInfoNeeded
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 25 Aug 2024 14:05:00 +0000 (21:05 +0700)
committerGopher Robot <gobot@golang.org>
Mon, 26 Aug 2024 17:46:52 +0000 (17:46 +0000)
So next CL can use it to remove unnecessary derivedInfo needed field.

Updates #68778

Change-Id: Ia4e0f638beaf4a448fbf10a9aa1bc9425349a5e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/608215
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/internal/pkgbits/pkgbits_test.go
src/internal/pkgbits/version.go

index a5f93c7e8e54ff1f3d9ceb224f8195b5b448f333..f4c3719446f58ec696247ac09691a9231d4e86a7 100644 (file)
@@ -45,6 +45,8 @@ func TestVersions(t *testing.T) {
                {pkgbits.V1, pkgbits.HasInit},
                {pkgbits.V0, pkgbits.DerivedFuncInstance},
                {pkgbits.V1, pkgbits.DerivedFuncInstance},
+               {pkgbits.V0, pkgbits.DerivedInfoNeeded},
+               {pkgbits.V1, pkgbits.DerivedInfoNeeded},
                {pkgbits.V2, pkgbits.AliasTypeParamNames},
        } {
                if !c.v.Has(c.f) {
@@ -57,6 +59,7 @@ func TestVersions(t *testing.T) {
                {pkgbits.V0, pkgbits.Flags},
                {pkgbits.V2, pkgbits.HasInit},
                {pkgbits.V2, pkgbits.DerivedFuncInstance},
+               {pkgbits.V2, pkgbits.DerivedInfoNeeded},
                {pkgbits.V0, pkgbits.AliasTypeParamNames},
                {pkgbits.V1, pkgbits.AliasTypeParamNames},
        } {
index fe5901a9efab0755a73cc442c4b5099d5cb8e57a..ba664f45554aabc69c53629af54db35254f30bc3 100644 (file)
@@ -25,6 +25,7 @@ const (
        // - remove the legacy "has init" bool from the public root
        // - remove obj's "derived func instance" bool
        // - add a TypeParamNames field to ObjAlias
+       // - remove derived info "needed" bool
        V2
 
        numVersions = iota
@@ -56,6 +57,10 @@ const (
        // ObjAlias has a list of TypeParamNames.
        AliasTypeParamNames
 
+       // Deprecated: DerivedInfoNeeded was a bool indicating
+       // whether a type was a derived type.
+       DerivedInfoNeeded
+
        numFields = iota
 )
 
@@ -71,6 +76,7 @@ var introduced = [numFields]Version{
 var removed = [numFields]Version{
        HasInit:             V2,
        DerivedFuncInstance: V2,
+       DerivedInfoNeeded:   V2,
 }
 
 // Has reports whether field f is present in a bitstream at version v.