-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Simplify Scala 2 trait support #6040
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
Simplify Scala 2 trait support #6040
Conversation
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
2d12bf7
to
4739268
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in backend/sjs/
LGTM.
e2beab9
to
17e1d55
Compare
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/6040/ to see the changes. Benchmarks is based on merging with master (7d30a83) |
Drop vestigial code related to Scala 2.11 support. In particular, we created a fake impl class in AugmentScala2Trait only to add its members to the trait in LinkScala2Impls. We now directly add the members to the trait in LinkScala2Impls. We could potentially simplify things even further by getting rid of LinkScala2Impls since the static `foo$` methods in Scala 2 traits always forward to instance methods `foo`, but that could have performance implication as detailed in scala#5928, so we keep things as-is for now, but eventually we should either switch Dotty trait encoding to also use static forwarders, or not use them at all.
17e1d55
to
d3de543
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice simplification
@smarter this merge did not pass the test |
Looks like scala#6034 and scala#6040 collided resulting in a CI failure on master.
Fixed in #6049 |
Drop vestigial code related to Scala 2.11 support. In particular, we
created a fake impl class in AugmentScala2Trait only to add its members
to the trait in LinkScala2Impls. We now directly add the members to the
trait in LinkScala2Impls.
We could potentially simplify things even further by getting rid of
LinkScala2Impls since the static
foo$
methods in Scala 2 traits alwaysforward to instance methods
foo
, but that could have performanceimplication as detailed in #5928, so we keep things as-is for now, but
eventually we should either switch Dotty trait encoding to also use
static forwarders, or not use them at all.