Commit 4783583
interp: block return must not ride the invokeEx code0 fast path (#3572)
* interp: block return must not ride the invokeEx code0 fast path
Context::invokeEx hands enumerators (for_each_function et al.) the closure
body's single statement bare when code0 is set — skipping the
SimNode_ClosureBlock epilogue that clears stopForReturn. A firing bare
`return` inside such a block then killed the remaining iterations AND
leaked the stop flag into the calling function, silently skipping its
tail. Longest-lived visible casualty: rst.das documents() dropped every
Uncategorized function from the generated docs, and gate 3 passed
precisely because the loop was dead. JIT and AOT were always correct.
Fix: C0 additionally requires !expr->hasReturn, so return-bearing
single-statement closures take the full ClosureBlock path. Failing test
first: tests/ast/test_closure_block_return.das (red pre-fix, green now).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8bZnWkVWeXy8jfrxSojso
* docs: group the functions the healed Uncategorized loop surfaced
The invokeEx block-return fix brings rst.das documents()'s Uncategorized
loop back to life, surfacing functions that had been silently dropped
from the generated docs. Groups + handmade entries for the new ones:
fio set_env_variable + long_fread/long_fwrite, logger_init_tee/
logger_set_tee, and the per-thread jobque dials (set/get_jobque_thread_
team_mode, set_current_thread_priority — hidden with the tuning-knob
family). Existing jobque handmade descriptions are untouched (an earlier
revision of this branch accidentally rewrote them; restored verbatim —
Copilot review caught the divergences).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8bZnWkVWeXy8jfrxSojso
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 8433389 commit 4783583
7 files changed
Lines changed: 76 additions & 6 deletions
File tree
- doc
- reflections
- source/stdlib/handmade
- src/ast
- tests/ast
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
| 1319 | + | |
1320 | 1320 | | |
1321 | | - | |
| 1321 | + | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2221 | 2221 | | |
2222 | 2222 | | |
2223 | 2223 | | |
2224 | | - | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
2225 | 2228 | | |
2226 | 2229 | | |
2227 | 2230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments