Commit e51da3b
committed
inference: fix backedge correctness for
Even if the return value of `applicable(f, args...)` is initially
inferred as `Const(true)`, when a new method is added to `f` then it may
cause new method match ambiguities, requiring the call to return return
`false` at the next invocation. To handle such cases, it is necessary to
always add a method table backedge in the inference of `applicable`.
Also just as a minor backedge reduction optimization, this commit avoids
adding backedges when `applicable` is inferred to return `::Bool`.applicable calls1 parent 2a06376 commit e51da3b
File tree
3 files changed
+36
-17
lines changed- base/compiler
- test/compiler
3 files changed
+36
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | | - | |
275 | | - | |
| 276 | + | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
287 | | - | |
288 | | - | |
| 289 | + | |
| 290 | + | |
289 | 291 | | |
290 | 292 | | |
291 | | - | |
| 293 | + | |
292 | 294 | | |
293 | 295 | | |
294 | | - | |
295 | | - | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3006 | 3006 | | |
3007 | 3007 | | |
3008 | 3008 | | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | | - | |
3016 | | - | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
3017 | 3019 | | |
3018 | 3020 | | |
3019 | 3021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5104 | 5104 | | |
5105 | 5105 | | |
5106 | 5106 | | |
| 5107 | + | |
| 5108 | + | |
| 5109 | + | |
| 5110 | + | |
| 5111 | + | |
| 5112 | + | |
| 5113 | + | |
| 5114 | + | |
| 5115 | + | |
| 5116 | + | |
| 5117 | + | |
| 5118 | + | |
| 5119 | + | |
| 5120 | + | |
| 5121 | + | |
5107 | 5122 | | |
5108 | 5123 | | |
5109 | 5124 | | |
| |||
0 commit comments