rpg_array_element.zig, rpg_eval.zig: parts of an element, arrays inside a data structure, stores at a variable index #743
Loading…
Reference in a new issue
No description provided.
Delete branch "lc2c"
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_array_element.zig, rpg_eval.zig: parts of an element, arrays inside a data structure, stores at a variable index
The bounds check of a variable array index defines two labels (operation 15).
The element unit owned them only for a whole element, a character part read,
and the whole-element store. Now it also owns them in these cases:
integerFieldtakes a signed or unsignedbinary index of 1, 2, 4 or 8 bytes. Only
int(5)(dict arrays-b-b 19) ismeasured; the other widths follow the same
29 N 0 T; 75 8pattern, whichthe unit still requires in full.
rec(i).code = 7,total = rec(i).code,l3b-ds-var 10 and 11), shown as the bytes
%SUBST(A(i): 1: 4).rec(i).name = 'ITEM',l3b-ds-var 12): the store and the fill of the rest of the field are one
%SUBST(A(i): 5: 9) = 'ITEM'.%subst(names(i): 4: 3) = 'xyz',l3b-subst-var 8).
rec.a(i) - rec.b(j),lr1-num-in-ds, lr1-num-pk-ds, lr1-num-zd-ds statements 21, 23, 25): the
array address is
34 A Kor33 A; 27 K; 62; the array does not fill itssymbol, so the bounds, not the symbol length, give the dimension. The text
is
S255.20(S254). Such an array declares nothing (array_element_v1isnot recorded for it), so the declaration emitter is unchanged.
An element address whose element type is unknown (the copy of a substring)
records no
array_element_v1fact, because the emitter reads the elementtype from it.
Parked:
S = %CHAR(I)of an integer (branchlc2b, commit 9f771bcd)rpg_trim.charAssignrecognizes the zoned convert, the leading-zero andsign strip loop and the copy tail of
S = %CHAR(I)(h-editc 44, h-now1 53).Both statements recover, no dev emit gets worse, and the held-out line is
unchanged, so it is a public-only gain. It is stacked on
lc2and notshipped; a later slot can ship it. d4-edit 14 (
%trim(%char(i))) stays open:its trim loops use a variant that
halvesdoes not read.Next operation 15 candidate:
%SCAN(%TRIM(H) : C)Eleven dict batteries (sv4 to sv14) stop at statement 21,
I = %scan(%trim(h) : c), on the first label of the trim loop. The loops are the ones thatrpg_trim.argumentUnitreads, but the call passes the trimmed pointer firstand the length of the trimmed value later (
27 P; 113 q 1; 34 C 0; 113 q 1; ...; 27 N; ...; 99 SCAN 7), andargumentUnitrequires27 P; 113 q 1; 27 Nin a row. The change is to read the two loads apart.
Still at operation 15, by construct (no change here)
%INTof%TRIMof a varchar,%TRIML,%TRIMR(dict numtrim 31, 35, 43);two trims concatenated (d4-lemon-battery 24);
%SUBSTwith a variable start,%REPLACE,%LEFT,%RIGHT,%CHECK,%CHECKR(h-bifs-char);%LOOKUP(dict arrays-a-a);
%SQRT(dict bifs-num-b 19).Gates