Reference
Allocation and Object Identity
Look up syntax, contracts, layouts, algorithms, and exact behavior.
Object construction allocates an Instance value on the heap, temporarily sets it as the running instance, evaluates global field definitions, restores the prior running instance, and finally evaluates the constructor body against the new instance.
new Class(args) | v allocate pointer p | v heap[p] = Value(Instance) | v runningInstance = heap[p] | v evaluate field definitions into globalScope | v evaluate constructor(args) | v return Instance pointer
Primitive values can be stored directly in stack frames, but object fields point into the heap. Reassignment to a field either reuses an existing heap-backed value or allocates a new heap slot and updates the owning instance's globalScope mapping.