diff --git a/TODO.org b/TODO.org index 346bc424..5057d1b0 100644 --- a/TODO.org +++ b/TODO.org @@ -405,14 +405,9 @@ expressible and a build-time refusal would be unusable. =barf= on web signals no-op — which is how a save file disappears with nothing said — and the build-time refusal. -** NEXT Conditions get a parent link, not class inheritance -Decided 2026-09-25: build it, with a root =Error= every built-in error descends from, so one handler catches any error. A catch-all handler gets the condition's name and the runtime's sentence, not its fields. =(pause)= and warnings are not under =Error=. -A condition type may name a parent where it is declared, and handler matching -walks that static chain. It buys the hierarchy conditions most lack — a catch-all -"any file error" handler — at compile-time cost only. Rules out the class answer: -a class condition allocates at the signal site, inverts the lifetime rule, and -lets a layout change under a standing handler frame. Not built. - +** DONE Conditions get a parent link, not class inheritance +CLOSED: [2026-09-25] +A parent has exactly Error's fields; a handler matched through the link gets the signal's descriptor (name, value-free static sentence), never the child's fields. Rules out parents with fields of their own and a message carrying the failing values. ** CANCELLED Can a condition be a class? CLOSED: [2026-09-25] A class condition allocates on the failure path. The parent link above gives the hierarchy without it. @@ -431,11 +426,6 @@ which takes the compiler, the session and the game. Abandoning drops the expression; it does not undo it, and every surface says so. At a trap there is no transfer channel, so nothing can be abandoned, and that is correct. -** TODO A restart-case clause has no report string -The field is cheap and the accessor is cheap, but the only consumer is the break -loop's listing, so it would ship as a field nothing read. It belongs with the -listing work. - ** WAIT find-restart and compute-restarts Blocked on a type, not on effort: the spec gives them =(Option Restart)= and a list, and there is no =Restart= type and no list type to return one in. The @@ -1515,13 +1505,6 @@ runtime's design and a leak check produces a suppression list. A green sweep therefore says nothing about who frees the newly allocating =(bytes s)=. Worth asking on purpose one day, across the whole corpus and not one program. -** TODO An unhandled condition has no location -The error entry point takes five integer arguments, which fills the argument -registers; a location pair makes seven, so the x86 backend would need stack -argument passing at a call site whose register file is exactly full. The dev-side -half is different work: the trap hook hands control to a session in-process with -the compiler, which can read the source. - ** DONE trap_oom has no site CLOSED: [2026-09-25] =flan_dyn_at=, =flan_dyn_set_at= and =flan_dyn_push= take the call's site as @@ -1531,19 +1514,6 @@ push gives one: its other callers are the collector's own allocations, which have no line to name. A stale view's check prints the site when =at= or =set-at= reaches it; reached from =length=, printing or equality, it has none. -** TODO A restart has no location -The restart frame is mirrored across both backends and the runtime, so giving -=continue= a file, line and column means two fields, stores in both backends, an -accessor, the snapshot copying it and the buffer printing it. A cross-backend ABI -change; do it as one lane, not as a rider. A site for user =error= calls is the -same lane if the frame is being touched anyway. - -** TODO handler-case's own restart is listed in a break loop under it -The restart the form makes up for itself is on the restart stack like any other. -Hiding it means a new field in the frame layout written out in both backends and -the runtime. Choosing it is refused loudly rather than answered wrongly, so this is -cosmetic. - ** NEXT A formatted number does not outlive its frame Decided 2026-09-25: the conversion's bytes are always copied into the context allocator, so the string outlives the frame. Rules out refusing the escape, which needs flow tracking. The conversion buffer is one frame slot per call site, so returning a string built @@ -1770,18 +1740,6 @@ a defcustom. The agent keeps the condition pointer beside its name and a verb hands it back, so the editor can render the condition's own fields rather than only its class. -** TODO A restart's source location and arity are not on the wire -The restart frame is =prev=, a name id, a name and a length. A backtrace and -locals landed out of the shadow stack and needed no debug information; these did -not come with them. - -** TODO The editor half of a typed restart -The language half is in — a restart clause takes parameters and =invoke-restart= -passes them. What is missing is the half only an editor can do: arity and signature -on the frame, the restart listing carrying the signature, and the daemon compiling -each argument against the declared type and writing the values into the frame's -buffer before aiming the channel. - ** NEXT The type identity of a local is not qualified Decided 2026-09-25: a local's type prints package-qualified in the break buffer and the inspector, as a field's and a condition's already do. Settled for conditions and for structs, because =Load= qualifies every declaration @@ -2161,23 +2119,6 @@ each with its own sentence. Both backends choose the code on the cold path, so t guard is still two compares. =lhs= and =rhs= still carry the range. Rules out carrying the float value in the condition. -** TODO The break buffer prints fields, not the sentence the runtime wrote -=ArithError — op 4, lhs -2147483648, rhs 2147483647= where the runtime's own -sentence is "this value does not fit the integer type it is cast to" -(=runtime/flan_rt.c:986=). Worse for a dyn trap: =DynType= has no struct at all, -so the buffer says "no struct is named DynType" while =flan_dyn.c:799= has -written the operation, both tags and both values to stderr. The sentences exist -and go to the daemon buffer; the break buffer wants them on the wire. -=ArithError='s =op= being a bare number is the same gap — it is an enum spelled -as =i32=. - -** TODO A backtrace frame names the function, not the call -=fninfo= (=lib/emit.ml:185=) holds one static =loc=, the =defn='s own, and -=flan_frame= (=runtime/flan_dev.c:1011=) adds no per-call location — so two -calls to the same function from one caller are indistinguishable in the stack. -Wants the caller storing its call site into the frame before the call, which is -a field and a store on every dev-build call. - ** DONE The condition buffer cannot jump to the source CLOSED: [2026-09-25] RET (and =v=) on a frame or on the stop's =at= line opens the file there; TAB