Follows the same-day range-check/PACKEDSET session
(summary_session-2026-10-23.md) and the earlier design commit
2a30d8c.
Branch: master. Feature state: v3-exceptions + v3-ptrchain + v3-function-exception.
Gates at the end: suite 278/278, fixpoint OK
(4,156,434 bytes), corpus 512/612 compile-OK, 0 crashes.
| gate | at design start | at end |
|---|---|---|
suite (compiler/run_tests.sh) |
263/263 | 278/278 |
fixpoint (bootstrap/fixpoint.sh) |
4,075,853 B | 4,156,434 B |
corpus (tools/v3-corpus/corpus.sh) |
511/612 | 512/612 compile-OK, 0 crashes |
The corpus is compile-only. After the follow-up pointer-chain fix,
lazyunique compiles and runs (rc=0, unique output 0, 2, 1);
the corpus count stays 512 because it was already compile-OK.
except2/4/5/7/8/9 still fail the strict declaration-order rule
because ip is declared after the procedures, like onebyte*.
98da444)EXCEPT and RETRY became reserved words.NkExcept — body statements plus handler statementsNkRetryEXCEPT accepted on procedure, program-module, implementation-module,
local-module and class implementation bodies.RETRY outside a handler is error 237
(RETRY outside EXCEPT).EXCEPT initially reported 230 so no handler was silently ignored.6e87def)runtime/syslib/shim.c:
m2_exc_push, m2_exc_leave, m2_exc_retry,
m2_exc_raise_lang, m2_exc_raise_userm2_exc_initSIGSEGV/SIGFPE to language-exception mappingQbeGen:
ExcBegin, ExcBodyDone, ExcHandlerBegin, ExcEnd, ExcRetryRETURNm2_exc_init emitted at main entrySYSTEM.THROW is bound to m2_exc_throw.t_except_parse, t_except_throw, t_except_retry,
t_except_return, t_except_nested, t_except_module,
t_except_signal; t_retry_bad (237).5f47b76)runtime/syslib/SysExceptions.def/.mod — C runtime binding.stdlib/exceptions.def/.mod — ISO EXCEPTIONS.stdlib/m2exception.def/.mod — ISO M2EXCEPTION.t_except_lib covers:
AllocateSource / RAISECurrentNumber and wrong-source exExceptionGetMessage, including empty message in normal stateIsCurrentSource, IsExceptionalExecutionIsM2Exception, M2ExceptionM2Exception after SYSTEM.THROW02b3763)QbeGen.TrapCode.CheckIndex → indexException; CheckRange → rangeException.CASE no match with no ELSE → caseSelectException.sysException.t_except_trap, t_except_case, t_except_unhandled;
existing t_trap_* tests still pass.v3-exceptions at 02b3763 (M4).v3-session-2026-10-23-exceptions-end at this docs
commit.| commit | tag | work |
|---|---|---|
98da444 |
— | M1 parser/AST for EXCEPT/RETRY |
6e87def |
— | M2 runtime, sigsetjmp codegen, SYSTEM.THROW |
5f47b76 |
— | M3 EXCEPTIONS / M2EXCEPTION libraries |
02b3763 |
v3-exceptions |
M4 catchable index/range/CASE traps |
96a3080 |
v3-session-2026-10-23-exceptions-end |
M5 summary/docs |
e804e57 |
v3-ptrchain |
self-referential record layout / pointer chains |
| functionException fix | v3-function-exception |
result-function fall-through trap |
The design commit is 2a30d8c.
The self-referential TYPE List = POINTER TO RECORD next: List ... END
and p^.next^.value gaps were fixed by publishing an unresolved alias
for a TYPE before parsing its body, then invalidating record/class
layout when SetTarget completes the alias. Regression
t_ptrchain; lazyunique now runs with rc 0. This follow-up is
tagged v3-ptrchain (e804e57).
QbeGen.EndFunc now traps with language code 4 when a result function
reaches its end without RETURN, instead of silently returning 0.
t_except_funcret catches the exception and t_trap_funcret verifies
the unhandled rc=134 path. Tagged v3-function-exception.
FINALLY / module termination; coroutine (coException) and
protection (protException) exceptions.handoff-2026-10-23-next.md and
plan-separate-compilation.md).