Commit b3829eb
committed
Merge adjacent implicit binding partitions
After:
```
julia> convert(Core.Binding, GlobalRef(Base, :Intrinsics))
Binding Base.Intrinsics
617:∞ - implicit `using` resolved to constant Core.Intrinsics
0:616 - undefined binding - guard entry
julia> convert(Core.Binding, GlobalRef(Base, :Math))
Binding Base.Math
22128:∞ - constant binding to Base.Math
0:22127 - backdated constant binding to Base.Math
```
There is a bit of trickiness here. In particular, the question is,
"when do we check" whether the partition next to the one we currently
looked at happens to have the same implicit resolution as our current
one. The most obvious answer is that we should do it on access, but in
practice that would require essentially scanning back and considering
every possible world age state at every lookup. This is undesirable -
the lookup is not crazy expensive, but it can add up and most world
ages we never touch, so it is also wasteful.
This instead implements a different approach where we only perform
the resolution for world ages that somebody actually asked about,
but can then subsequently merge partitions if we do find that they
are identical. The logic for that is a bit involved, since we need
to be careful to keep the datastructure valid at every point, but
does address the issue.
Fixes #579231 parent f211a77 commit b3829eb
4 files changed
+138
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3266 | 3266 | | |
3267 | 3267 | | |
3268 | 3268 | | |
3269 | | - | |
| 3269 | + | |
3270 | 3270 | | |
| 3271 | + | |
| 3272 | + | |
3271 | 3273 | | |
3272 | 3274 | | |
3273 | 3275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
129 | 175 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 176 | + | |
| 177 | + | |
133 | 178 | | |
134 | 179 | | |
135 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
136 | 193 | | |
137 | 194 | | |
138 | 195 | | |
| |||
170 | 227 | | |
171 | 228 | | |
172 | 229 | | |
173 | | - | |
174 | | - | |
| 230 | + | |
175 | 231 | | |
176 | 232 | | |
177 | 233 | | |
178 | | - | |
179 | | - | |
| 234 | + | |
180 | 235 | | |
181 | 236 | | |
182 | 237 | | |
| |||
279 | 334 | | |
280 | 335 | | |
281 | 336 | | |
| 337 | + | |
282 | 338 | | |
283 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
284 | 344 | | |
285 | 345 | | |
286 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
0 commit comments