pub struct Block(pub Vec<(Id, Instr)>);Tuple Fields§
§0: Vec<(Id, Instr)>Implementations§
Source§impl Block
impl Block
pub fn range<L, U>(&mut self, lo: L, up: U, step: usize) -> Range
pub fn end_range(&mut self, range: Range) -> Result<(), Error>
pub fn add(&mut self, src_id: Id, v: i32) -> Id
pub fn mul(&mut self, src_id: Id, v: i32) -> Id
pub fn cst<C>(&mut self, c: C) -> Id
pub fn push(&mut self, inst: Instr) -> Id
pub fn unary<I>(&mut self, op: UnaryOp, arg: I, dtype: DType) -> Id
pub fn binary<I1, I2>( &mut self, op: BinaryOp, lhs: I1, rhs: I2, dtype: DType, ) -> Id
pub fn empty() -> Block
pub fn new(instrs: Vec<(Id, Instr)>) -> Block
pub fn relocate(&self) -> Result<Vec<Instr>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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