QuickBEAM.VM.GlobalEnv (QuickBEAM v0.10.9)

Copy Markdown View Source

Global variable environment: resolves JS globals from the persistent heap and runtime bindings.

Summary

Functions

Returns cached builtin and persistent global bindings.

Clears temporary var tracking after declaration checks.

Returns the active JavaScript global environment.

Resolves a name from the current atom table.

Defines a hoisted var binding in the active global environment.

Fetches a global binding by name or atom-table index.

Writes a global binding into a context and optionally persists it.

Functions

base_globals()

Returns cached builtin and persistent global bindings.

check_define_var(ctx, atom_idx)

Clears temporary var tracking after declaration checks.

current()

Returns the active JavaScript global environment.

current_name(atom_idx)

Resolves a name from the current atom table.

define_var(ctx, atom_idx)

Defines a hoisted var binding in the active global environment.

fetch(atom_idx)

fetch(ctx, atom_idx)

Fetches a global binding by name or atom-table index.

get(atom_idx, default)

get(ctx, atom_idx, default)

put(ctx, atom_idx, val, opts \\ [])

Writes a global binding into a context and optionally persists it.

refresh(ctx)