rpg_statements.zig, rpg_source.zig: a select head has the empty statement region, and an export procedure is not the cycle main #783
Loading…
Reference in a new issue
No description provided.
Delete branch "lsel"
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?
Two false readings had one cause, and the change makes both from object facts.
renderStatementread every codeless statement that stands before acondition as the head of a
select. Thedcl-procof an exportedprocedure and an
endifthat lands a forward jump came out asSELECT/WHEN,so
if/endifblocks were refused. The head of a realselect;is thestatement whose whole operation family is the empty statement region,
110 108 111 6 111 6 [27 35](rpg_select_head.isHead). Thedcl-proc,else,other,endifandendslstatements are bare (110 108 27 35 ...).exportprocedure, and anexported procedure was read as the cycle main (no
DCL-PROC, no procedureend, the main-only readers). The cycle main is symbol 1; an export
procedure has another symbol (
Module.isCycleMain). All six readers of"class 1 is the main" use it:
rpg_statements(the exit label and thesubprocedure frame),
rpg_source(isMain),rpg_cycle_transfer,rpg_cycle_template,rpg_specs(the main body tail) andrpg_file_ops(the main of the file runtime).
The question per case (battery
captures/lsel-select-head, 24 cases,DBGVIEW(*ALL),option(*srcstmt))The empty region stays on every real
select;head and on no other statement.Read over every statement of the 24 cases: the family is exactly
110 108 111 6 111 6 27 35for 14 of 14select;lines, whether the constructis the first statement of an exported or a local procedure, follows an
assignment, follows an
if/endifblock (withiforselectafter it),stands in an
else, in adoubody, in theforloop of the Async_AwaitAllshape (array element of a
dim() const options(*varsize)parameter, and thescalar twin), or is the first statement of a cycle main;
exp-sel1(aselectwith one
when) andthread(*concurrent)keep it. Everydcl-proc,else,other,endifandendsl(and theendifthat precedes anifor aselect) has the family110 108 27 35plus, for adcl-proc,111 111 111 111 111.Neither direction has an exception in the 24 cases and in the six Async
programs (2 of 2
select;lines). The prefix110 108 111 6 111 6alone isnot enough: an
if, adowand thereturn;of a cycle main open with it andcarry code after it, so the rule compares the whole family.
Symbol class 1: the cycle main of
lsel-cyc-*is symbol 1; the exportedprocedure of
lsel-exp-*andlsel-for-arr-*(and the 26 exports of eachAsync program) is class 1 with another symbol; symbol 1 of a module with
main()or
nomainis class 3. All 753 class 1 procedures of the committed stripped RPGtwins are symbol 1; the other class 1 symbols of the twins (symbol 2 and 3) are C
modules (
source.c), which are not read as RPG.Counter
lsel-count.shon the six public Async captures (l10-pgm-a1,l10-pgm-a2):iflinesdcl-proclinesselect/when/other/endsllines)The recovered count of those captures falls by 66 because the false readings
left; that fall is the correction, not a regression. The counter counts
source; recoveredstatements: the 66 falseSELECTheads ondcl-proclinesare now
declaration; recoveredDCL-PROC NAME(and 126END-PROCthat wereunresolved are now
declaration; partial). Statement by statement over thesix captures (3671 statements before and after), no statement is lost: 450
change, among them 72
ENDSLtoENDIFand 66WHENtoIF. Where theifcondition itself is unresolved (a call in the condition), itsendifisnow
? (no operation)where it was a falseSELECT.Gates measured on the lane build (Debug)
only the three adopted probes below change; no committed twin with a real
selectchanges.lsel-exp-if(export,if),lsel-exp-sel(export,select),lsel-for-arr-if-if(the Async_AwaitAll loop shape) andlsel-cyc-sel(the real
select;of a cycle main stays). Their emit still carriesSOURCERER-FAIL lines (the emit of an
exportprocedure is not written:DCL-PROC TARGETis refused), so the three exported ones need a matrix classby the coordinator.
exportprocedure(no battery case has both); request
requests/lsel/cyc-export(2 cases).exportprocedure is not written (isSubprocedurestill wantsclass 3 and the keyword
exportis not emitted): the emit failures of theadopted exported probes rose (exp-if 5 to 8, exp-sel 8 to 13) while their
statements are now read right. The next change.
Tests:
src/rpg_select_head_test.zig.Release gate (coordinator, build of
cc9bee25against v0.1.499)cc9bee25: every gate passed (census 645/0, twins regressions none, emit worse none); the row isok: falseonly for the push after the rebase, done afterwards withpush.sh --force-with-lease.emit-bytes-diff.sh): byte-identical. L10-test direction: rose.capture-emit-diff.sh): 22 change. Where the emitted count falls (exported-procedure probes, the six public Async programs), the base text was false: aselect/when/endslfor a sourceif/endif, and a module-leveldcl-pitaken from the exported procedure. The head refuses those lines (DCL-PROC NAME, the parameter of the exported procedure) until the emit of anexportprocedure has a rule; that is the next change.lsel-cyc-sel,lsel-cyc-if,lsel-cyc-stmt-selallmatch.captures/lsel-cyc-export(a cycle main and anexportprocedure in one module, two cases): the cycle main is symbol 1 in both and both procedures read correctly; not adopted as a test yet.cc9bee25f6039411ecd1