rpg_eval.zig and rpg_source.zig: date, time and timestamp arithmetic, parts and conversions of fields recover #751

Manually merged
binjovi-bot merged 3 commits from lr3 into trunk 2026-11-07 15:52:10 +00:00
Owner

rpg_eval.zig and rpg_source.zig: date, time and timestamp arithmetic, parts and conversions of fields recover

The statements of _QRNX_DT_INC, _QRNX_DT_DEC, _QRNX_DT_SUB and _QRNX_DT_CVT failed at the call stage (no operation_semantics for operation 99) when the operand was a field, the duration was not days, months or hours, or the operand was a time. They recover now.

  • A step is x + %UNIT(n) or x - %UNIT(n) with the units %YEARS, %MONTHS, %DAYS, %HOURS and %MINUTES, on a %DATE(), %TIME() or %TIMESTAMP() value, a date, time or timestamp field, or a CONST parameter. The unit is the duration descriptor 0004 00UU: 0x0d years, 0x0e months, 0x0f days, 0x10 hours, 0x11 minutes (twins lr2-date-iso-sub, lr2-time-addsub, lr2-ts-add). %SECONDS has no twin and stays open.
  • The count of a step is a literal or the value the statement computed (%MONTHS(I5)).
  • The target of d = e + %DAYS(7) has the type of e; before, it was declared as char(10).
  • %DIFF(d1: d2: *DAYS) of two fields recovers, and both fields are dates (timestamps with *SECONDS).
  • %SUBDT(d: *YEARS), *MONTHS and *DAYS of a date field recover (_QRNX_DT_CVT into a 32-byte work area, the parts read by offset).
  • %DATE(c: *ISO) of a character field and %DATE(i) of a number recover; the character field stays char.
  • A statement whose only ; is inside an argument list no longer goes through the summary of runtime calls.
  • Dictionary captures status-a-b and status-b (probes lr3-status-a-b, lr3-status-b).
  • Probe lr3-status-b (dictionary capture).
  • Probe lr3-status-a-b (dictionary capture).

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","legend":"current","emit":{"worse":[],"better":7,"newly_clean":9,"clean_delta":9,"base":419,"new":428},"twins":{"groups":653,"recovered":644,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/lr2-date-iso-sub/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/lr2-time-addsub/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/lr2-ts-add/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/program-convert/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-decimal-widen/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-field-0/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-field-2/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-held-negative/stripped/archive.savf 1"],"worse":[]},"full_check":{"exit":0,"seconds":919}}
# rpg_eval.zig and rpg_source.zig: date, time and timestamp arithmetic, parts and conversions of fields recover The statements of `_QRNX_DT_INC`, `_QRNX_DT_DEC`, `_QRNX_DT_SUB` and `_QRNX_DT_CVT` failed at the `call` stage (no `operation_semantics` for operation 99) when the operand was a field, the duration was not days, months or hours, or the operand was a time. They recover now. - A step is `x + %UNIT(n)` or `x - %UNIT(n)` with the units `%YEARS`, `%MONTHS`, `%DAYS`, `%HOURS` and `%MINUTES`, on a `%DATE()`, `%TIME()` or `%TIMESTAMP()` value, a date, time or timestamp field, or a CONST parameter. The unit is the duration descriptor `0004 00UU`: 0x0d years, 0x0e months, 0x0f days, 0x10 hours, 0x11 minutes (twins `lr2-date-iso-sub`, `lr2-time-addsub`, `lr2-ts-add`). `%SECONDS` has no twin and stays open. - The count of a step is a literal or the value the statement computed (`%MONTHS(I5)`). - The target of `d = e + %DAYS(7)` has the type of `e`; before, it was declared as `char(10)`. - `%DIFF(d1: d2: *DAYS)` of two fields recovers, and both fields are dates (timestamps with `*SECONDS`). - `%SUBDT(d: *YEARS)`, `*MONTHS` and `*DAYS` of a date field recover (`_QRNX_DT_CVT` into a 32-byte work area, the parts read by offset). - `%DATE(c: *ISO)` of a character field and `%DATE(i)` of a number recover; the character field stays `char`. - A statement whose only `;` is inside an argument list no longer goes through the summary of runtime calls. - Dictionary captures `status-a-b` and `status-b` (probes `lr3-status-a-b`, `lr3-status-b`). - Probe `lr3-status-b` (dictionary capture). - Probe `lr3-status-a-b` (dictionary capture). ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","legend":"current","emit":{"worse":[],"better":7,"newly_clean":9,"clean_delta":9,"base":419,"new":428},"twins":{"groups":653,"recovered":644,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/lr2-date-iso-sub/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/lr2-time-addsub/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/lr2-ts-add/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/program-convert/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-decimal-widen/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-field-0/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-field-2/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/program-packed-held-negative/stripped/archive.savf 1"],"worse":[]},"full_check":{"exit":0,"seconds":919}} ```
binjovi-bot manually merged commit 504f359e17 into trunk 2026-11-07 15:52:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!751
No description provided.