-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
go/types: add GCSizes #17586
Comments
What's the advantage of providing a separate GCSizes implementation, rather than just making StdSizes exactly match cmd/compile? |
@mdempsky That's an ok choice too, but I like to keep a version around that shows that there's no need to waste space in internal fragmentation (which is currently the case for gc-aligned structs used inside arrays or other structs). |
If/when we look at this, we should make sure that |
CL https://golang.org/cl/37666 mentions this issue. |
The current StdSizes most closely matches the gc compiler, and the uses I know of that care which compiler the sizes are for are all for the gc compiler, so call the existing implementation "gc". Updates #17586 Fixes #19351 Change-Id: I2bdd694518fbe233473896321a1f9758b46ed79b Reviewed-on: https://go-review.googlesource.com/37666 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Looks like this happened? What remains, @josharian? |
Kind of. We now have a SizesFor that supports returning different concrete Sizes implementations, but we don't exactly have a concrete implementation for cmd/compile--it's close, but not exact, e.g. the padding byte in some circumstances. Moving to unplanned, though, pending direct need for it. |
We have one now after #61035 |
Provide a GCSizes that matches cmd/compile exactly and that all clients that depend on the same size computations as cmd/compile can use.
See #17584 for context.
The text was updated successfully, but these errors were encountered: