Skip to main content

shape_transition

Function shape_transition 

Source
pub fn shape_transition(from: ShapeId, property_hash: u32) -> Option<ShapeId>
Expand description

Transition a shape by adding a new property.

Consults the ambient shape table. Returns None if no scope is active, if the dictionary-mode threshold (>64 properties) would be exceeded, or if from is not present in the active table (e.g. a stale shape_id carried over from a different ambient handle — a HashMapData built under the process-default handle and later mutated inside a per-VM scope). When a transition is recorded, it is also appended to the ambient table’s transition log for JIT shape-guard invalidation.