Repository navigation
Commit 6b1473d
committed
fix: correct three strong-effect analysis bugs
Bug 1 (AND-await treated as always waiting): For &&, the short-circuit
value is falsy and never thenable, so awaitYields now returns false and
maySettle returns true when the left operand is unknown.
Bug 2 (Switch breaks drop unsigned paths): A break inside an if within
a switch case had its flow discarded by joinBranchFlows, so only the
end-of-case flow was tracked. Added a switchBreakFlows collector that
joinBranchFlows pushes break-exit flows to, which the switch handler
merges into exits.
Bug 3 (Abort proof ignores static operands): requestControllers
intersected both arms of conditional/logical expressions without
checking selected(), so a literal dead arm dropped the live request's
controller. Now consults selected() first.1 parent 9ea692e commit 6b1473d
2 files changed
Lines changed: 37 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
462 | 468 | | |
463 | 469 | | |
464 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1436 | 1436 | | |
1437 | 1437 | | |
1438 | 1438 | | |
| 1439 | + | |
1439 | 1440 | | |
1440 | 1441 | | |
1441 | 1442 | | |
| |||
1955 | 1956 | | |
1956 | 1957 | | |
1957 | 1958 | | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1961 | 1965 | | |
1962 | 1966 | | |
1963 | 1967 | | |
| |||
3875 | 3879 | | |
3876 | 3880 | | |
3877 | 3881 | | |
3878 | | - | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
3879 | 3891 | | |
3880 | 3892 | | |
3881 | 3893 | | |
| |||
4768 | 4780 | | |
4769 | 4781 | | |
4770 | 4782 | | |
| 4783 | + | |
| 4784 | + | |
4771 | 4785 | | |
4772 | 4786 | | |
4773 | 4787 | | |
| |||
4805 | 4819 | | |
4806 | 4820 | | |
4807 | 4821 | | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
4808 | 4826 | | |
4809 | 4827 | | |
4810 | 4828 | | |
| |||
0 commit comments