Skip to content

Try to refine handling of SymDenotations #4504

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
wants to merge 3 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 10, 2018

It seems we get many cache misses when going from Symbols to their denotations. This is a very common operation: When compiling typer/*.scala, we generate ~80K symbols, ~125K SymDenotations, yet dereference .denot more than 15.8M times. Of these, 11.7M go to the symbol's initial denotation.

So one thing I'd like to try is to store the initial denotation of a symbol in the symbol itself, by making Symbol inherit from SymDenotation. To get there, several obstacles need to be put out of the way first:

  • ClassDenotation needs to be a trait.
  • Eliminate the implicit conversions from Symbol to SymDenotation, replacing them with
    forwarders in Symbol.
  • Rename all SymDenotation methods so that they are different from Symbol methods (otherwise we'd get accidental overrides).

Operations on Denotations (not SymDenotations) should not be
invokable with a Symbol receiver.
@odersky
Copy link
Contributor Author

odersky commented May 11, 2018

Abandoned, since the following proved much too burdensome:

  • Rename all SymDenotation methods so that they are different from Symbol methods (otherwise we'd get accidental overrides).

This is literally many thousands of places where we need to invent new names.

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.

1 participant