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

Port scala.quoted.runtime.impl.QuoteMatcher #12402

Merged
merged 21 commits into from
May 17, 2021

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented May 10, 2021

This will make it simpler to maintain and also improves a bit the performace.

@nicolasstucki nicolasstucki self-assigned this May 10, 2021
@nicolasstucki
Copy link
Contributor Author

test performance with #quotes please

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented May 10, 2021

test performance with #quotes please

@nicolasstucki nicolasstucki changed the title Port scala.quoted.runtime.impl.Matcher Port scala.quoted.runtime.impl.QuoteMatcher May 10, 2021
@dottybot
Copy link
Member

performance test scheduled: 8 job(s) in queue, 1 running.

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/12402/ to see the changes.

Benchmarks is based on merging with master (f5bfed9)

@nicolasstucki
Copy link
Contributor Author

test performance with #quotes please

@dottybot
Copy link
Member

performance test scheduled: 3 job(s) in queue, 1 running.

@nicolasstucki nicolasstucki marked this pull request as ready for review May 11, 2021 07:21
@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/12402/ to see the changes.

Benchmarks is based on merging with master (591154d)

Copy link
Contributor

@liufengyun liufengyun left a 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)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed unnecessary duplication

@nicolasstucki nicolasstucki merged commit dd7589c into scala:master May 17, 2021
@nicolasstucki nicolasstucki deleted the port-matcher branch May 17, 2021 14:38
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