Expand description
Generic functions, method dispatch, and neutral property mechanics for the SIM runtime.
The kernel defines the callable and operation contracts; this crate supplies the concrete dispatch organ (generic functions, multimethods, method specificity ordering). It also owns ordered own-property storage and bounded receiver-aware descriptor execution while leaving traversal order and precedence to language profiles.
Structs§
- Access
Context - Budget and reentry state shared by one property operation.
- Accessor
Descriptor - A stored accessor-property descriptor.
- Data
Descriptor - A stored data-property descriptor.
- Dispatch
Method - A single method belonging to a
GenericFunction. - Generic
Function - A named generic function: a set of
DispatchMethods sharing one name. - Method
Specificity - How specifically a method matched a particular call.
- Property
Store - Ordered own-property records keyed by caller-owned object identities.
Enums§
- Access
Error - Failure during bounded traversal or accessor interception.
- Access
Kind - Kind of guarded accessor invocation.
- Define
Error - Failure to define or delete an own property.
- Descriptor
- A data or accessor descriptor. The enum prevents mixed invalid records.
- Method
Role - Role of a method within a generic function’s combination.
Statics§
- RECIPES
- Cookbook recipes for the dispatch organ, embedded at build time.
Traits§
- Meta
Object Protocol - Language-neutral slot lookup for values with metadata-driven behavior.
- Property
Hook - Caller-owned interpretation of accessor hook tokens.
Functions§
- compare_
specificity - Orders two specificities from least to most specific.
- dispatch_
combine_ op_ key - Operation key for method combination (around/before/primary/after).
- dispatch_
generic_ op_ key - Operation key for defining a generic function.
- dispatch_
inspect_ op_ key - Operation key for inspecting the applicable methods of a call.
- dispatch_
multimethod_ op_ key - Operation key for adding a method to a generic function (multimethod).
- dispatch_
op_ keys - All operation keys contributed by the dispatch organ, in claim order.
- dispatch_
organ_ symbol - Symbol identifying the dispatch organ in the claim store.
- dispatch_
specificity_ op_ key - Operation key for reporting method specificity for a call.
- generic_
function_ value - Wraps
genericas a runtime callable value that dispatches most-specific. - meta_
index - Performs an indexed read with a caller-selected metaobject fallback slot.
- publish_
dispatch_ organ_ claims - Publishes the dispatch organ’s claims and operation keys into a
Cx. - publish_
dispatch_ organ_ claims_ for_ lib - Publishes dispatch organ claims as part of a loaded lib receipt.
Type Aliases§
- Method
Body - The executable body of a
DispatchMethod. - Multimethod
- A generic function under its multimethod alias.