File tree
16 files changed
+86
-97
lines changed- compiler/src
- main/scala/org/scalajs/nscplugin
- test/scala/org/scalajs/nscplugin/test
- project
16 files changed
+86
-97
lines changedLines changed: 14 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
| |||
2890 | 2891 |
| |
2891 | 2892 |
| |
2892 | 2893 |
| |
2893 |
| - | |
2894 |
| - | |
| 2894 | + | |
2895 | 2895 |
| |
2896 | 2896 |
| |
2897 | 2897 |
| |
| |||
2906 | 2906 |
| |
2907 | 2907 |
| |
2908 | 2908 |
| |
2909 |
| - | |
| 2909 | + | |
2910 | 2910 |
| |
2911 | 2911 |
| |
2912 | 2912 |
| |
| |||
2915 | 2915 |
| |
2916 | 2916 |
| |
2917 | 2917 |
| |
2918 |
| - | |
| 2918 | + | |
2919 | 2919 |
| |
2920 | 2920 |
| |
2921 | 2921 |
| |
| |||
2927 | 2927 |
| |
2928 | 2928 |
| |
2929 | 2929 |
| |
2930 |
| - | |
| 2930 | + | |
2931 | 2931 |
| |
2932 | 2932 |
| |
2933 | 2933 |
| |
2934 |
| - | |
| 2934 | + | |
2935 | 2935 |
| |
2936 |
| - | |
| 2936 | + | |
2937 | 2937 |
| |
2938 |
| - | |
| 2938 | + | |
2939 | 2939 |
| |
2940 |
| - | |
| 2940 | + | |
2941 | 2941 |
| |
2942 | 2942 |
| |
2943 | 2943 |
| |
| |||
3901 | 3901 |
| |
3902 | 3902 |
| |
3903 | 3903 |
| |
3904 |
| - | |
| 3904 | + | |
3905 | 3905 |
| |
3906 | 3906 |
| |
3907 | 3907 |
| |
3908 |
| - | |
| 3908 | + | |
3909 | 3909 |
| |
3910 | 3910 |
| |
3911 | 3911 |
| |
| |||
4025 | 4025 |
| |
4026 | 4026 |
| |
4027 | 4027 |
| |
4028 |
| - | |
| 4028 | + | |
4029 | 4029 |
| |
4030 | 4030 |
| |
4031 | 4031 |
| |
| |||
4366 | 4366 |
| |
4367 | 4367 |
| |
4368 | 4368 |
| |
4369 |
| - | |
| 4369 | + | |
4370 | 4370 |
| |
4371 | 4371 |
| |
4372 | 4372 |
| |
| |||
4423 | 4423 |
| |
4424 | 4424 |
| |
4425 | 4425 |
| |
4426 |
| - | |
| 4426 | + | |
4427 | 4427 |
| |
4428 | 4428 |
| |
4429 | 4429 |
| |
|
Lines changed: 6 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
94 |
| - | |
| 94 | + | |
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
| 154 | + | |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 | 157 |
| |
161 | 158 |
| |
162 | 159 |
| |
163 |
| - | |
| 160 | + | |
164 | 161 |
| |
165 | 162 |
| |
166 | 163 |
| |
167 | 164 |
| |
168 | 165 |
| |
169 |
| - | |
| 166 | + | |
170 | 167 |
| |
171 | 168 |
| |
172 | 169 |
| |
173 | 170 |
| |
174 |
| - | |
| 171 | + | |
175 | 172 |
| |
176 |
| - | |
| 173 | + | |
177 | 174 |
| |
178 | 175 |
| |
179 | 176 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
253 |
| - | |
| 253 | + | |
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
| |||
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
326 |
| - | |
| 326 | + | |
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
|
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
188 |
| - | |
| 188 | + | |
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
| 200 | + | |
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
| |||
646 | 646 |
| |
647 | 647 |
| |
648 | 648 |
| |
649 |
| - | |
650 |
| - | |
651 |
| - | |
652 |
| - | |
653 |
| - | |
654 | 649 |
| |
655 | 650 |
| |
656 | 651 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
126 | 125 |
| |
127 | 126 |
| |
128 | 127 |
| |
| |||
1138 | 1137 |
| |
1139 | 1138 |
| |
1140 | 1139 |
| |
1141 |
| - | |
1142 |
| - | |
1143 |
| - | |
1144 | 1140 |
| |
1145 | 1141 |
| |
1146 | 1142 |
| |
|
Lines changed: 10 additions & 14 deletions
@@ -265,15 +265,15 @@ object Serializers {
265
265
266
266
case Labeled(label, tpe, body) =>
267
267
writeTagAndPos(TagLabeled)
268
- writeLabelIdent(label); writeType(tpe); writeTree(body)
268
+ writeName(label); writeType(tpe); writeTree(body)
269
269
270
270
case Assign(lhs, rhs) =>
271
271
writeTagAndPos(TagAssign)
272
272
writeTree(lhs); writeTree(rhs)
273
273
274
274
case Return(expr, label) =>
275
275
writeTagAndPos(TagReturn)
276
- writeTree(expr); writeLabelIdent(label)
276
+ writeTree(expr); writeName(label)
277
277
278
278
case If(cond, thenp, elsep) =>
279
279
writeTagAndPos(TagIf)
@@ -786,11 +786,6 @@ object Serializers {
786
786
writeName(ident.name)
787
787
}
788
788
789
- def writeLabelIdent(ident: LabelIdent): Unit = {
790
- writePosition(ident.pos)
791
- writeName(ident.name)
792
- }
793
-
794
789
def writeSimpleFieldIdent(ident: SimpleFieldIdent): Unit = {
795
790
writePosition(ident.pos)
796
791
writeName(ident.name)
@@ -1135,7 +1130,7 @@ object Serializers {
1135
1130
case TagVarDef => VarDef(readLocalIdent(), readOriginalName(), readType(), readBoolean(), readTree())
1136
1131
case TagSkip => Skip()
1137
1132
case TagBlock => Block(readTrees())
1138
- case TagLabeled => Labeled(readLabelIdent(), readType(), readTree())
1133
+ case TagLabeled => Labeled(readLabelName(), readType(), readTree())
1139
1134
1140
1135
case TagAssign =>
1141
1136
val lhs0 = readTree()
@@ -1155,7 +1150,7 @@ object Serializers {
1155
1150
1156
1151
Assign(lhs.asInstanceOf[AssignLhs], rhs)
1157
1152
1158
- case TagReturn => Return(readTree(), readLabelIdent())
1153
+ case TagReturn => Return(readTree(), rea
10000
dLabelName())
1159
1154
case TagIf => If(readTree(), readTree(), readTree())(readType())
1160
1155
case TagWhile => While(readTree(), readTree())
1161
1156
@@ -2166,11 +2161,6 @@ object Serializers {
2166
2161
LocalIdent(readLocalName())
2167
2162
}
2168
2163
2169
- def readLabelIdent(): LabelIdent = {
2170
- implicit val pos = readPosition()
2171
- LabelIdent(readLabelName())
2172
- }
2173
-
2174
2164
def readFieldIdent(): FieldIdent = {
2175
2165
// For historical reasons, the className comes *before* the position
2176
2166
val className = readClassName()
@@ -2399,6 +2389,12 @@ object Serializers {
2399
2389
}
2400
2390
2401
2391
private def readLabelName(): LabelName = {
2392
+ /* Before 1.18, `LabelName`s were always wrapped in `LabelIdent`s, whose
2393
+ * encoding was a `Position` followed by the actual `LabelName`.
2394
+ */
2395
+ if (hacks.use17)
2396
+ readPosition() // intentional discard
2397
+
2402
2398
val i = readInt()
2403
2399
val existing = labelNames(i)
2404
2400
if (existing ne null) {
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 | 59 |
| |
63 | 60 |
| |
64 | 61 |
| |
| |||
150 | 147 |
| |
151 | 148 |
| |
152 | 149 |
| |
153 |
| - | |
| 150 | + | |
154 | 151 |
| |
155 | 152 |
| |
156 | 153 |
| |
| |||
160 | 157 |
| |
161 | 158 |
| |
162 | 159 |
| |
163 |
| - | |
| 160 | + | |
164 | 161 |
| |
165 | 162 |
| |
166 | 163 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
| 43 | + | |
42 | 44 |
| |
43 | 45 |
| |
44 | 46 |
| |
| |||
47 | 49 |
| |
48 | 50 |
| |
49 | 51 |
| |
50 |
| - | |
51 |
| - | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
|
0 commit comments