Commit d077bbd
authored
Initial steps to generate TASTy for the 2.13 library (scala#17526)
The aim is to have a project that compiles the 2.13 library using Scala
3 to generate the TASTy. This will require a special compilation mode to
align with Scala 2 semantics. Then in a later step, we can package the
TASTy files in a JAR that can be loaded with the class file JAR of the
Scala 2 standard library.
### `stdlib-bootstrapped` project
This PR changes the purpose of `stdlib-bootstrapped`. Now the project
compiles the Scala 2.13 library (only) sources using `-Yscala2-stdlib`.
With this flag, the compiler will generate code that aligns with the
Scala 2 version of the library. The main purpose is to have TASTy that
contains signatures that align with the Scala 2 library bytecode.
Under `-Yscala2-stdlib` we currently
* change the signature of the case class `unapply` methods,
* do not emit mirrors,
* and inline definitions case class `_N`.
We add MiMa tests to this project to have a better view of the
differences between the Scala 2 generated bytecode and the one generated
in this PR. The bytecode differences are a useful guide of differences
between the TASTy of the library and how applications will link to it.
[skip community_build]File tree
9 files changed
+354
-46
lines changed- .github/workflows
- compiler/src/dotty/tools/dotc
- ast
- config
- core
- unpickleScala2
- transform
- project
- stdlib-bootstrapped/test
9 files changed
+354
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
641 | 644 | | |
642 | 645 | | |
643 | 646 | | |
| |||
735 | 738 | | |
736 | 739 | | |
737 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
738 | 749 | | |
739 | 750 | | |
740 | 751 | | |
741 | 752 | | |
742 | 753 | | |
743 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
744 | 758 | | |
| 759 | + | |
745 | 760 | | |
746 | 761 | | |
747 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
643 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
926 | 929 | | |
927 | 930 | | |
928 | 931 | | |
929 | 932 | | |
930 | 933 | | |
931 | 934 | | |
932 | 935 | | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 936 | + | |
| 937 | + | |
942 | 938 | | |
943 | 939 | | |
| 940 | + | |
944 | 941 | | |
945 | 942 | | |
946 | 943 | | |
| |||
970 | 967 | | |
971 | 968 | | |
972 | 969 | | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | 970 | | |
1004 | 971 | | |
1005 | 972 | | |
| |||
1008 | 975 | | |
1009 | 976 | | |
1010 | 977 | | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
1011 | 985 | | |
1012 | 986 | | |
1013 | 987 | | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
1014 | 1001 | | |
1015 | 1002 | | |
1016 | 1003 | | |
| |||
0 commit comments