The emitter writes thread(*concurrent) and declares thread-local static fields (touches rpg_source.zig) #782
Loading…
Reference in a new issue
No description provided.
Delete branch "lext4"
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?
Lane Lext, round four. The statements of a THREAD(*CONCURRENT) module recover since
rounds one to three; its text still refused two things: the module keyword
(
SOURCERER-FAIL THREAD(*CONCURRENT)), and every static field (no declaration of symbol N: flag word 0x7000c100: not a declaration), so no concurrent twin could rebuild its object.The rule
rpg_source_decl.concurrentproves a concurrent module: the compiler's own frame areas (thekind 8 static symbols with the flag word
0xf800c000, six in every public module with aprocedure) all carry the thread-local bit 0x100 and none lacks it. The bit is on every static
data symbol of the 25 public concurrent captures and of the six L10 development programs,
except
static(*allthread)fields and the compiler's symbols for a local one, and on no staticsymbol of the 781 public twins or of
lext-serialize-c. The bit on a field alone, or on someframe areas only, proves nothing: that module keeps a failure line (
threadLocalStorage,text changed to "not proved to be a concurrent module").
ctlOptwritesthread(*concurrent)for a proved module.rpg_source_decl.declaredInreads a static symbol of a proved module by its flag word withoutthe bit (
sourceField), so the declaration emitter andrpg_source_unused.staticsdeclare athread-local field exactly as the plain twin does (
lext-call-void-chas thedcl-slines oflext-call-void-p). A module that is not proved keepsdeclared.rpg_source.userStartcompares the flag word without the bit. With the raw word it was 0 in aconcurrent module (the first fixed symbol,
0x08008100, was not found), so no fixed symbol of thecompiler was refused as a field, and no unused field was found (
sourceEndneeds the start).rpg_source.zigis touched in these places only:ctlOpt(the keyword and the two failurelines),
userStart(above),Decl.allthreadandDecl.storagewith their four uses in thedcl-s,dcl-ds, template and likerec lines (they replaceif (d.static) " static" else ""),the pointer test of a based structure (
decl_mod.declaredInfordeclared), and the removedalias
declared.rpg_source_decl_emit.zig: the field test indeclare, theallthreadflag,and
fitGlobals(an allthread field is not moved into a subprocedure).static(*allthread): in a proved module a field of the source (allthread: class 3, no bit, theflag word of a field, inside the range of the source symbols
userStarttosourceEnd) is writtenwith
static(*allthread)(Decl.allthread), and it is never moved into a subprocedure byfitGlobals. Proof of the keyword:lext-static-all-c(sharedhas no bit,localhas it),lext-allthread-local-cand-noinz-c, and the eight globalstatic(*allthread)declarations ofeach L10 development program are the eight symbols without the bit; no field of the source has the
bit off otherwise.
fields (the plain twin
lext-static-all-pstoresinz(0)into both fields;lext-static-all-cstores only into the thread-local one), and the allthread field has no store at all: asyncbg has
gNextSlot int(10) inz(1) static(*allthread)and no operation stores 1 into it. The text is writtenwithout a start value, and the trailer failure line "the start value of a static(*allthread)
field is in no operation of the module and is not written" stays in every module that has such a
field.
static(*allthread)field also has compiler symbols without the bit that are nofield (a flag and a 32-byte area, flag words
0x7800c000and0x6000c000;lext-allthread-local-c,-noinz-c, and asyncage, the one L10 program with such a field). Which field is the local one is notproved, so
localAllthreadkeeps a trailer failure line:THREAD(*CONCURRENT): a static symbol without the thread-local bit that is no field of the source (a procedure-local static(*allthread) field) has no emit rule; it stands for the start-value line as well (one line).The fields are still written, at module level with the keyword, and the statements that name them
are emitted.
staticinside a procedure (lext-local-static-c) has the bit like every otherfield and is declared as in a plain module.
thread(*serialize)is unchanged (serialized); a plain module gets no thread keyword.Evidence
src/rpg_lext4_test.zig(red before: the emit oflext-call-void-chad the failure line and nokeyword, and the
dcl-slines differed fromlext-call-void-p): the keyword and the plaindeclarations of the concurrent twins, no failure line but the partial compiler statement in the six
lext-call-*-ctwins, no thread keyword in the plain twins,thread(*serialize)kept, onestatic(*allthread)and one plain field inlext-static-all-c, the localstaticplain, thelocal
static(*allthread)failure line, and the predicates on mutated symbols (the bit cleared on theframe areas, on one frame area). Two probes are adopted as twins:
lext-static-all-c,lext-local-static-c.Counter, public (the 25 concurrent captures of
lext-thread-call,lext-psds-call,lext-allthread-local,lext-allthread-local-r2; emits with no failure line other thancompiler statement ... is partial): 0 of 25 before, 8 of 25 after (lext-call-void-c,-const-c,-value-c,-ref-c,-nested-c,-ret-c,lext-ptr-cmp-c,lext-local-static-c).lext-static-all-chas 1 failure (the start value, above) and emits all 4 statements. Counter, L10development data (six programs, Debug build,
sourcerer --json savf rpgle),[statements, emitted, failures]:Read against the base emit of asyncbg: the ten new statements are the ones that named a thread-local
field without a declaration (
STARTTHREAD_00515 = 0;,if STARTTHREAD_00514;,else;,endif;), and thedeclarations of seven fields now carry
static(*allthread). Everyctwin that has a plain sibling(
void,ret,import,export-main,ptr-cmp,psds-void,static-all) has the emit of the siblingmodulo the
ctl-optkeyword, the allthread keyword and the failure lines.Gate (emit of all 833 stripped public programs, base against this build): 0 worse, 12 better, failures
613 to 590, emitted 7,920 to 7,932, only the 14 emits of concurrent twins differ in bytes (every plain
twin byte for byte equal); twins: 826 groups, 804 recovered, 0 regressions, 0 newly recovered; the twins that were committed on trunk with a
THREADfailure lose thatline (their failure count falls);
lext-allthread-local-cand-noinz-ckeep 3 failures (the line isreplaced by the local
static(*allthread)line).What keeps a failure line, and what is not proved
static(*allthread)field (the trailer line above).static(*allthread)text of a data structure, an array, a pointer, a packed field is written bythe same rule, but no public capture compiled it (only int(10) in
lext-static-all-c; the L10sources have them and the text follows them). The coordinator's round trip of
lext-static-all-cand
lext-local-static-cdecides; the batteryrequests/lext/allthread-decl(11 cases) asks therest, and whether
inz(5)on an allthread field leaves any trace in the module.a packed, zoned, structure or file field: the
0x08008000marker inrpg_source_scale.zig(twosites) and
rpg_source_iospec.zig,udateKeyinrpg_source.zig, and the0x70000000tests inrpg_source_byref.zig. A concurrent module with such a field may still fail there.SOURCERER-FAIL PSDSstays),if/endifread asselect,calls of imported procedures,
callp(e)andmonitor: not this round.Release gate (coordinator, build of
94b9cae1against v0.1.498)94b9cae1: all gates passed (census 645/0, twins regressions none, emit worse none).emit-bytes-diff.sh): onlythread(*concurrent)twins change.capture-emit-diff.sh): 31 change, none with fewer emitted statements or more failures;thread(*concurrent)in thectl-optagrees with the source in all 40.lext-call-void-c,-const-c,-value-c,-ref-c,-nested-c,-ret-cdifferent, nowmatch;lext-ptr-cmp-candlext-local-static-cdifferent in both (fewer differing components);lext-static-all-crefused in both (unsupported_layout, the comparison);lext-serialize-cmatchin both.94b9cae1a6to1ee33ceaa0