rpg_argument_copy.zig, rpg_eval.zig, rpg_source_calls_emit.zig: a character field copied to a larger CONST character parameter of a program call #752

Manually merged
binjovi-bot merged 2 commits from lc2k into trunk 2026-11-07 16:36:39 +00:00
Owner

rpg_argument_copy.zig, rpg_eval.zig, rpg_source_calls_emit.zig: a character field copied to a larger CONST character parameter of a program call

cmdexc(G: 20) (dict calls2 statement 70: char(3000) const and packed(15:5) const) stopped
at type_inference / operation 75 in the argument setup. The literal 20 was already read; the
first argument was not. The compiler copies a character field G of 20 bytes to a
temporary of 3000 bytes the way it copies a character literal (program-char): the value is
stored at the start of the temporary, the other 2980 bytes are blanked, and the address of the
temporary is passed with no retag. The only difference is the value: 29 F 0 TY (the field read
whole) in place of 27 LIT.

  • rpg_argument_copy.character reads both. The fact is copied_character_argument_v1, text
    COPY_REF_CHAR_FIELD(FROM S284, LENGTH 20, WIDTH 3000); the literal's text is unchanged. The
    parameter width goes up to 32767.
  • The blank fill of a temporary whose value is a plain field is the pad of the copy
    (rpg_eval builtin), as it is for a literal.
  • The emitter writes the field as the argument and char(3000) const for the parameter.

cmdexc(G: 20) emits CMDEXC(CMDEXC_00284: 20); with *n char(3000) const; and
*n packed(15:5) const;. Still open in dict calls2: cmdexc(G: %len(G)) (statement 72, an expression
for the packed parameter) and xpgm2(R.a: R.b) (76, subfields of a data structure).

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":"regenerated","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":428,"new":428},"twins":{"groups":654,"recovered":645,"regressions":[],"newly":1},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":1012}}
## rpg_argument_copy.zig, rpg_eval.zig, rpg_source_calls_emit.zig: a character field copied to a larger CONST character parameter of a program call `cmdexc(G: 20)` (dict calls2 statement 70: `char(3000) const` and `packed(15:5) const`) stopped at type_inference / operation 75 in the argument setup. The literal 20 was already read; the first argument was not. The compiler copies a character field G of 20 bytes to a temporary of 3000 bytes the way it copies a character literal (program-char): the value is stored at the start of the temporary, the other 2980 bytes are blanked, and the address of the temporary is passed with no retag. The only difference is the value: `29 F 0 TY` (the field read whole) in place of `27 LIT`. - `rpg_argument_copy.character` reads both. The fact is `copied_character_argument_v1`, text `COPY_REF_CHAR_FIELD(FROM S284, LENGTH 20, WIDTH 3000)`; the literal's text is unchanged. The parameter width goes up to 32767. - The blank fill of a temporary whose value is a plain field is the pad of the copy (`rpg_eval` `builtin`), as it is for a literal. - The emitter writes the field as the argument and `char(3000) const` for the parameter. `cmdexc(G: 20)` emits `CMDEXC(CMDEXC_00284: 20);` with `*n char(3000) const;` and `*n packed(15:5) const;`. Still open in dict calls2: `cmdexc(G: %len(G))` (statement 72, an expression for the packed parameter) and `xpgm2(R.a: R.b)` (76, subfields of a data structure). ## 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":"regenerated","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":428,"new":428},"twins":{"groups":654,"recovered":645,"regressions":[],"newly":1},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":1012}} ```
sean force-pushed lc2k from e2c07c6381
All checks were successful
binjovi/ci Binjovi completed the frozen plan
to 8df700c197
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-07 16:26:37 +00:00
Compare
binjovi-bot manually merged commit 8df700c197 into trunk 2026-11-07 16:36:39 +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!752
No description provided.