Repository navigation
Commit b3d79af
Core: Count scratch temps needed by if conditions
The per-statement temp count returned early for an if after recursing
into its body and else, and never walked the condition. A helper call
whose only occurrence was in a condition, `if m.lookup(5):`, therefore
found no pool and failed with "Scratch pool exhausted" while the same
call on a line of its own compiled. The condition is evaluated before
any nested statement and the pool resets between statements, so it is
counted as a piece of its own and the bodies take the max, as before.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent a949a90 commit b3d79af
1 file changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
114 | 120 | | |
| 121 | + | |
115 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
0 commit comments