rpg_trace: a scan scope marks a refusal inside a rule loop as scan #815

Manually merged
binjovi-bot merged 1 commit from lane-sc3-scan-scope-20261117 into trunk 2026-11-17 17:40:43 +00:00
Owner

rpg_trace: a scan scope marks a refusal inside a rule loop as scan

  • core/rpg_trace.zig gains scanBegin(), scanEnd() and scanDepth(): a depth counter (Debug builds and tests only; a Release build compiles it to nothing). While the depth is above 0, at, ret, atOperand and retOperand print scan <file>.<function> <site> instead of refusal ..., whatever function prints the token. The per-site marks of lanes Sc and Sc2 are kept.
  • Wrapped rule loops: rpg_value_units.rewrite (the unit rule list, abs, int_cast) and rpg_value_units.replace (one rule at every index, which includes floatDecimal); rpg_trim.rewrite (whole-body recognizers and the index loop); rpg_choice.rewrite (extreme, boolean); rpg_frames.withoutDeadStores; rpg_file_ops.Reader.unit (the list of 34 readers); in rpg_eval.runValues the calls of ccsid_convert.rewrite and ucs2.rewrite.
  • Left outside the scope: the call sites of rpg_frames.rewrite and rpg_programs.rewrite (a call that does not read stops its statement), runValues s08 and s09, run s01, and the final rpg_file_ops.unit s01 after every reader declined.
  • No emit byte changes; the release binary is unchanged.
  • src/rpg_scan_marker_test.zig: a refusal in scope prints scan, the same site outside prints refusal, nesting restores the depth, and each wrapped loop opens the scope.

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","legend":"current","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":738,"new":738},"twins":{"groups":1022,"recovered":1015,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"unit":{"exit":0,"last":"ship-unit: src/rpg_trace_test.zig ok"},"full_check":{"exit":0,"seconds":1149}}
# rpg_trace: a scan scope marks a refusal inside a rule loop as scan - `core/rpg_trace.zig` gains `scanBegin()`, `scanEnd()` and `scanDepth()`: a depth counter (Debug builds and tests only; a Release build compiles it to nothing). While the depth is above 0, `at`, `ret`, `atOperand` and `retOperand` print `scan <file>.<function> <site>` instead of `refusal ...`, whatever function prints the token. The per-site marks of lanes Sc and Sc2 are kept. - Wrapped rule loops: `rpg_value_units.rewrite` (the unit rule list, `abs`, `int_cast`) and `rpg_value_units.replace` (one rule at every index, which includes `floatDecimal`); `rpg_trim.rewrite` (whole-body recognizers and the index loop); `rpg_choice.rewrite` (`extreme`, `boolean`); `rpg_frames.withoutDeadStores`; `rpg_file_ops.Reader.unit` (the list of 34 readers); in `rpg_eval.runValues` the calls of `ccsid_convert.rewrite` and `ucs2.rewrite`. - Left outside the scope: the call sites of `rpg_frames.rewrite` and `rpg_programs.rewrite` (a call that does not read stops its statement), `runValues` s08 and s09, `run` s01, and the final `rpg_file_ops.unit` s01 after every reader declined. - No emit byte changes; the release binary is unchanged. - `src/rpg_scan_marker_test.zig`: a refusal in scope prints `scan`, the same site outside prints `refusal`, nesting restores the depth, and each wrapped loop opens the scope. ## 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","legend":"current","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":738,"new":738},"twins":{"groups":1022,"recovered":1015,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"unit":{"exit":0,"last":"ship-unit: src/rpg_trace_test.zig ok"},"full_check":{"exit":0,"seconds":1149}} ```
rpg_trace: a scan scope prints a refusal inside a rule loop as scan
All checks were successful
binjovi/ci Binjovi completed the frozen plan
83b27e66ba
binjovi-bot manually merged commit 83b27e66ba into trunk 2026-11-17 17:40:43 +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!815
No description provided.