Skip to content

cmd/compile: export data doesn't need to record type parameter indices #47451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
griesemer opened this issue Jul 28, 2021 · 6 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

Reminder issue:
With CL 338192 we don't need to record type parameter indices in the export data anymore.
Should adjust the format at some point.

cc: @mdempsky

@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 28, 2021
@griesemer griesemer added this to the Go1.18 milestone Jul 28, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/338192 mentions this issue: [dev.typeparams] cmd/compile: set type parameter indices when they are bound

@mdempsky
Copy link
Contributor

The unified IR export data format has never used type parameter indices.

@mdempsky
Copy link
Contributor

Sorry, I confused this to be about the debug IDs (which unified IR has never used at all).

Unified IR uses the indices for writing out export data, but they're not encoded into the export data at all. I've also played with even removing uses of them within the writer, and can do that if you'd like to remove TypeParam.Index from the API.

@griesemer
Copy link
Contributor Author

I filed this issue because of this change on line 371. It seems to me that we read an index on that line that we don't need anymore?

@mdempsky
Copy link
Contributor

/cc @danscales

gopherbot pushed a commit that referenced this issue Jul 29, 2021
…e bound

This is a port of CL 336249 with adjustments due to slightly
different handling of type parameter declaration in types2.

The CL also contains adjustments to the compiler front-end.

With this change it is not necessary to export type parameter
indices. Filed issue #47451 so we don't forget.

Change-Id: I2834f7be313fcb4763dff2a9058f1983ee6a81b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/338192
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/340532 mentions this issue: [dev.typeparams] cmd/compile: don't export/import type parameter indices anymore

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants