Suite 147/147; self-hosting fixpoint OK
(image 2,313,762 bytes). master, tree clean except the user's
uncommitted compiler/toto.mod.
This session closed out the Clarion CLASS feature, then showcased
it.
| Step | Tag | Commit | What |
|---|---|---|---|
| CLASS finished | v3-class-finish |
3804256 |
sibling method calls + init body |
| Showcase | v3-showcase19 |
(this commit) | init body + sibling-call chains |
Two 230s removed (the third, multiple parents, stays by design):
CLASS IMPLEMENTATION, a bare
method name is a call on THIS. SymTab tracks the innermost open
implementation (implStk/CurImplClass); Design binds an
otherwise-unresolved name to the class's method and arms THIS as
the receiver. A virtual sibling still dispatches through the
vtable.BEGIN … END init body — emitted as <Class>_init,
registered with the module init functions, and run once at
startup. (A body touching instance fields still reports 230:
there is no receiver, and V3 has no class statics.)docs/summary_class-finish.md.
With this, CLASS is ✅ for: fields, methods (value/VAR formals,
results), single inheritance, WITH, hidden THIS, VIRTUAL
dynamic dispatch (vtables) with subtype pointers, sibling calls, and
init bodies. ⏸ multiple parents only.
compiler/tests/showcase19.mod (Showcase19, exit 42):
Accumulator's BEGIN body sets a global scale := 10 at startup.AddPair → AddScaled → Add is a chain of sibling calls on
THIS; AddScaled uses the init-set global.The result is rendered with Conversions.IntToStr + CHAR-array +.
showcase19 total=42
New: Showcase19 (42). (The class-finish step added
t_classsibling and t_classinit and promoted t_class.)
cd .../m2compiler-V3
./bootstrap/fixpoint.sh # FIXPOINT OK
cd compiler && ./build.sh && ./run_tests.sh # 147/147
VAL(LONGINT|REAL, x) and long→int narrowing.SysClock, richer Strings/Math).