Enum BtValue
pub enum BtValue {
Constant(BtConstantValue),
Variable(String),
}Expand description
An IR value is either a constant or a variable.
Variants§
Constant(BtConstantValue)
Variable(String)
Implementations§
§impl BtValue
impl BtValue
pub fn new_constant_i8(value: i8) -> Self
pub fn new_constant_i8(value: i8) -> Self
Creates a new constant Int8 value
pub fn new_constant_i16(value: i16) -> Self
pub fn new_constant_i16(value: i16) -> Self
Creates a new constant Int16 value
pub fn new_constant_i32(value: i32) -> Self
pub fn new_constant_i32(value: i32) -> Self
Creates a new constant Int32 value
pub fn new_constant_i64(value: i64) -> Self
pub fn new_constant_i64(value: i64) -> Self
Creates a new constant Int64 value
pub fn new_constant_u8(value: u8) -> Self
pub fn new_constant_u8(value: u8) -> Self
Creates a new constant UInt8 value
pub fn new_constant_u16(value: u16) -> Self
pub fn new_constant_u16(value: u16) -> Self
Creates a new constant UInt16 value
pub fn new_constant_u32(value: u32) -> Self
pub fn new_constant_u32(value: u32) -> Self
Creates a new constant UInt32 value
pub fn new_constant_u64(value: u64) -> Self
pub fn new_constant_u64(value: u64) -> Self
Creates a new constant UInt64 value
pub fn new_constant_f32(value: f32) -> Self
pub fn new_constant_f32(value: f32) -> Self
Creates a new constant Float32 value
pub fn new_constant_f64(value: f64) -> Self
pub fn new_constant_f64(value: f64) -> Self
Creates a new constant Float64 value
pub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Is the value a constant value?
pub fn get_type(&self, symbols: &SymbolTable) -> BtType
pub fn get_type(&self, symbols: &SymbolTable) -> BtType
Gets the IR type of the value.
Trait Implementations§
§impl From<AstConstantInteger> for BtValue
impl From<AstConstantInteger> for BtValue
§fn from(value: AstConstantInteger) -> Self
fn from(value: AstConstantInteger) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for BtValue
Auto Trait Implementations§
impl Freeze for BtValue
impl RefUnwindSafe for BtValue
impl Send for BtValue
impl Sync for BtValue
impl Unpin for BtValue
impl UnwindSafe for BtValue
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