Open mdlayher opened 3 years ago
Bryan's point is good, but theoretical. For practical purposes, this is the key sentence:
I do not expect the production Go compiler to ever actually implement that optimization
Perhaps the magic "no moving GC" package should disappear in favor of a more mundane "verified in 1.16" package. Hopefully weak refs will be added because some compiler breaks package intern as it stands.
Reported by @bcmills on Gophers Slack #darkarts:
@josharian also spoke up a bit later (and he knows a lot more about this repo and its tricks than I do):
And more context from Brian:
I don't know if much of this is immediately actionable (aside from the first point about moving the uintptr conversion) or just something to be aware of. And perhaps this gives more motivaiton to push for weak references as Josh mentioned.