Repository navigation
Commit fa4122d
committed
fix(compiler): stop treating continue as a loop exit in signed-test loops
When a while or C-style for loop has a test that always awaits (e.g.,
`while (await fetch(url, { signal }))`), a continue statement re-runs
the test rather than exiting the loop. The jump-target machinery was
recording continue flows as exit edges, which intersected away the
signed controller and produced false OCTANE_STRONG_EFFECT_DATA_FETCH
diagnostics.
Two changes:
1. enterJumpTarget gains a continueExits flag. When false, recordJump
skips recording continue flows. While/for/do-while pass false when
alwaysAwaits(node.test) is true. For-in/for-of keep the default
(true) because continue goes to the iterator, not a signed test.
2. After visiting the body of a while or C-style for whose test always
awaits, re-apply the test's continuation to restore the controllers
the test establishes. This fixes joinFlow(before, afterBody) losing
the signed controller when the body contains an unsigned await.1 parent 12285b0 commit fa4122d
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3927 | 3927 | | |
3928 | 3928 | | |
3929 | 3929 | | |
3930 | | - | |
| 3930 | + | |
3931 | 3931 | | |
3932 | | - | |
| 3932 | + | |
3933 | 3933 | | |
3934 | 3934 | | |
3935 | 3935 | | |
| |||
3949 | 3949 | | |
3950 | 3950 | | |
3951 | 3951 | | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
3952 | 3956 | | |
3953 | 3957 | | |
3954 | 3958 | | |
| |||
5389 | 5393 | | |
5390 | 5394 | | |
5391 | 5395 | | |
5392 | | - | |
| 5396 | + | |
| 5397 | + | |
5393 | 5398 | | |
5394 | 5399 | | |
5395 | | - | |
| 5400 | + | |
5396 | 5401 | | |
5397 | 5402 | | |
5398 | 5403 | | |
5399 | 5404 | | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
5400 | 5409 | | |
5401 | 5410 | | |
5402 | 5411 | | |
| |||
5500 | 5509 | | |
5501 | 5510 | | |
5502 | 5511 | | |
5503 | | - | |
| 5512 | + | |
| 5513 | + | |
5504 | 5514 | | |
5505 | 5515 | | |
| 5516 | + | |
| 5517 | + | |
| 5518 | + | |
| 5519 | + | |
5506 | 5520 | | |
5507 | 5521 | | |
5508 | 5522 | | |
| |||
5511 | 5525 | | |
5512 | 5526 | | |
5513 | 5527 | | |
5514 | | - | |
| 5528 | + | |
5515 | 5529 | | |
5516 | 5530 | | |
5517 | 5531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| |||
0 commit comments