logos.lang.writ.compactify

Module lang · package logos-lang

Functions

fnclone

fn clone(dst: &Writ, v: WAny) -> WAny

Deep-copies v into arena dst, returning the new independent root. Same operation as compactify, named for the by-value-copy intent (the legacy clone); pass the SAME arena to duplicate a subtree, a FRESH arena to compact.

fncompactify

fn compactify(dst: &Writ, v: WAny) -> WAny

Deep-copies v (and everything it transitively references) into dst, returning the new root WAny. Pods/null are position-independent (copied by value); refs are rebuilt and re-anchored to their new slot.