A GOTO back to a TAG no longer reads as the end of a loop #709

Manually merged
binjovi-bot merged 1 commit from l2d-label-in-value into trunk 2026-11-03 17:45:59 +00:00
Owner

A GOTO back to a TAG no longer reads as the end of a loop

isTag (rpg_fixed_branch.zig) refused a label whose defining statement is a
plain jump to an earlier label, because the ENDDO of a DOU is 18 head; 15 exit. A GOTO back to a TAG has the same shape, so the TAG after it
(GOTO ALPHA before ZULU TAG) was never proven and the CABxx that takes it
(N CABGT 9 ZULU) kept block_owner and the label of its jump. The plain
jump now counts as a loop end only when its destination is not itself a TAG.
A loop head fails isTag on its own (the statement after it has code).

Not done: a label inside a value. Cutting the guard 27 A; 27 B; 8; 16 L1; ...; 15 L2 1; 15 L1 1 of %LEFT in h-bifs-char (S = %left(C: 3)) lets the
evaluator read the copy as S = C, which drops the length: an unsound text.
The labels need a rule that carries the length first (a builtin of lane L1).
FLOW/lx-total statement 3 fuses the SETON LR with the total calculation of
the cycle; its labels belong to the cycle lane.

rpg_eval.zig step is unchanged; rpg_statements.zig is unchanged.
Public twins (host build, Debug) against trunk 8f9f016a: 1 group turns
recovered (hx-tags-order, the TAG statement), 0 regressions.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","emit":{"worse":[],"better":15,"newly_clean":3,"clean_delta":3,"base":317,"new":320},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/DSPLY/error-observable/archive.savf 4","savf/SC-ILE/DSPLY/error-stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/h-bifs-char/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/h-now1/stripped/object.savf 4","savf/SC-ILE/EXPERIMENTS/h-now2/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/hx-tags-order/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/r5e-date-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 3","savf/SC-ILE/FLOW/conditions-observable/archive.savf 3","savf/SC-ILE/FLOW/conditions-stripped/archive.savf 3","savf/SC-ILE/FLOW/qualified-subroutines-observable/archive.savf 1","savf/SC-ILE/FLOW/qualified-subroutines-stripped/archive.savf 1","savf/SC-ILE/FLOW/scan-observable/archive.savf 2","savf/SC-ILE/FLOW/scan-stripped/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":825}}
# A GOTO back to a TAG no longer reads as the end of a loop `isTag` (rpg_fixed_branch.zig) refused a label whose defining statement is a plain jump to an earlier label, because the ENDDO of a DOU is `18 head; 15 exit`. A GOTO back to a TAG has the same shape, so the TAG after it (`GOTO ALPHA` before `ZULU TAG`) was never proven and the CABxx that takes it (`N CABGT 9 ZULU`) kept `block_owner` and the label of its jump. The plain jump now counts as a loop end only when its destination is not itself a TAG. A loop head fails `isTag` on its own (the statement after it has code). Not done: a label inside a value. Cutting the guard `27 A; 27 B; 8; 16 L1; ...; 15 L2 1; 15 L1 1` of %LEFT in h-bifs-char (`S = %left(C: 3)`) lets the evaluator read the copy as `S = C`, which drops the length: an unsound text. The labels need a rule that carries the length first (a builtin of lane L1). FLOW/lx-total statement 3 fuses the SETON LR with the total calculation of the cycle; its labels belong to the cycle lane. rpg_eval.zig `step` is unchanged; rpg_statements.zig is unchanged. Public twins (host build, Debug) against trunk 8f9f016a: 1 group turns recovered (hx-tags-order, the TAG statement), 0 regressions. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","emit":{"worse":[],"better":15,"newly_clean":3,"clean_delta":3,"base":317,"new":320},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/DSPLY/error-observable/archive.savf 4","savf/SC-ILE/DSPLY/error-stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/h-bifs-char/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/h-now1/stripped/object.savf 4","savf/SC-ILE/EXPERIMENTS/h-now2/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/hx-tags-order/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/r5e-date-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 3","savf/SC-ILE/FLOW/conditions-observable/archive.savf 3","savf/SC-ILE/FLOW/conditions-stripped/archive.savf 3","savf/SC-ILE/FLOW/qualified-subroutines-observable/archive.savf 1","savf/SC-ILE/FLOW/qualified-subroutines-stripped/archive.savf 1","savf/SC-ILE/FLOW/scan-observable/archive.savf 2","savf/SC-ILE/FLOW/scan-stripped/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":825}} ```
Prove the TAG after a GOTO back to a TAG
All checks were successful
binjovi/ci Binjovi completed the frozen plan
7c7c0fddc7
binjovi-bot manually merged commit 1370d7279f into trunk 2026-11-03 17:45:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!709
No description provided.