Skip to content

Turn SymbolLoaders into an object #4507

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

Merged
merged 1 commit into from
May 11, 2018

Conversation

smarter
Copy link
Member

@smarter smarter commented May 10, 2018

The extra flexibility of a class isn't useful here and leads to worse
code being generated (e.g. it requires PackageLoader to carry an outer
accessor).

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One less field also saves some memory per ContextBase, in the spirit of @retronym's scala/scala-dev#501.

/** A marker trait for a completer that replaces the original
* Symbol loader for an unpickled root.
*/
trait SecondCompleter
}

/** A base class for Symbol loaders with some overridable behavior */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that SymbolLoaders was meant to be extended. Make the protected members private?

@smarter smarter force-pushed the opt/SymbolLoaders branch from 3ed3f44 to fa438ad Compare May 10, 2018 22:16
The extra flexibility of a class isn't useful here and leads to worse
code being generated (e.g. it requires PackageLoader to carry an outer
accessor).
@smarter smarter force-pushed the opt/SymbolLoaders branch from fa438ad to 6b69732 Compare May 10, 2018 23:01
@smarter smarter merged commit 736c3ad into scala:master May 11, 2018
@allanrenucci allanrenucci deleted the opt/SymbolLoaders branch May 11, 2018 13:41
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.

3 participants