Mutability
A description of the mutability of an AvailObject. This information is not maintained by an object itself, but rather by the AbstractDescriptor that specifies its representation and behavior.
Much code assumes these values are MUTABLE, IMMUTABLE, and SHARED, in that exact order. Do not change it under any circumstances!
Author
Todd L Smith
Entries
Indicates that instances of the descriptor are mutable. An object can be mutable only if there exists but a single reference to it. This is a necessary condition, but not a sufficient condition for mutability. Most objects begin existence in the mutable state. All slots of a mutable object may be modified.
Indicates that instances of the descriptor are immutable. An object that is immutable may have more than one reference, but must be reachable only by a single fiber. An immutable object may not be modified, in general, though some slots may remain mutable.
Indicates that instances of the descriptor are immutable and shared. An object that is shared may have more than one reference and may be reachable by multiple fibers. Modules, methods, message bundle trees, and special atoms begin existence in the shared state. A fiber begins existence shared only if the parent fiber retains a reference to the new child. The origin function of a new fiber becomes shared before its execution. All special objects and other root objects begin existence shared. Other objects become shared just before assignment to the object slot of a shared object.