|
@@ -1,8 +1,8 @@
|
|
|
# PIM4 vs GNU Modula-2 vs M2R10 vs TopSpeed V3 vs V3 — feature comparison
|
|
# PIM4 vs GNU Modula-2 vs M2R10 vs TopSpeed V3 vs V3 — feature comparison
|
|
|
|
|
|
|
|
-**Date:** 2026-10-24 · **V3 state:** open-array milestone + triage
|
|
|
|
|
-follow-up (suite 301/301, self-hosting fixpoint OK 3,573,487 bytes,
|
|
|
|
|
-corpus 519/612, 0 crashes).
|
|
|
|
|
|
|
+**Date:** 2026-10-24 · **V3 state:** open arrays, dialect library
|
|
|
|
|
+folders and core separate compilation (suite 303/303, self-hosting
|
|
|
|
|
+fixpoint OK 3,717,887 bytes, corpus 519/612, 0 crashes).
|
|
|
|
|
|
|
|
**Scope and sources.**
|
|
**Scope and sources.**
|
|
|
|
|
|
|
@@ -115,12 +115,14 @@ change individual cells.
|
|
|
|---|---|---|---|---|---|
|
|
|---|---|---|---|---|---|
|
|
|
| Definition / implementation / program modules | ✅ | ✅ | ✅ (+ blueprints) | ✅ | ✅ |
|
|
| Definition / implementation / program modules | ✅ | ✅ | ✅ (+ blueprints) | ✅ | ✅ |
|
|
|
| Local modules | ✅ | ✅ | ❌ removed | ✅ | ✅ |
|
|
| Local modules | ✅ | ✅ | ❌ removed | ✅ | ✅ |
|
|
|
-| Separate compilation | ✅ | ✅ (object files/archives) | ✅ compilation units | ✅ | 🔄 one invocation compiles all units into one image |
|
|
|
|
|
|
|
+| Separate compilation | ✅ | ✅ (object files/archives) | ✅ compilation units | ✅ | ✅ core: `M2 -c` per-unit objects + `M2make --separate`; one-shot remains default |
|
|
|
|
|
+| Stable cross-object symbols / init order | n/a | ✅ | ✅ | ✅ | ✅ `<Module>__proc`, module-qualified pools/vtables, dependency-ordered `<Module>_init` |
|
|
|
|
|
+| Incremental object rebuild / ABI marker | n/a | ✅ | ✅ | ✅ | 🔄 `--separate` rebuilds all objects; no ABI version marker yet |
|
|
|
| Generics | ❌ | ✅ ISO 10514-2 | ❌ external templates (`GENLIB`/`BLUEPRINT`) | ❌ | ✅ ISO 10514-2 refinement |
|
|
| Generics | ❌ | ✅ ISO 10514-2 | ❌ external templates (`GENLIB`/`BLUEPRINT`) | ❌ | ✅ ISO 10514-2 refinement |
|
|
|
| Object orientation | ❌ | ❌ | ❌ (extensible records only) | ✅ Clarion-form `CLASS`, `VIRTUAL`, inheritance | 🔄 Clarion-form `CLASS` (single inheritance, virtual dispatch), not ISO 10514-3 |
|
|
| Object orientation | ❌ | ❌ | ❌ (extensible records only) | ✅ Clarion-form `CLASS`, `VIRTUAL`, inheritance | 🔄 Clarion-form `CLASS` (single inheritance, virtual dispatch), not ISO 10514-3 |
|
|
|
| PIM coroutines (`PROCESS`, `NEWPROCESS`, `TRANSFER`, `IOTRANSFER`) | ✅ | ✅ | 🔄 `COROUTINE` type/`YIELD` (R10 phase II) | ✅ PIM-style | ✅ (`IOTRANSFER` degrades to a transfer) |
|
|
| PIM coroutines (`PROCESS`, `NEWPROCESS`, `TRANSFER`, `IOTRANSFER`) | ✅ | ✅ | 🔄 `COROUTINE` type/`YIELD` (R10 phase II) | ✅ PIM-style | ✅ (`IOTRANSFER` degrades to a transfer) |
|
|
|
| ISO `COROUTINES` module | ❌ | ✅ | ❌ | ❌ | ❌ (PIM interface only) |
|
|
| ISO `COROUTINES` module | ❌ | ✅ | ❌ | ❌ | ❌ (PIM interface only) |
|
|
|
-| Standard library | ❌ (none defined) | ✅ PIM + ISO libraries | ✅ redesigned R10 library | ✅ TopSpeed libraries (historical) | 🔄 subset: ISO/PIM I/O, strings, storage, SysClock, EXCEPTIONS; no termination/coroutine libs |
|
|
|
|
|
|
|
+| Standard library | ❌ (none defined) | ✅ PIM + ISO libraries | ✅ redesigned R10 library | ✅ TopSpeed libraries (historical) | 🔄 subset in `lib/pim`, `lib/iso`, `lib/common`, `lib/gm2`: ISO/PIM I/O, strings, storage, SysClock, EXCEPTIONS; no termination/coroutine libs |
|
|
|
| Self-hosting | n/a | ✅ (part of GCC) | n/a (reference compiler under development) | n/a (historical commercial compiler) | ✅ (byte-identical 3-stage fixpoint) |
|
|
| Self-hosting | n/a | ✅ (part of GCC) | n/a (reference compiler under development) | n/a (historical commercial compiler) | ✅ (byte-identical 3-stage fixpoint) |
|
|
|
| Backend / target | n/a | GCC (many targets) | reference compiler | x86/DOS/Windows (historical) | QBE → C (amd64 SysV today) |
|
|
| Backend / target | n/a | GCC (many targets) | reference compiler | x86/DOS/Windows (historical) | QBE → C (amd64 SysV today) |
|
|
|
|
|
|
|
@@ -161,7 +163,10 @@ change individual cells.
|
|
|
(`SHORTREAL`, `REAL` width), plus a **65536-bit `SET` span limit**
|
|
(`SHORTREAL`, `REAL` width), plus a **65536-bit `SET` span limit**
|
|
|
and a **32-bit `PACKEDSET` limit**. Self-referential pointer records
|
|
and a **32-bit `PACKEDSET` limit**. Self-referential pointer records
|
|
|
and chained pointer-field designators (`p^.next^.value`) are
|
|
and chained pointer-field designators (`p^.next^.value`) are
|
|
|
- supported.
|
|
|
|
|
|
|
+ supported. **Separate compilation** is now available for normal
|
|
|
|
|
+ modules: `M2 -c` emits one object per unit, library objects have no
|
|
|
|
|
+ `main`, and `M2make --separate` links the objects; the one-shot mode
|
|
|
|
|
+ remains the default for tests and self-hosting.
|
|
|
|
|
|
|
|
## V3-specific deviations and limits
|
|
## V3-specific deviations and limits
|
|
|
|
|
|
|
@@ -190,9 +195,15 @@ change individual cells.
|
|
|
at ABI boundaries; row/`ARRAY OF BYTE` conversions are copy-based
|
|
at ABI boundaries; row/`ARRAY OF BYTE` conversions are copy-based
|
|
|
there, so row `ADR` identity through an internal 1-D call remains a
|
|
there, so row `ADR` identity through an internal 1-D call remains a
|
|
|
follow-up.
|
|
follow-up.
|
|
|
-- **Single-invocation compilation:** definition, implementation and
|
|
|
|
|
- program units are compiled together into one image; there is no
|
|
|
|
|
- incremental object/archive format.
|
|
|
|
|
|
|
+- **Separate compilation:** `M2 -c` emits a QBE object per unit and
|
|
|
|
|
+ `M2make --separate` resolves interfaces and links with `cc`. Library
|
|
|
|
|
+ objects have no `main`; every object exports `<Module>_init` and the
|
|
|
|
|
+ program calls imported inits in dependency order. Stable symbols are
|
|
|
|
|
+ `<Module>__proc`, `<Module>_<global>`, module-qualified pools and
|
|
|
|
|
+ `<Module>__<Class>__vt`. The one-shot mode remains the default for
|
|
|
|
|
+ the suite/corpus. Still deferred: an `M2 -I` import scanner,
|
|
|
|
|
+ incremental object/ABI checks, separate generic-instance objects and
|
|
|
|
|
+ per-object self-hosting.
|
|
|
- **OO** is the Clarion-form `CLASS` dialect (single inheritance,
|
|
- **OO** is the Clarion-form `CLASS` dialect (single inheritance,
|
|
|
virtual dispatch), not ISO 10514-3.
|
|
virtual dispatch), not ISO 10514-3.
|
|
|
|
|
|
|
@@ -200,8 +211,9 @@ change individual cells.
|
|
|
|
|
|
|
|
- V3: `docs/STATUS.md`, `docs/features.md`, `docs/gaps/README.md`,
|
|
- V3: `docs/STATUS.md`, `docs/features.md`, `docs/gaps/README.md`,
|
|
|
`docs/analysis_gaps.md`,
|
|
`docs/analysis_gaps.md`,
|
|
|
- `docs/summary_session-2026-10-23-open-arrays.md`; the gates in this
|
|
|
|
|
- document were run at `v3-open-arrays`.
|
|
|
|
|
|
|
+ `docs/summary_session-2026-10-24-separate-compilation.md`,
|
|
|
|
|
+ `docs/separate-compilation.md`; the gates in this document were run
|
|
|
|
|
+ at `v3-separate-compilation`.
|
|
|
- gm2: the GCC Modula-2 testsuite and `gm2-libs`/`gm2-libs-iso`
|
|
- gm2: the GCC Modula-2 testsuite and `gm2-libs`/`gm2-libs-iso`
|
|
|
definition modules in the sibling `gcc-git` tree.
|
|
definition modules in the sibling `gcc-git` tree.
|
|
|
- M2R10: the published R10 grammar (m2r10-grammar.gll) and
|
|
- M2R10: the published R10 grammar (m2r10-grammar.gll) and
|