Skip to main content

Module user_subtypes

Module user_subtypes 

Source
Expand description

Per-user-subtype Wasm subtype, vtable, and method emission for structural object shapes.

Structs§

UserSubtype
Emitted artifacts for one user subtype. The Wasm struct type is shared by arity; the vtable global is shape-specialized and carries the shape-specific behavior.

Functions§

allocate_methods
Pre-allocate method indices so vtable globals can reference them via ref.func.
collect_object_shapes
declared_method_funcs
Returns all method function indices; must be declared in the element section for ref.func to be valid.
emit_method_bodies
emit_method_function_entries
Must be called after all other function section entries so the pre-allocated indices match.
emit_vtable_globals
field_index
Payload-array index for a named field.
needs_host_object_to_json_adapter