rpg_source.zig: the indicator at byte 0 of a local data structure is a subfield, and a varying-length subfield is a failure line #793
Loading…
Reference in a new issue
No description provided.
Delete branch "ldsv"
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.zig: the indicator at byte 0 of a local data structure is a subfield, and a varying-length subfield is a failure line
A local data structure declared
likeds(T)whose template hasapproved ind; note varchar(50);(the publicprogram asyncprom,
decisionofapproveAll, symbol 339, 53 bytes) was emitted asand the compile answered RNF7423 (a condition on the structure) and RNF7416 twice (a character store to the
uns(5)), listing sequence 057700, 057800, 058000. It is wrong text with no failure line. Now it isThe object facts
33 339; 6 1; 111 5 1; 6 2; 32 339 0 6; 27 K; 7; 16 Lwith K the compiler's'1' (
rpg_source_ind.testAtStart). It is the form ofrpg_source_ind.subfieldswith no27 OFF; 62, becausethe byte is 0.
narrowPiecesread only29and37at byte 0, so the load named the whole symbol(
if STRUCT;).rpg_eval.varyingalready reads them asA339.1 = 'text'): the data copied to the byte after the two length bytes (97 16 3 16 0, no blank fill,target byte 3) and, in the same statement, the same count stored as two unsigned bytes (
42 339 0 9, byte 1).A character field assigned a literal pads with blanks, and an unsigned field is stored in a statement of its
own. The pair proves the kind (
rpg_source_varying.starts). Before,partTypessaw only the 2-byte store andtyped the byte
uns(5).approveAllholds the 50: a store of aliteral has no length check, and symbol 339 has no read. The length check of a read (
27 MAX; 12; ...; 99 E,error 115) holds it, and
rpg_eval.varyingCheckaccepts it only when MAX is the symbol length less 2, so asubfield read is not recognised. The room to the end of the structure (50 here) is a guess in general, so it
is not emitted.
What the change does
rpg_source_ind.subfieldsandtestAtStart: the byte-0 test above makes byte 0 anindsubfield, andnarrowPiecesnames it (STRUCT.F0).rpg_source_varying.starts: the (symbol, byte) of each varying subfield, true when every access of its twolength bytes is such an assignment, false when a load or another store of them exists.
rpg_source_varying.typed(used bypartReference,paramPart,basedPartOfand the two%SUBSTprobes):such a byte has no type, so the statement that names it is a failure line (with its reason) and the declaration
keeps the bytes as a filler. No
uns(5), novarchar(room).Measured
84eeba13(its emit is that of v0.1.508): statements 619, emitted 318, failures 303; with thechange 619, 316, 305. The two stores (57700, 57900) are failure lines; their old text was RNF7416. The other
five Async emits are byte-identical.
agree.sh: suspect 16, placeholder 10, params_wrong 2 before and after;same 227 to 225 and refused 263 to 265 (the two stores); ds_sub_missing 32 to 31, ds_sub_extra 57 to 55.
emit-all.shandemit-diff.shover 853 programs (the committed twins and the new probe), andcapture-emit-diff.shover the 823 public captures: the only emit that differs is that of asyncprom. The 24lparm-param-shapes captures are the same.
What the change does not do
varchar(N). The battery requestrequests/ldsv/ds-varying(23 cases) asks whether the objectdepends on N (ldsv-n10, ldsv-n50, ldsv-n300, ldsv-tail-split) and where a read holds the MAX (ldsv-read-len,
ldsv-read-len-split). One line of
typedturns the refusal intovarchar(room)if the owner accepts the guess.%len(d.note), a concatenation), store a variable-length value into one,or name a varying subfield of a parameter or a based structure: those statements stay failure lines or keep
their old text.
STARTTHREAD_n.F100 = '1'of the Asyncprograms stays
char(1)), the store of an indicator at byte 0 (d.flag = *on,d.flag = (a > b)), achar(1)subfield at byte 0 compared with a literal (the whole structure is still named), or a structure whosevarchar is at byte 0 with other subfields.
lr1-lv-ds-varying(dcl-s A_00253 varchar(105)for a 107-byte structure ofvarchar(100)andpacked(9:0); the MAX of its length check is 100).Probe and tests
ldsv-asyncprom(the public capture of asyncprom, MIT, source and both twins): its matrix row does notmatch and needs a class.
src/rpg_ds_varying_test.zig: the emitted declaration and statements of the probe, and the refusals ofrpg_source_varying.typed.Gate
90f501155fa629c853aa