Skip to content

Contextualize quote and splice internals #6881

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 3 commits into from
Jul 30, 2019

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Jul 18, 2019
@nicolasstucki nicolasstucki mentioned this pull request Jul 18, 2019
16 tasks
@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch 10 times, most recently from 9753dc6 to 1fff5d6 Compare July 23, 2019 12:30
@nicolasstucki nicolasstucki requested a review from liufengyun July 23, 2019 12:33
@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch 2 times, most recently from 581ea17 to 256f189 Compare July 23, 2019 15:48
@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch 4 times, most recently from 8f25235 to 9ec5b46 Compare July 24, 2019 11:56
@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch 4 times, most recently from 5b1ea48 to 3d170d1 Compare July 24, 2019 14:33
@nicolasstucki nicolasstucki marked this pull request as ready for review July 24, 2019 15:30
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

@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch from 3d170d1 to 853e904 Compare July 27, 2019 15:19
@nicolasstucki
Copy link
Contributor Author

Rebased

@nicolasstucki
Copy link
Contributor Author

Rebased and squashed commits

* Define quote as ```def `'`[T](e: T): given QuoteContext => Expr[T]```
* Define splice as ```def `$`[T](expr: given QuoteContext => Expr[T]): T```
* Add missing QuoteContext in multistaged quotes
Add `-Yscala3ImplicitScopes` to eneble Scala 3 implicit scope rules under `-language:Scala2`
@nicolasstucki nicolasstucki force-pushed the contextualize-splices branch from 01649d7 to 34e26d3 Compare July 28, 2019 18:16
@nicolasstucki
Copy link
Contributor Author

Rebased

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, except for the concern raised by @smarter about introducing the flag -Yscala3ImplicitScopes.

@nicolasstucki
Copy link
Contributor Author

-Yscala3ImplicitScopes is intended as a temporary workaround until we have a better solution.

@nicolasstucki
Copy link
Contributor Author

As discussed, we will remove the -Yscala3ImplicitScopes flag and use the patched sclalatest branch.

@nicolasstucki nicolasstucki merged commit 195597e into scala:master Jul 30, 2019
@nicolasstucki nicolasstucki deleted the contextualize-splices branch July 30, 2019 09:24
@smarter
Copy link
Member

smarter commented Aug 4, 2019

Did this PR cause a slow-down in some benchmarks, or is the benchmark website being misleading ? http://dotty-bench.epfl.ch/ (see "implicit cache I - from tasty", "Tuple22.tail")

@nicolasstucki
Copy link
Contributor Author

I will have a look at it. In theory it should not have affected those benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants