-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Port scala.quoted.runtime.impl.QuoteMatcher #12402
Conversation
test performance with #quotes please |
test performance with #quotes please |
performance test scheduled: 8 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/12402/ to see the changes. Benchmarks is based on merging with master (f5bfed9) |
test performance with #quotes please |
performance test scheduled: 3 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/12402/ to see the changes. Benchmarks is based on merging with master (591154d) |
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.
LGTM
if pat1.isType then matcher.termMatch(scrutinee.asInstanceOf[matcher.qctx.reflect.Term], pat1.asInstanceOf[matcher.qctx.reflect.Term]) | ||
else matcher.termMatch(scrutinee.asInstanceOf[matcher.qctx.reflect.Term], pat1.asInstanceOf[matcher.qctx.reflect.Term]) | ||
if pat1.isType then QuoteMatcher.termMatch(scrutinee, pat1)(using ctx1) | ||
else QuoteMatcher.termMatch(scrutinee, pat1)(using ctx1) |
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.
This if/else
seems not useful -- both branches have the same code.
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.
Removed unnecessary duplication
This will make it simpler to maintain and also improves a bit the performace.