Commit 436f980
committed
Fix stale marker bug in labeled blocks
Root cause: Labeled blocks were not clearing the RuntimeControlFlowRegistry
when they exited, causing stale markers to affect subsequent labeled blocks.
This caused uni/variables.t to stop at test 56 because an eval with a labeled
block left a marker that interfered with later SKIP blocks.
Fix: Clear the registry when exiting any labeled block.
Changes:
- EmitBlock.java: Call RuntimeControlFlowRegistry.clear() when exiting labeled blocks
- skip_control_flow.t: Add test case #10 for stale marker bug
Results:
- skip_control_flow.t: all 10 tests pass ✓
- uni/variables.t: 66683/66880 (baseline maintained) ✓
- op/pack.t: baseline maintained ✓
- make: BUILD SUCCESSFUL ✓1 parent e93244a commit 436f980
File tree
3 files changed
+31
-0
lines changed- src
- main/java/org/perlonjava/codegen
- test/resources/unit
3 files changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
0 commit comments