-
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
Re-architecture quote pickling #12540
Re-architecture quote pickling #12540
Conversation
d35cb27
to
a3f0700
Compare
345af46
to
1039b5b
Compare
216e1b8
to
8d634fe
Compare
3e979f5
to
fc1bf94
Compare
fc1bf94
to
e9bad53
Compare
484ad44
to
b25ddcf
Compare
39e2c88
to
11cd4c4
Compare
11cd4c4
to
70ddaa6
Compare
044fdab
to
5ee38b9
Compare
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/12540/ to see the changes. Benchmarks is based on merging with main (4c7ec9b) |
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/12540/ to see the changes. Benchmarks is based on merging with main (4c7ec9b) |
3c2ae12
to
b9a5448
Compare
b9a5448
to
0cfea3d
Compare
I have just filed related issue 🙏 |
0cfea3d
to
11062f7
Compare
11062f7
to
996e266
Compare
336a00f
to
0683579
Compare
Separate the logic that creates holes in quotes from the logic that pickles the quotes. Holes are created in the `Splicer` phase and the result of the transformation can be `-Ycheck`ed. Now, the `PickleQuotes` phase only needs to extract the contents of the holes, pickle the quote and put them into a call to `unpickleExprV2`/`unpickleTypeV2`. We add `unpickleExprV2` to support some optimization in the encoding of the pickled quote. Namely we removed an unnecessary lambda from the arguments of the hole passed into the contents of the hole. By not changing `unpickleExpr` the current compiler will be able to handle the old encoding in binaries compiled with older compilers. The `unpickleTypeV2` is just a version of `unpickleType` that does not take the `termHole` parameter which is always `null`. With `-Yscala-relese` 3.0 or 3.1, the compiler will generate calls to the old `unpickleExpr`/`unpickleType`. Fixes scala#8100 Fixes scala#12440 Fixes scala#13563 Fixes scala#14337 Fixes scala#14373 Closes scala#13732
0683579
to
ca01392
Compare
Finally, we are able to merge this PR. It needs a last review to check that nothing unwanted happened when rebasing. |
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.
❇️
Separate the logic that creates holes in quotes from the logic that pickles the quotes. Holes are created in the
Splicer
phase and the result of the transformation can be-Ycheck
ed. Now, thePickleQuotes
phase only needs to extract the contents of the holes, pickle the quote and put them into a call tounpickleExprV2
/unpickleTypeV2
. See documentation inPickleQuotes
andSplicer
.We add
unpickleExprV2
/unpickleTypeV2
to support some optimization in the encoding of the pickled quote. Namely, we removed an unnecessary lambda from the arguments of the hole passed into the contents of the hole. By not changingunpickleExpr
/unpickleType
the current compiler will be able to handle the old encoding in binaries compiled with older compilers.Fixes #8100
Fixes #12440
Fixes #13563
Fixes #13732
Fixes #14337
Fixes #14373