rpg_eval.zig: a condition on %INT or %DEC of a character value recovers #742
Loading…
Reference in a new issue
No description provided.
Delete branch "lc2"
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_eval.zig: a condition on %INT or %DEC of a character value recovers
if %int(%trim(parm)) > 3(SC-ILE/EXPERIMENTS h-numtrim statement 13) stoppedat control_flow / operation_semantics on operation 15, the first label of the
inlined trim loop. The label was not the cause.
rpg_trim.argumentUnitandrpg_decimal_call.zigread the whole condition, but the proved_QRNX_GET_DECIMAL_NUMcall of the conversion left one fact line on theevaluator, and a condition refused any line.
runValuesthen fell back to theraw operations and
stepreported the loop's head label.The evaluator now counts the fact lines that are that call (
decimal_lines).A condition accepts exactly those lines; the fact stays in the statement's
evidence and the condition text is the comparison. Any other line (a time or
date call, an edit call, a store) still refuses the condition. The same
assignment,
s256 = %int(%trim(parm)), already showed the call as evidenceand not as source.
Why the other statements named for the lane stop at operation 15 (no change
here): each is a built-in whose inlined expansion holds a loop or a bounds
check that no rewriter in
runValuesconsumes.%CHARof an integer (zoned convert, leading-zero and sign strip loop):d4-edit 14, h-editc 44, h-now1 53. No value unit reads that expansion.
%INTof%TRIMof a varying field, of%TRIML, of%TRIMR(dict-numtrim31, 35, 43):
rpg_trim.argumentUnittakes.bothloops over a fixed fieldor a pointer only.
%TRIMvalues concatenated into a character field (d4-lemon-battery 24),%TRIM(C) + 'x'into a varying field and%TRIM(C) <> ''(h-bifs-char 42,44): the loop temporaries P and N are consumed by a copy that no unit reads.
%SUBSTwith a variable start,%REPLACE,%LEFT,%RIGHT,%CHECK,%CHECKR(h-bifs-char 23, 25, 29, 30, 33, 34): each its own range check.%LOOKUP(dict-arrays-a-a 18, 19),%SQRT(dict-bifs-num-b 19).A(I5)withi5 int(5)(dict-arrays-b-b 19): the unit ofrpg_array_element.zigtakes a four-byte integer index only. WideningintegerFieldto a two-byte index recovers the statement; it is outside thislane's files and has no committed twin.
Gates