Mutable heap storage for JS runtime values.
All heap access goes through this module — callers never touch the process dictionary directly. Current implementation uses the process dictionary for single-process performance; the backing store can be swapped to ETS for concurrent access.
Storage keys
integer_id— JS object/array properties (raw integer keys){:qb_cell, ref}— closure variable cells{:qb_class_proto, ctor}— class prototype objects{:qb_parent_ctor, ctor}— parent constructor references{:qb_var, name}— global variable bindings
Summary
Functions
Runs heap garbage collection using the active VM roots plus extra roots.
Returns the allocation threshold that triggers the first heap GC pass.
Returns an object's prototype, falling back to the cached Array prototype for array values.
Reads a closure/capture cell value.
Returns the active interpreter context stored in the process dictionary.
Returns heap object data, reconstructing shaped objects as maps.
Returns an existing constructor prototype or lazily creates one for function constructors.
Creates a JavaScript Error-like object with message, name, prototype, and stack metadata.
Returns a heap object as a list when it stores array-like data.
Stores builtin-name metadata.
Stores the eval restore stack for the current process.
Caches the atom table for a VM function.
Stores cached global bindings and invalidates derived base globals.
Stores host-provided handler globals and invalidates derived base globals.
Stores the parent constructor associated with a class constructor.
Registers a compiled module and its exports in the process-local registry.
Clear all heap state. Used in test setup.
Converts JavaScript array-like VM values to Elixir lists.
Wraps maps, lists, arrays, and scalar data in a JavaScript object reference.
Wraps a list as a JavaScript iterator object with a next method.
Fast-wraps a value tuple with a compile-time key tuple, using a cached shape when possible.
Fast allocation with a pre-resolved shape. Skips eligibility check and key sorting.
Functions
Runs heap garbage collection using the active VM roots plus extra roots.
Returns the allocation threshold that triggers the first heap GC pass.
Returns an object's prototype, falling back to the cached Array prototype for array values.
Reads a closure/capture cell value.
Returns the active interpreter context stored in the process dictionary.
Returns heap object data, reconstructing shaped objects as maps.
Returns an existing constructor prototype or lazily creates one for function constructors.
Creates a JavaScript Error-like object with message, name, prototype, and stack metadata.
Returns a heap object as a list when it stores array-like data.
Stores builtin-name metadata.
Stores the eval restore stack for the current process.
Caches the atom table for a VM function.
Stores cached global bindings and invalidates derived base globals.
Stores host-provided handler globals and invalidates derived base globals.
Stores the parent constructor associated with a class constructor.
Registers a compiled module and its exports in the process-local registry.
Clear all heap state. Used in test setup.
Converts JavaScript array-like VM values to Elixir lists.
Wraps maps, lists, arrays, and scalar data in a JavaScript object reference.
Wraps a list as a JavaScript iterator object with a next method.
Fast-wraps a value tuple with a compile-time key tuple, using a cached shape when possible.
Fast allocation with a pre-resolved shape. Skips eligibility check and key sorting.