You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa478ad
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ All writers are count-then-write pairs: `mori_serialize_count`/`mori_serialize_i
52
52
53
53
Declared in `mori.h`, C-level only (not `.Call`) — for packages embedding mori layouts under their own SHM management:
54
54
55
-
-**Layout oracle + writer**: `mori_layout_size(x)` → region size, or 0 for what the writer must not take (non-mori ALTREP nodes — would materialize via `DATAPTR_RO`). The S4 object bit rides the layouts: header flags word at offset 32 (`MORI_FLAG_S4`) for MORH/MORS/MORL roots and nested lists, bit 30 of the directory entry's `sexptype` (`MORI_ELEM_S4`) for vector/string leaves; applied with `Rf_asS4` after attributes land. Vetoes ride the size recursion (`mori_layout_size_impl` with `ok != NULL`); the host path passes `NULL` and vetoes nothing. `mori_layout_write(base, x)` emits exactly `mori_layout_size` bytes and zeroes reserved header bytes [24-63] on every write (embedders may recycle regions).
55
+
-**Layout oracle + writer**: `mori_layout_size(x)` → region size, or 0 for what the writer must not take (ALTREP nodes that are neither mori views nor directly readable with no keeper chain — `mori_altrep_readable`; R's S4 data-part wrappers qualify). The S4 object bit rides the layouts: header flags word at offset 32 (`MORI_FLAG_S4`) for MORH/MORS/MORL roots and nested lists, bit 30 of the directory entry's `sexptype` (`MORI_ELEM_S4`) for vector/string leaves; applied with `Rf_asS4` after attributes land. Vetoes ride the size recursion (`mori_layout_size_impl` with `ok != NULL`); the host path passes `NULL` and vetoes nothing. `mori_layout_write(base, x)` emits exactly `mori_layout_size` bytes and zeroes reserved header bytes [24-63] on every write (embedders may recycle regions).
56
56
-**Wrap constructors**: `mori_vec_wrap` / `mori_str_wrap` / `mori_list_wrap` build views over embedder memory, pinning `keeper` via the data1 extptr's protected slot; each takes a `release` once-hook (see Internal State). `mori_restore_attrs` reapplies trailing serialized attributes.
57
57
-**Introspection + path walk**: `mori_view_check`, `mori_shm_name`, `mori_parse_id`, `mori_walk_path` (walks an index path over an open region; the caller's keeper flows into the result's chain).
58
58
-**Wire hooks**: `mori_set_wire_hooks(emit, resolve)` — see Serialization Hooks.
0 commit comments