rpg_source_decl_emit.zig, rpg_source_decl.zig, rpg_source.zig: a character field whose start value holds control bytes is declared in hexadecimal, in the lines of the source (lane Lgd3; changes rpg_source.zig; on top of lgd3) #777
Loading…
Reference in a new issue
No description provided.
Delete branch "lgd3b"
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_source_decl_emit.zig, rpg_source_decl.zig, rpg_source.zig: a character field whose start value holds control bytes is declared in hexadecimal, in the lines of the source (lane Lgd3; changes rpg_source.zig; on top of lgd3)
Cause (public battery lgd2-long-start, v0.1.490 Debug build with the refusal tracer)
lgd2-b-hex-50/-90/-150,lgd2-c-hex-600(declare s03): the start value ofchar(N)holds thecontrol bytes
00 01 FF.inzTextgives no rule for a character field with a byte below 40, thedeclaration is refused ("the initial value has no rule") and both statements that read it fail.
lgd2-d-whole-100/-150/-200(declare s03): the same refusal. The symbol is a data structure that thestatements read whole, so no subfield is proved and it is declared as one character field.
inz(on its own line, 4 blanks, 88 digits a line) needs one linemore than the source: lgd2-b-hex-50 needs 7 lines for the 6 before the first statement.
Rule
controlStart: a character field that a statement names, with a wholebytesstart value that holds a bytebelow 40, is declared with
inz(x'...'). Not for a field no statement names (the compiler has such fields),a varying field, an array, a value that starts as a length prefix, or a symbol that a statement stores into
or resets (r6a-reset-ds/-fixed/-two: the symbol is a data structure with a subfield at byte 0).
fitGlobals: when the declarations need more lines than there are before the first statement, the wrap iswrapTight:inz(x'stays on the line of the name and the pieces run to 100 bytes with no indent.Measured
src/rpg_lgd3_test.zig(adopted captures lgd2-b-hex-50, lgd2-b-hex-90, lgd2-c-hex-600): noSOURCERER-FAIL, the type and the hexadecimal start value equal those ofsource.rpgle, no line over 100bytes.
rpg_source_decl.zig:wrapTightof 100 digits is two lines, the first of 100 bytes.b-hex-50/-90/-150, c-hex-600, d-whole-100/-150/-200 (d-whole is clean as
dcl-s char(100) inz(x'...'); whetherit compiles to the object of the structure is open: request lgd3/decl-shape dw-char, dw-ds1).
src/testdata(emit text, lgd3 against this build): one differs,lr1-ld-ds-two-text (statements emitted 3 -> 4, failures 1 -> 0, one
decimal_positionsplaceholder; thedeclarations fit the lines in the tight wrap). With the store/reset exclusion the three r6a-reset-* saves are
unchanged (without it they gained a wrong
char(13)declaration).Gates (ship.sh):
f5336af6cecdc3701992