Skip to content
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

DefPathData should use InternedString, not Name #35292

Closed
nikomatsakis opened this issue Aug 4, 2016 · 3 comments
Closed

DefPathData should use InternedString, not Name #35292

nikomatsakis opened this issue Aug 4, 2016 · 3 comments
Labels
A-incr-comp Area: Incremental compilation T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

Currently DefPathData embeds a Name. The intention was to have an interned string and ignore hygiene. But it turns out that Name still has a kind of quasi-hygiene -- using gensym, you can create two names with the same string representation but distinct identifiers. We should be using InternedString in DefPathData instead, I believe. Otherwise you can wind up with two def-ids with def-paths that, after serialization, appear exactly the same (since we serialize the Name by writing out the string value, but that is not sufficient to capture this gensym quality).

This shows up e.g. in the iter variable created by the for lowering.

@nikomatsakis nikomatsakis added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-incr-comp Area: Incremental compilation labels Aug 4, 2016
@nikomatsakis nikomatsakis added this to the Incremental compilation alpha milestone Aug 4, 2016
@michaelwoerister
Copy link
Member

cc me

@eddyb
Copy link
Member

eddyb commented Aug 4, 2016

We can also get rid of gensym and use hygiene instead.

@nikomatsakis
Copy link
Contributor Author

PS I have a fix for this on One Of My Branches

@bors bors closed this as completed in 571010b Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants