#[non_exhaustive]pub enum Lowering {
Lsb(LsbOp),
Host {
module: String,
name: String,
},
Fast {
fast: Fast,
module: String,
name: String,
},
Class {
op: ClassOp,
module: String,
name: String,
},
}Expand description
How one named intrinsic compiles.
§Examples
use bcgen_lang::{Fast, Lowering};
let l = Lowering::Fast { fast: Fast::Concat, module: "mox".into(), name: "concat".into() };
assert_eq!(l.host(), Some(("mox", "concat")));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Lsb(LsbOp)
An LSB sequence, with LSB’s semantics (hooks included).
Host
A call to the host function module.name (an LSB import taking the
operands as dyn and returning a dyn), always.
Fast
The fast path inline on its domain, the host function module.name
everywhere else.
Fields
Class
A class operation, inline for the unit’s classes, the host function
module.name for everything else. A call of the extern path of
the same name compiles the same way (lowering templates call host
symbols, not intrinsics).
Implementations§
Trait Implementations§
impl Eq for Lowering
impl StructuralPartialEq for Lowering
Auto Trait Implementations§
impl Freeze for Lowering
impl RefUnwindSafe for Lowering
impl Send for Lowering
impl Sync for Lowering
impl Unpin for Lowering
impl UnsafeUnpin for Lowering
impl UnwindSafe for Lowering
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