;;;; v3 introduces names the host was never built with: a defvar [extra] and a ;;;; defn [added]. There is no symbol in the running process to bind either to ;;;; and ELF cannot grow one, so both are keyed by string through ;;;; runtime/flan_dev.c and resolved once when the module is installed. ;;;; ;;;; [bump] is redefined in the same module, which is the point of the unit ;;;; being a list of forms rather than one function: C-c C-k on a file that ;;;; adds a var and uses it has to work in one load, or the intermediate state ;;;; is a module referring to storage that does not exist yet. (defvar counter i64) (defvar extra i64) ;;; And a run-time-new one of move-only type: no symbol to bind to, so it goes ;;; through the by-name registry like [extra], with its declared initial value ;;; travelling along as a constant. A zeroed Vec is an empty Vec, so that ;;; constant is a zeroinitializer and the allocation the registry makes is a ;;; usable Vec rather than a placeholder. (defvar fresh (Vec u8)) (defn helper [x i64] i64 (* x 2)) (defn added [] i64 (set extra (+ extra 7)) extra) (defn bump [] i64 (println "v3") (set counter (+ counter (added))) (helper counter)) (defn outer [] i64 (bump))