A plain DSPLY of one operand in a procedure recovers (_QRNX_DSPLY_SUBP) #802
Loading…
Reference in a new issue
No description provided.
Delete branch "ldsp"
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?
A plain DSPLY of one operand in a procedure recovers (
_QRNX_DSPLY_SUBP)rpg_display.recoverreads the call of_QRNX_DSPLY_SUBPthat a procedure makes forDSPLY msg,DSPLY msg queueandDSPLY msg queue response. The group is the 20-operation build of the mainlinecall (three 48-byte descriptors,
33 d1; 33 d2; 33 d3; 33 ctx; 99 entry 4 0 0; 3) with twodifferences that the battery measured (SC-ILE/EXPERIMENTS
ldsp-sp-*, requestrequests/ldsp/dsply-subp, 24 cases):4, owner the procedure, 192 bytes, flags
f8008000), not the static one of the cycle main. It is notmade by the DSPLY: the procedure without a DSPLY (
ldsp-sp-none) owns the same symbol, and itsepilogue (the statement of END-PROC) sets its fields.
main(p)module (class 3 too, no cyclemain) or an exported one (class 1 that is not the cycle main).
Module.isSubprocedurenames allthree. The cycle main calls
_QRNX_DSPLYwith the static context and keeps its reader; a module thathas both calls (
ldsp-sp-both) imports both entries, and each reader takes the group that names itsown entry.
displayRuntimehands the reader both entries (Runtime.subp, 0 when the module lacks it) and the returnlabel of the procedure (
Runtime.exit).recoverSubaccepts the message as a literal, a local field(class 4, owner the procedure, flags
70008000), a static field (class 3,7000c000) or a static datastructure addressed before the descriptors (
33 DS); the queue and response operands are fields of thesame kinds. It refuses a varying message (the length guard of a procedure calls the soft-error entry with
two arguments,
27 K; 33 ctx; 5; 99 soft 2 0 0, not the mainline guard), a pointer or parameter message(
29 x 0 T: a based field or a const reference, which need a name that the object lacks), an expression,and every group that holds an operation more than the measured ones.
The tail of a group is read as structure, not as an effect: the labels that the blocks around the DSPLY
define (
15 L k), after at most one jump18 T. The jump may go to the label that follows it at once(the end of the procedure,
18 7; 15 7 2inldsp-sp-last), or over an ELSE or back to a loop head; ajump to the return label of the procedure that is not the next operation is a RETURN and refuses. The
block lines (IF, ELSE, ENDIF) are written by the block machinery from the same jump, as for any statement.
The wrapper
106 R; 108; ... 107 R; 108of the 106/107 question: it is in the object of the DSPLY of aprocedure that has a MONITOR group, in the statements before, in and after the group and in the ON-ERROR
block (
ldsp-sp-mon-before,-after,-in,-onerr); a procedure with an ON-EXIT section and no MONITOR(
ldsp-sp-onexit) has none. The wrapped call is still_QRNX_DSPLY_SUBP; the module imports_QRNX_SUBP_DSPLY_MON(never called) with a MONITOR and_QRNX_SUBP_ON_EXIT_CNL_H(never called) with anON-EXIT. The operations 106 to 109, 111 and 6 are frame operations that the shape drops before any
reader (
rpg_loop_exits.frame_operations), so the DSPLY reader needs no rule for the wrapper. A DSPLY inthe monitored body keeps its tail of the monitor (
29 s 0 2; 27 K; 78 4; 52; 37 s 0 2; 18 L; 15 L 2):it refuses (
ldsp-sp-mon-in), as before.Emitter.statementofrpg_source.zigsplit the operands ofdsplyat every blank, so a literal witha blank (
'Last timestamp: ') failed withliteral without its end.rpg_display.nextOperandsplits atthe blanks outside a quoted literal (a doubled quote stays in it).
Measured
Stripped twins of the 32 public scout programs (
captures/l10-scout2,l10-scout2b: 33 directories, oneprogram is in both trees and counted once), base
43ab0ba1against this build,capture-emit-diff.sh:statements 512, emitted 273 to 284, failure lines 246 to 235.
agree.shover them: 9 more statements thatequal their source, suspect 13 to 13, wrong parameters 0 to 0;
emit-lint.sh: 0 findings. Four programschange:
char(50))char(50); the declaration of the field appears)dsply ('Could not open file')); the DSPLY in ON-ERROR reads asDSPLY 'Fatal error occurred reading file.'and keeps its MONITOR failure lineThe battery, its 24 stripped twins: the failure lines fall in 16 cases, and 8 cases that had a failure line
emit without one (loc, static, literal, queue, ds-sub, last, export, both); the
nonecontrol stays cleanand no case has a new failure line.
compiler statement 2100000001of the main procedure)Limits, not done
based(ptr), 8 of the 20 statements: ossile-5 and 6): the message is29 ptr 0 Tand the width a constant; the field has a symbol of class 0 that no statement names, sofirstNameandfullNamediffer only by the width. Naming it needs a declaration pass in the sourcelayer (
dcl-s F char(10) based(P)), which is the next change. The reader refuses it.ldsp-sp-p-both:29 param 0 Tand34 sym 0of the copy) and a varying message refuse.DSPLY(E), which no case holds.rpg_runtime.ziglists_QRNX_DSPLY_SUBPwith 1 argument and TRPG3 as evidence; the call has 4operands. The row is not changed here.
Probes
ldsp-sp-loc,ldsp-sp-static,ldsp-sp-literal,ldsp-sp-queue,ldsp-sp-ds-sub,ldsp-sp-last,ldsp-sp-export,ldsp-sp-both: clean emits.Not adopted:
ldsp-sp-main-locand-main-literal(the procedure of amain(p)module): the DSPLY recovers(failures 2 to 1 in each), but the emit keeps the
compiler statement 2100000001 is partialfailure of themain procedure, which this change does not touch, so the twins would be non-matching rows. The reader gate
for them is the class-3 gate that
ldsp-sp-locproves (Module.isSubprocedure). The captures are incaptures/ldsp-dsply-subp.New tests:
src/rpg_dsply_subp_test.zig.Gate (host round trips, base ~/bin/sourcerer v0.1.517)
e1d610d6c450f18af37650f18af376bfcb6d1b35