slotCount property

int? slotCount
getter/setter pair

S3 (perf plan_3 §4.6): number of slot-eligible locals this block frame declares directly — the size of the per-frame _slots array the interpreter pre-allocates on entry. Populated by StaticResolver (a block-local is slot-eligible iff every occurrence is a depth-0, non-escaped, non-assignment access; ineligible locals stay name-based in _values and are not counted). null = not yet resolved → no slot array. Mutable because the resolver assigns it on block exit. Emitted into toJson only when non-null, so an unresolved block serializes identically to the pre-S3 format.

Implementation

int? slotCount;