rpg_programs.zig, rpg_argument_copy.zig: a character literal copied to a CONST parameter of a program call #749
Loading…
Reference in a new issue
No description provided.
Delete branch "lc2i"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rpg_programs.zig, rpg_argument_copy.zig: a character literal copied to a CONST parameter of a program call
invoke('HELLO': number)to anextpgmprototype withtext char(10) const(SC-ILE/EXPERIMENTS program-char) stopped at type_inference / operation 75, the
frame of the call. Operation 75 is not the cause:
rpg_programs.callrefused thecall before the frame was removed, and the fallback to the raw operations
reported the first operation it could not read. Two causes:
35 V; 33 V; 113 q m; 4 N 1for everyentry. The entry of a character literal that the call copied has no retag
(
35 V; 33 V; 4 N 1): the address of the copy is passed as it is. The parsenow walks the list from its end, takes the retag when it is there, and gives the
entry mode 3 when it is not.
parameter's width, blanks the other bytes behind it (
97 0 3 10 0) and passesthe address of the temporary.
rpg_argument_copy.characterproves the wholeunit against the original operations (the temporary and the pointer are
compiler temporaries of the procedure, the literal is shorter than the
parameter, the two counts agree, the blank is x'40', the prototype is the
measured program descriptor, and nothing names the temporary between the copy and
the call). The fact is
copied_character_argument_v1, textCOPY_REF_CHAR(HEX(C8C5D3D3D6), WIDTH 10); the source emitter writes theliteral and the
char(10) constparameter of the prototype.invoke('HELLO': number)now emitsINVOKE('HELLO': INVOKE_00254);with*n char(10) const;in the prototype.Open: the decimal conversions of a program call (not done)
Three public twins stop in the same place, at the copy of a decimal argument, and
are not read:
61 16 0 0);61 9 -1 0, one digit dropped);75 8; 86 20; 61 9 0 0).rpg_decimal_copy.inspectreads exactly one conversion, packed 16 digits to 15 atshift 0, and its fact (
COPY_REF_PACKED_CHECKED) states what the host measured forit: MCH1202 on invalid data, MCH1210 on overflow, the receiver unchanged and no call.
Nothing measures those rules for the three conversions above; a shift of -1 loses a
digit. They stay open until a run states the exceptions and the truncation; a rule
without it would be a guess that no gate catches.
Gates