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

Specialization: avoid temporary lists/tuples and avoid entry in the type history when a no-op #48

Open
wants to merge 2 commits into
base: 2.12.x
Choose a base branch
from

Conversation

retronym
Copy link
Owner

No description provided.

@retronym
Copy link
Owner Author

Previously proposed as scala#7863 but the patch is still bigger/uglier than I'd like, so un-proposed for now.

@@ -72,8 +74,47 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
override def changesBaseClasses = true
override def keepsTypeParams = true

type TypeEnv = immutable.Map[Symbol, Type]
def emptyEnv: TypeEnv = Map[Symbol, Type]()
final case class TypeEnvWrapper(value: immutable.Map[Symbol, Type]) {

Choose a reason for hiding this comment

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

Why is TypeEnvWrapper a case class, instead of a class that extends from AnyVal?

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.

2 participants