Struct zingen::ControlStackFrame
source · pub struct ControlStackFrame {
pub ty: ControlStackFrameType,
pub original_pc_offset: u16,
result: BlockType,
pub original_sp: u8,
}
Expand description
Holds the necessary metadata to support the smission of control flow instructions.
NOTE: The output of control flow should be placed on the stack, so we don’t need to store the result type.
Fields§
§ty: ControlStackFrameType
The type of the control stack frame.
If loop, break it while popping.
original_pc_offset: u16
The program counter offset at the beginning of if.
result: BlockType
The return values of the block.
Could be useful for validation.
original_sp: u8
Original stack pointer.
Implementations§
source§impl ControlStackFrame
impl ControlStackFrame
sourcepub fn new(
ty: ControlStackFrameType,
original_pc_offset: u16,
original_sp: u8,
result: BlockType
) -> Self
pub fn new( ty: ControlStackFrameType, original_pc_offset: u16, original_sp: u8, result: BlockType ) -> Self
Create a new control stack frame.
Trait Implementations§
source§impl Clone for ControlStackFrame
impl Clone for ControlStackFrame
source§fn clone(&self) -> ControlStackFrame
fn clone(&self) -> ControlStackFrame
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ControlStackFrame
impl Send for ControlStackFrame
impl Sync for ControlStackFrame
impl Unpin for ControlStackFrame
impl UnwindSafe for ControlStackFrame
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more