Skip to content

Refactor type splice logic #9381

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

Merged
merged 4 commits into from
Jul 20, 2020

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 17, 2020

  • Specialize the matching and handling of term/type splices. This avoids unnecessary operations on either.
  • Replace scala.quoted.Type.$splice to T

Specialize the matching and handling of term/type splices. This avoids unnecessary operations on either.
@nicolasstucki nicolasstucki requested a review from liufengyun July 17, 2020 14:01
@nicolasstucki nicolasstucki marked this pull request as ready for review July 17, 2020 14:27
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 (tree.isType)
transformSpliceType(body, body.select(tpnme.spliceType))
else
val splice = ref(defn.InternalQuoted_exprSplice).appliedToType(tree.tpe).appliedTo(body).asInstanceOf[Apply]
Copy link
Contributor

Choose a reason for hiding this comment

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

@nicolasstucki nicolasstucki requested a review from liufengyun July 20, 2020 08:22
@nicolasstucki nicolasstucki merged commit 76d9eb7 into scala:master Jul 20, 2020
@nicolasstucki nicolasstucki deleted the refactor-type-splice-logic branch July 20, 2020 08:54
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