The status unit of a call in a THREAD(*CONCURRENT) or THREAD(*SERIALIZE) module (regenerates docs/OPERATIONS.md) #779
Loading…
Reference in a new issue
No description provided.
Delete branch "lext2"
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?
The status unit of a call in a THREAD(*CONCURRENT) or THREAD(*SERIALIZE) module (regenerates docs/OPERATIONS.md)
Lane Lext, round two. Round one (v0.1.495) let the statement readers accept
thread-local static storage; the call statements of the L10 development
programs still stopped, every one of them, at the status unit after the call
(
type_inference, operation 75 at the head of the statement). The batteryrequests/lext/thread-call(24 captures) reproduces two families in publictwins and the status unit is one of them.
What the captures show
A call of a procedure of the module has the frame of
rpg_frames.framebeforeit and a status unit after it. A module without THREAD tests the status at the
frame:
29 F 96 Q; 32 B 0 I2; 27 1; 7; 16 L; 27 1; 35 R; 18 E; 15 L; 27 0; 35 R; 15 E(lext-call-void-p, lext-call-ret-p). In a thread module the unit is27 0; 35 Rand nothing else: R, the call status, is cleared and not tested(lext-call-void-c, -const-c, -value-c, -ref-c, -nested-c, -ret-c). The same
unit ends the calls of a THREAD(*SERIALIZE) module (lext-serialize-c), whose
symbols do not have the thread-local bit, so the unit is the proof and not the
bit. A call with
callp(e)or inside amonitorkeeps its other forms(lext-call-error-c, lext-call-monitor-c).
The rule
rpg_frames.threadStatus, tried first byrpg_frames.status: the twooperations
27 0(a 4-byte integer constant 0) and35 R, with R the callstatus of
status(the statement status, or a static 4-byte binary). It readsnothing and has no label, so it has no effect to prove away besides R = 0. The
frame proof before it is unchanged. Eight captures are adopted as twins
(
EXPERIMENTS/lext-call-void-c,-void-p,-const-c,-value-c,-ref-c,-nested-c,-ret-c,lext-serialize-c);src/rpg_lext2_test.zigassertstheir calls (
CALLP BUMP(),CALLP ADDTO(5),S254 = TWICE(TWICE(2)), ...),that the control still reads its status test, and that a store that is not the
call status leaves the statement open. Before the rule the thread twins had 1 to
3 unresolved statements (every call); after it none, and
lext-call-void-chas the 6 recovered statements of
lext-call-void-p.Counter
L10 development data (six programs, Debug build,
sourcerer dump): recovered1,490 of 3,449 before and 1,490 of 3,449 after. No change: every call of those
programs ends with another unit,
29 P 10 7; 37 P 15 7; 27 0; 35 R; 27 T; 37 P 10 7(P the 429-byte area; the programs declare a program status datastructure,
dcl-ds psds psds, and the compiler rolls its status, bytes 11 to 15into 16 to 20, and clears it after each call). No public twin has it. The
battery
requests/lext/psds-call(7 cases, with a plain control) asks for it;the next rule extends
threadStatuswith that roll once it is captured.The other family
exportprocedures have symbol class 1, read byrpg_statements.recoveras thecycle main (lext-export-main-p, lext-export-cycle-p: the
DCL-PROCof theexported procedure is
? (no operation), itsEND-PROCand the call of it areunresolved, without THREAD as well). Not taken this round.
Release gate (coordinator, before this pull request)
Checked on the binary of the shipped commit
e6d9d35f; the head differs from it only in the title line ofdocs/changes/lext2.md.emit-bytes-diff.sh).lext-thread-call24,lext-psds-call7): ten emits change, all inlext-thread-call. Eachnewly emitted statement was read against the probe source and agrees with it:
ADDTO(5),GROW(k),ADDTO(k),r = TWICE(3),p = NOTHING(),BUMP()in a loop, twice in a row and under THREAD(*SERIALIZE).lext-call-monitor-candlext-call-nested-cchange only the text of a failure line.keyword has no emit rule), so no case could match before and none can go from match to worse.
Gates (ship.sh, commit
e6d9d35f):1dd9aa6bea95b975747b