Struct wasmer_compiler_llvm::translator::state::State
source · pub struct State<'ctx> {
pub stack: Vec<(BasicValueEnum<'ctx>, ExtraInfo)>,
control_stack: Vec<ControlFrame<'ctx>>,
landingpads: VecDeque<Landingpad<'ctx>>,
landingpads_scope: HashMap<u32, VecDeque<BasicBlock<'ctx>>>,
pub reachable: bool,
}
Fields§
§stack: Vec<(BasicValueEnum<'ctx>, ExtraInfo)>
§control_stack: Vec<ControlFrame<'ctx>>
§landingpads: VecDeque<Landingpad<'ctx>>
§landingpads_scope: HashMap<u32, VecDeque<BasicBlock<'ctx>>>
§reachable: bool
Implementations§
source§impl<'ctx> State<'ctx>
impl<'ctx> State<'ctx>
pub fn new() -> Self
pub fn has_control_frames(&self) -> bool
pub fn reset_stack(&mut self, frame: &ControlFrame<'ctx>)
pub fn outermost_frame(&self) -> Result<&ControlFrame<'ctx>, CompileError>
pub fn frame_at_depth( &self, depth: u32, ) -> Result<&ControlFrame<'ctx>, CompileError>
pub fn frame_at_depth_mut( &mut self, depth: u32, ) -> Result<&mut ControlFrame<'ctx>, CompileError>
pub fn pop_frame(&mut self) -> Result<ControlFrame<'ctx>, CompileError>
pub fn push1<T: BasicValue<'ctx>>(&mut self, value: T)
pub fn push1_extra<T: BasicValue<'ctx>>(&mut self, value: T, info: ExtraInfo)
pub fn pop1(&mut self) -> Result<BasicValueEnum<'ctx>, CompileError>
pub fn pop1_extra( &mut self, ) -> Result<(BasicValueEnum<'ctx>, ExtraInfo), CompileError>
pub fn pop2( &mut self, ) -> Result<(BasicValueEnum<'ctx>, BasicValueEnum<'ctx>), CompileError>
pub fn pop2_extra( &mut self, ) -> Result<((BasicValueEnum<'ctx>, ExtraInfo), (BasicValueEnum<'ctx>, ExtraInfo)), CompileError>
pub fn pop3( &mut self, ) -> Result<(BasicValueEnum<'ctx>, BasicValueEnum<'ctx>, BasicValueEnum<'ctx>), CompileError>
pub fn pop3_extra( &mut self, ) -> Result<((BasicValueEnum<'ctx>, ExtraInfo), (BasicValueEnum<'ctx>, ExtraInfo), (BasicValueEnum<'ctx>, ExtraInfo)), CompileError>
pub fn peek1_extra( &self, ) -> Result<(BasicValueEnum<'ctx>, ExtraInfo), CompileError>
pub fn peekn(&self, n: usize) -> Result<Vec<BasicValueEnum<'ctx>>, CompileError>
pub fn peekn_extra( &self, n: usize, ) -> Result<&[(BasicValueEnum<'ctx>, ExtraInfo)], CompileError>
pub fn popn_save_extra( &mut self, n: usize, ) -> Result<Vec<(BasicValueEnum<'ctx>, ExtraInfo)>, CompileError>
pub fn popn(&mut self, n: usize) -> Result<(), CompileError>
pub fn push_block( &mut self, next: BasicBlock<'ctx>, phis: SmallVec<[PhiValue<'ctx>; 1]>, )
pub fn push_loop( &mut self, body: BasicBlock<'ctx>, next: BasicBlock<'ctx>, loop_body_phis: SmallVec<[PhiValue<'ctx>; 1]>, phis: SmallVec<[PhiValue<'ctx>; 1]>, )
pub fn push_if( &mut self, if_then: BasicBlock<'ctx>, if_else: BasicBlock<'ctx>, next: BasicBlock<'ctx>, then_phis: SmallVec<[PhiValue<'ctx>; 1]>, else_phis: SmallVec<[PhiValue<'ctx>; 1]>, next_phis: SmallVec<[PhiValue<'ctx>; 1]>, )
pub fn push_landingpad( &mut self, catch_block: BasicBlock<'ctx>, can_throw: BasicBlock<'ctx>, can_throw_phis: SmallVec<[PhiValue<'ctx>; 1]>, next: BasicBlock<'ctx>, next_phis: SmallVec<[PhiValue<'ctx>; 1]>, tags: &[u32], )
pub(crate) fn get_landingpad(&mut self) -> Option<BasicBlock<'ctx>>
pub(crate) fn get_landingpad_for_tag( &mut self, tag: u32, ) -> Option<BasicBlock<'ctx>>
pub(crate) fn pop_landingpad(&mut self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> Freeze for State<'ctx>
impl<'ctx> RefUnwindSafe for State<'ctx>
impl<'ctx> !Send for State<'ctx>
impl<'ctx> !Sync for State<'ctx>
impl<'ctx> Unpin for State<'ctx>
impl<'ctx> UnwindSafe for State<'ctx>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.