pub enum TableSegmentInit {
Direct(TableSegmentElements),
Staged {
index: PassiveElemIndex,
len: u64,
},
}Expand description
How the values of an active table segment are produced.
Variants§
Direct(TableSegmentElements)
The elements are evaluated and written directly to the table in
segment order. These never appear in vm::Instance.
This is used when the elements cannot trap, or when a trap could not be observed because no imported table has been written to yet.
Staged
The elements may trap during evaluation, so they are instead evaluated up-front into this passive element segment’s storage alongside all other passive element segments. The segment is then copied into the table in segment order and dropped.
Instantiation evaluates all element segment expressions before any active segment is written to a table, so a trapping expression must not leave earlier segments’ writes visible in imported tables.
Fields
index: PassiveElemIndexThe passive element segment holding the evaluated elements.