Elements of numeric arrays compile again (touches rpg_source.zig) #735
Loading…
Reference in a new issue
No description provided.
Delete branch "lr1-num-elem"
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?
Elements of numeric arrays compile again (touches rpg_source.zig)
Since v0.1.433 the emitted source of a program that does arithmetic on
elements of numeric arrays (
x = a(i) - b(j),x = y + a(i) * z,a(i) = a(i) + 1) failed to compile with RNF7421. The ship gates count emitfailures, not compiles. Seven public twins (SC-ILE/EXPERIMENTS
lr1-num-*:packed(7:2), zoned(5:0) and int(10), standalone
dimand DS subfieldarrays) now pin it.
Two causes:
(the first subfield of a data structure, the first element of an array) was
written with the name of the symbol, so the data structure was an operand
(
A_00255 - A_00255.F28).rpg_eval.zigwrites it asS255.0.characters, and two elements in one statement were not a unit: the compiler
computes both element addresses, then swaps and loads, and it reuses one
temporary.
rpg_array_element.zigreads the address alone (pendingAddress)and lets units share the temporary; the element store takes any element type;
rpg_source_decl_emit.zigdeclarespacked(d:s),zoned(d:s)andint(n)arrays, with no INZ clause for the default value; the assignment accepts an
element target
a(i) = ....Not done: the decimal positions of a packed array are not proved (the array is
packed(7:0)), and a variable index into an array that is a subfield of a datastructure is not a unit.
Gates
0f7fe98ef48206fe12be8206fe12bea331786f89