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

remove nontoplevel type hack + consider symbol disamb in type hash #23969

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Aug 16, 2024

fixes #22571

Removes the hack added in #13589 which made non-top-level object type symbols gensym because they couldn't be mangled into different names for codegen vs. top-level types. Now we consider the new disamb field (added in #21667) of the type symbols in the type hash (which is used for the mangled name) to differentiate between the types.

In other parts of the compiler, specifically the proc mangling, itemId.item is used instead of the disamb field, but I didn't use it in case it's the outdated method.

@Araq Araq merged commit d43a595 into nim-lang:devel Aug 16, 2024
18 checks passed
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from d43a595

Hint: mm: orc; opt: speed; options: -d:release
173448 lines; 7.908s; 654.535MiB peakmem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Types declared in non-top-level scope gensym their symbols to workaround bad mangling
2 participants