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

Replace anonymous classes created by macros with instance helpers #970

Merged
merged 3 commits into from
Mar 15, 2020

Conversation

joroKr21
Copy link
Collaborator

@joroKr21 joroKr21 commented Feb 28, 2020

This reduces the size of the generated bytecode and
the number of emitted classfiles (on Scala 2.12+).

Thanks to @neko-kai for pointing out this inefficiency.

  • Generic
  • DefaultSymbolicLabelling
  • Witness
  • WitnessWith
  • NatWith
  • SingletonOps
  • Generic1
  • Split1
  • IsHCons1
  • IsCCons1

Annotations and Default already have helpers.

@joroKr21 joroKr21 force-pushed the instance-helpers branch 4 times, most recently from 40290d5 to 87755d1 Compare March 1, 2020 14:42
@joroKr21 joroKr21 marked this pull request as ready for review March 1, 2020 14:48
@joroKr21 joroKr21 requested a review from milessabin March 1, 2020 14:48
@joroKr21 joroKr21 added this to the shapeless-2.4.0 milestone Mar 1, 2020
This reduces the size of the generated bytecode and
the number of emitted classfiles (on Scala 2.12+).
Also simplidies the macro implementations.
@milessabin
Copy link
Owner

Sorry ... missed this earlier.

I did something similar on the shapeless 3 branch.

Copy link
Owner

@milessabin milessabin left a comment

Choose a reason for hiding this comment

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

LGTM!

@joroKr21 joroKr21 merged commit 2f892ec into milessabin:master Mar 15, 2020
@joroKr21 joroKr21 deleted the instance-helpers branch March 15, 2020 19:55
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