#[repr(u8)]pub enum Opcode {
Show 13 variants
OpenTag = 1,
CloseTag = 2,
VoidTag = 3,
Text = 4,
DynText = 5,
DynAttr = 6,
ShowIf = 7,
ShowElse = 8,
List = 10,
IslandStart = 11,
IslandEnd = 12,
Prop = 18,
Coalesce = 19,
}Expand description
Bytecode opcodes for the FMIR instruction stream.
Variants§
OpenTag = 1
Open an element. str_idx(u32) + attr_count(u16) + [(key u32, val u32)]
CloseTag = 2
Close the named element. str_idx(u32)
VoidTag = 3
A void element, which takes no CLOSE_TAG. Same operands as OPEN_TAG.
Text = 4
Static text from the string table. str_idx(u32)
DynText = 5
Slot-bound text wrapped in <!--f:tN--> markers.
slot_id(u16) + marker_id(u16)
DynAttr = 6
Slot-bound attribute on the tag currently being opened.
attr_str_idx(u32) + slot_id(u16)
ShowIf = 7
Conditional region wrapped in <!--f:sN--> markers.
slot_id(u16) + then_len(u32) + else_len(u32), then the two bodies
separated by a Opcode::ShowElse byte.
ShowElse = 8
Separator byte between a SHOW_IF’s then- and else-bodies.
List = 10
Repeat a body once per element of an array slot, wrapped in
<!--f:lN--> markers. slot_id(u16) + item_slot_id(u16) + body_len(u32)
IslandStart = 11
Begin an island region. island_id(u16)
IslandEnd = 12
End an island region. island_id(u16)
Prop = 18
Extract a named property from an Object slot into a target slot. Format: src_slot_id(u16) + prop_str_idx(u32) + target_slot_id(u16)
Coalesce = 19
Select fallback only when source is Null. source u16 + fallback u16 + destination u16.