|
|
@@ -14,6 +14,21 @@ The measurements were taken against the tree at tag `v-TP3-INTERRUPT-RESTORE`
|
|
|
tagged `v-TP3-CALC-LAYOUT`, and §1's rung table and the "Session state" section
|
|
|
are the current figures).
|
|
|
|
|
|
+## Current status (2026-10-27)
|
|
|
+
|
|
|
+The goal of this document is met: `CALC.PAS` compiles to its final `.` and the
|
|
|
+smoke test boots the resulting `.COM`. The stage plan below is a historical
|
|
|
+record; phrases such as "next", "still open" or "not implemented" describe the
|
|
|
+state when that stage was written, not the current compiler.
|
|
|
+
|
|
|
+Current measurements: **27,519 B code, 19,694 B data, 37,790 B `.COM`**;
|
|
|
+runtime **10,268 bytes / 68 entries**. The surviving `pascsrc` TP3 corpus is
|
|
|
+**71 / 71 OK** and is checked by `tests/corpus_check.py`.
|
|
|
+
|
|
|
+What is still outside the automated CALC evidence: a full Help/heap session and
|
|
|
+the complete editor/menu workflow. The smoke test covers the welcome screen,
|
|
|
+cell entry, `1+2 -> 3.00`, the menu and `/Q`.
|
|
|
+
|
|
|
---
|
|
|
|
|
|
## 0. Scope decisions, fixed before any code
|
|
|
@@ -28,21 +43,19 @@ are the current figures).
|
|
|
2. **Compile first, run second.** The gate is the compiler's verdict, not a
|
|
|
working spreadsheet. A construct may be *incomplete* only if it is *loudly*
|
|
|
incomplete (`Err (ENoLib)`); it may never be accepted and mis-compiled.
|
|
|
- This project has already shipped that bug once. One of the two cases below
|
|
|
- is now closed (Stage 2); the other is not:
|
|
|
+ This project has already shipped that bug once. Both cases below are now
|
|
|
+ closed:
|
|
|
|
|
|
- - `var` parameters are **silently accepted and passed by value** —
|
|
|
- `ProcFunc` drops the `var` (`DropB (MatchKey (tok))`, comment "VAR
|
|
|
- parameter recorded as value in this milestone"); `writeln (g)` after
|
|
|
- `q (g)` prints `7`, not `42`. Ten CALC routines take `var` parameters.
|
|
|
+ - `var` parameters were once silently accepted and passed by value; that
|
|
|
+ was fixed at Stage 10. Ten CALC routines take `var` parameters.
|
|
|
- `{$I CALC.INC}` was **silently swallowed as a comment**, so `CALC.PAS`
|
|
|
without its include compiled green (`program p; {$I part.inc} begin halt
|
|
|
end.` → `OK code=32 data=4`, `part.inc` never opened). **Closed at Stage
|
|
|
2**: the include is expanded before parsing and an unopenable file is
|
|
|
error 90, not a comment.
|
|
|
|
|
|
- The `var`-parameter case is still open and must be closed by
|
|
|
- implementation, or by an explicit `Err` until it is (Stage 10).
|
|
|
+ **Resolved at Stage 10:** `var` parameters are passed by reference and are
|
|
|
+ covered by `t73_varparam`.
|
|
|
|
|
|
3. **One fixture and one ratchet per step.** Every stage lands with a fixture
|
|
|
that is provably red before and green after, plus a move of the ratchet
|