diff options
| author | 2026-10-15 02:44:26 +0330 | |
|---|---|---|
| committer | 2026-10-15 02:44:26 +0330 | |
| commit | a175ffd5d18d2883279c94d727f5966ecda409ab (patch) | |
| tree | ef1c895dfb1c95ae36fe540ce333103aa0991e70 /docs/design | |
| parent | o3: an o3 function called from normal code as a receiver method (run.method) ... (diff) | |
rt: gc_drops finalizes a droppable value that reaches itself (a cycle, or a drop capturing its own value), one per collection, each once; before, each waited for the other forever; spec 6.15.3, drop_gc_cycle.zc, drop_gc_self_capture.zc, design doc lists what landed
Diffstat (limited to 'docs/design')
| -rw-r--r-- | docs/design/destructors.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/design/destructors.md b/docs/design/destructors.md index 0691228..7d0c950 100644 --- a/docs/design/destructors.md +++ b/docs/design/destructors.md @@ -179,4 +179,5 @@ untyped `rt.new(n)` blocks take a drop like any other value, so there is no sepa - `gc_drops`: drops of marked values are marked (to a fixpoint); each unmarked value whose drop hasn't run gets `F_FINAL` and is kept with what it reaches; a candidate reached by another candidate waits for a later collection, so parents drop before children. - o3: `rt.o3_enter`/`rt.o3_leave` around `o3 { }` blocks and calls from normal code into o3 functions; `gc` inside sets `gc_pending`, the outermost leave runs it. - compiler: `heap(e)`, the three drop forms (a closure there gets `this`), the struct `drop` method as type drop (`set_tdrop` after `new(T)` and `heap`), set-once and set-early on locals, temporaries held in a hidden slot until the statement ends with a hint, the actor `send` check, the o3 errors. -- not yet: reassigning an owner that still holds a value (still error 6.8.5, not the free-with-hint), the no-move-out-of-a-droppable rule, the spawn hint, memreport's `(drop)` marker, `break`/`continue` out of an `o3 { }` block (they skip `o3_leave`), o3 methods called from normal code through a method call, and a cycle of unreachable droppable values (each reaches the other, so neither is finalized). +- since: reassigning an `m` owner frees the old value with a hint (6.8.5; `reassign_free` in analyzer.zc, which frees without freevar's clearing store, since a captured local's slot holds its cell); `pop` on an array with a drop, or an array field of one, is refused (6.15.5; fields were already borrowed projections); the spawn hint on `x.spawn()` of a mailbox struct (`spawn_hint`); memreport's `(drop)` marker; `break`/`continue` out of an `o3 { }` block call `o3_leave` for each block they leave (`lpo3`, the depth each loop began at); an o3 receiver method called from normal code enters and leaves the region (`methcall`); a candidate that reaches itself in `gc_drops` (`F_CYCLE`, a cycle or a drop capturing its value) drops now, one per collection. +- not yet: first users (file descriptors in `std.Host`, processes in `actor.zc`). |
