rpg_statements.zig, rpg_eval.zig: calls with a CONST buffer argument, and imports shared by several prototypes #746

Manually merged
binjovi-bot merged 6 commits from lc2f into trunk 2026-11-07 11:56:18 +00:00
Owner

rpg_statements.zig, rpg_eval.zig: calls with a CONST buffer argument, and imports shared by several prototypes

Fifty public statements stopped at type_inference / operation 75 (r9r-decstr 4,
dict calls2 to calls5, CALLS 7, program-). Operation 75 is not the cause: it
belongs to the frame of a call (29 44 96 3; 5; 75 2; 42 252 0 N) that
rpg_frames.zig already rewrites to one call operation. The run of the rewritten
call failed, and the fallback to the raw operations reported the first operation
it could not read. Three causes, found with the lc2-concat-forms battery
(SC-ILE/EXPERIMENTS/lc2-cat-
) and the dict calls rows:

  • No name for an import. Several prototypes bound to one external procedure
    (extproc('strcat') in dict calls3 to calls5) give a module import table of 24
    rows against 17 program imports, so imports.resolve refuses the pairing and
    rpg_statements.importNames kept no name. The first word of a module table row
    is the symbol of the import. imports.symbolNames names each requested symbol
    from its called row, and only when the old pairing fails; a symbol with no
    called row leaves every import unnamed, as before. importNames changes in two
    existing lines (net growth 0).
  • A CONST character argument built by a concatenation. The compiler copies the
    value to a buffer and blanks the rest. The padded-buffer rule took only a
    literal as the value; it now also takes the text that concatenated joined from
    the pieces of a buffer (Eval.joined). CALLP SHOWC(S255 + S256)
    (lc2-cat-call-const-char).
  • A varying-length CONST argument. The copy of the value to byte 2 of a
    temporary, then the store of the same length to bytes 0 and 1, now leaves the
    temporary holding the value (varyingTemp), as varying does for a field.
    S255 = DECSTR('12') (r9r-decstr 4). The merge takes a line back, so run
    voids a clean point that lies after the lines that remain; without it the
    statement reader indexed past the lines (TLICR, TRPG3).

dict-calls3, dict-calls4 and dict-calls5 are adopted as probes. Still open in
those rows: opdesc and *string arguments (calls3 67, 83), procedure pointers
(calls4), cmdexc and a data structure argument (calls2).

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":2,"newly_clean":1,"clean_delta":1,"base":415,"new":416},"twins":{"groups":649,"recovered":640,"regressions":[],"newly":27},"allgroups":{"regressions":[],"newly":["savf/SC-CONSTRUCT/TLICR/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r9r-decstr/stripped/object.savf 1"],"worse":["savf/SC-CONSTRUCT/TLICR/archive.savf|TLICR.PGM|3031-3121","savf/SC-CONSTRUCT/TRPG3/archive.savf|TRPG3.PGM|3179-3362"]},"full_check":{"exit":0,"seconds":826}}
## rpg_statements.zig, rpg_eval.zig: calls with a CONST buffer argument, and imports shared by several prototypes Fifty public statements stopped at type_inference / operation 75 (r9r-decstr 4, dict calls2 to calls5, CALLS 7, program-*). Operation 75 is not the cause: it belongs to the frame of a call (`29 44 96 3; 5; 75 2; 42 252 0 N`) that `rpg_frames.zig` already rewrites to one call operation. The run of the rewritten call failed, and the fallback to the raw operations reported the first operation it could not read. Three causes, found with the `lc2-concat-forms` battery (SC-ILE/EXPERIMENTS/lc2-cat-*) and the dict calls rows: - **No name for an import.** Several prototypes bound to one external procedure (`extproc('strcat')` in dict calls3 to calls5) give a module import table of 24 rows against 17 program imports, so `imports.resolve` refuses the pairing and `rpg_statements.importNames` kept no name. The first word of a module table row is the symbol of the import. `imports.symbolNames` names each requested symbol from its called row, and only when the old pairing fails; a symbol with no called row leaves every import unnamed, as before. `importNames` changes in two existing lines (net growth 0). - **A CONST character argument built by a concatenation.** The compiler copies the value to a buffer and blanks the rest. The padded-buffer rule took only a literal as the value; it now also takes the text that `concatenated` joined from the pieces of a buffer (`Eval.joined`). `CALLP SHOWC(S255 + S256)` (lc2-cat-call-const-char). - **A varying-length CONST argument.** The copy of the value to byte 2 of a temporary, then the store of the same length to bytes 0 and 1, now leaves the temporary holding the value (`varyingTemp`), as `varying` does for a field. `S255 = DECSTR('12')` (r9r-decstr 4). The merge takes a line back, so `run` voids a clean point that lies after the lines that remain; without it the statement reader indexed past the lines (TLICR, TRPG3). dict-calls3, dict-calls4 and dict-calls5 are adopted as probes. Still open in those rows: `opdesc` and `*string` arguments (calls3 67, 83), procedure pointers (calls4), `cmdexc` and a data structure argument (calls2). ## 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":2,"newly_clean":1,"clean_delta":1,"base":415,"new":416},"twins":{"groups":649,"recovered":640,"regressions":[],"newly":27},"allgroups":{"regressions":[],"newly":["savf/SC-CONSTRUCT/TLICR/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r9r-decstr/stripped/object.savf 1"],"worse":["savf/SC-CONSTRUCT/TLICR/archive.savf|TLICR.PGM|3031-3121","savf/SC-CONSTRUCT/TRPG3/archive.savf|TRPG3.PGM|3179-3362"]},"full_check":{"exit":0,"seconds":826}} ```
binjovi-bot manually merged commit 86df56666e into trunk 2026-11-07 11:56:18 +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!746
No description provided.