Reference
Interpreter Runtime
Look up syntax, contracts, layouts, algorithms, and exact behavior.
The interpreter state is built around a heap, a stack of function frames, a stack pointer, the currently running instance, class definitions, and function maps. Object instances hold a pointer and a global scope that maps field names to heap pointers.
That model gives the language reference behavior without pretending JavaScript variables are the runtime. Local variables live in stack frames; object fields live through heap-backed instance scopes; scoped access walks object references until it reaches the requested field.
Program | v class table C -------- function table F | | v v running instance i ---- stack frame K[sp] | | v v globalScope: name -> ptr locals: name -> Value | v heap H: ptr -> Value
Assignments preserve the existing storage discipline. Local writes update the active frame. Field writes walk the scope path to the target instance and then update or replace the heap value behind the field pointer. If the existing field type and assigned value type disagree, the runtime rejects the assignment.