Commit 32c3395
committed
Handle
This is more for completeness of `genCond()`. It can now push down
the jumps inside all the control structures for which it makes
sense to do so. It typically applies when the condition of an `if`
or `while` is an `if..else` expression.
It is however not always a win. If the result of the nested `if`s
must be converted to a boolean anyway, doing this will result in
duplication of the conversion to boolean.
A jardiff on the bootstrapped `scala3-compiler.jar` shows 191
additions and 287 deletions, suggesting that, on average, this is
good to have.If in BCodeBodyBuilder.genCond().1 parent d260adf commit 32c3395
1 file changed
+9
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1570 | 1570 | | |
1571 | 1571 | | |
1572 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1573 | 1582 | | |
1574 | 1583 | | |
1575 | 1584 | | |
| |||
0 commit comments