patch_seq_unpack_variant

Function patch_seq_unpack_variant 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_unpack_variant( stack: Stack, field_count: i64, ) -> Stack
Expand description

Unpack a variant’s fields onto the stack

Takes a field count as parameter and:

  • Pops the variant from the stack
  • Pushes each field (0..field_count) in order

Stack effect: ( Variant – field0 field1 … fieldN-1 )

Used by match expression codegen to extract variant fields.

§Safety

Stack must have a Variant on top with at least field_count fields