funcref
Reference to a function for tables and indirect calls.
reference-typesstructural
Syntax
funcref
Stack Effect
Value type.Opcode
no executable opcode`funcref` is a reference type token, not an instruction. Encoded as type byte `0x70`.
Browser Support
Feature-detect support in the target runtime.
Validation Rules
- Type use must match the consuming instruction, function signature, table, memory, or global declaration.
Common Mistakes
- Confusing value types with JavaScript object types.
- Assuming reference types can be stored in linear memory.
(func $example (param externref) )