|
|
@@ -1,4 +1,4 @@
|
|
|
-# m2compiler-V3 — feature status (at `v3-gaps-1-5`, 165/165 green)
|
|
|
+# m2compiler-V3 — feature status (at `v3-string-variant-nested`, 169/169 green)
|
|
|
|
|
|
Pipeline: Coco/R `M2.atg` (1748 lines, 73 productions) → `gm2`-built
|
|
|
`M2` → QBE `.ssa` → `qbe` → `cc` → run. `SymTab.mod` 1623 lines,
|
|
|
@@ -49,22 +49,29 @@ Legend: ✅ done · 🔄 partial · ⏸ not started / deferred.
|
|
|
including variant records (`RECORD … ; CASE tag : T OF … END`): plain
|
|
|
fields pack before the tag, each branch's fields overlay after it.
|
|
|
- ✅ `SET OF` bool/char/subrange (multi-word masks).
|
|
|
-- ✅ `POINTER TO`, `NIL` as a real type.
|
|
|
+- ✅ `POINTER TO`, `NIL` as a real type, `ADDRESS` ↔ any pointer
|
|
|
+ assignment (`p := ADR(x)`).
|
|
|
- ✅ `UCHAR` (32-bit codepoint) + `U'a'`/`U"…"` literals (strict
|
|
|
RFC3629 decode → 234 on bad bytes), `UCHR`/`CHR8`/`UORD`, `U"…"`
|
|
|
whole-string assignment to a 1-D `ARRAY OF UCHAR`, `+`
|
|
|
concatenation of `U"…"` (and single-codepoint operands), and
|
|
|
`LEN`/`LENGTH`/`HIGH` of a UString.
|
|
|
- ✅ Opaque `TYPE T;` + completion in the implementation.
|
|
|
-- ✅ Variant records (`RECORD CASE … OF … END`); ⏸ whole-record
|
|
|
- equality/assignment for variants is 236 (overlapping storage).
|
|
|
+- ✅ Variant records (`RECORD CASE … OF … END`); whole-record
|
|
|
+ assignment is a flat byte blit (correct for overlapping fields) and
|
|
|
+ whole-record `=` is 213.
|
|
|
+- ✅ gm2's pervasive opaque `String`: an undeclared/opaque type is
|
|
|
+ pointer-like (assign `NIL`, copy, compare, pass), and `String` is
|
|
|
+ predefined (imported definitions shadow it).
|
|
|
|
|
|
## Declarations
|
|
|
- ✅ `CONST` (integer/char/real literals, folded), `VAR`, `TYPE`,
|
|
|
`PROCEDURE` headings + bodies, `FORWARD`.
|
|
|
- ✅ `DEFINITION`/`IMPLEMENTATION` modules, `IMPORT`/`FROM … IMPORT`,
|
|
|
- `EXPORT` (parsed), nested local `MODULE` (parsed; lowering pending).
|
|
|
-- ✅ Opaque completion; module `BEGIN` init bodies.
|
|
|
+ `EXPORT` (parsed), nested local `MODULE` (including `EXPORT` lists,
|
|
|
+ nested-nested modules, and bodies lowered as startup init functions).
|
|
|
+- ✅ Opaque completion; opaque/forward types used as pointer-like
|
|
|
+ values; module `BEGIN` init bodies.
|
|
|
- ✅ Strict impl-vs-def signature checks (error **235**): result type,
|
|
|
formal count, formal types and `VAR`-ness are compared against the
|
|
|
`DEFINITION` (was arity-only).
|