Enum BtType
pub enum BtType {
}Expand description
A data type in the BlueTac IR.
Variants§
Implementations§
§impl BtType
impl BtType
pub fn get_const_default_value(&self) -> BtConstantValue
pub fn get_const_default_value(&self) -> BtConstantValue
Creates a BtConstantValue for the current BtType with a default zero value.
pub fn is_arithmetic(&self) -> bool
pub fn is_arithmetic(&self) -> bool
Is this type an arithmetic type (integer or floating-point)?
pub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Is this type an integer (signed or unsigned) type?
pub fn is_floating_point(&self) -> bool
pub fn is_floating_point(&self) -> bool
Is this type a floating-point type?
pub fn is_signed_integer(&self) -> bool
pub fn is_signed_integer(&self) -> bool
Is this type a signed integer?
pub fn is_unsigned_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
Is this type an unsigned integer?
pub fn is_character(&self) -> bool
pub fn is_character(&self) -> bool
Is this type a character (8-bit integer) type?
pub fn is_pointer(&self) -> bool
pub fn is_pointer(&self) -> bool
Is this type a pointer type?
pub fn is_character_array(&self) -> bool
pub fn is_character_array(&self) -> bool
Is this type a character array type?
pub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Is this type a function type?
pub fn get_innermost_scalar_type(&self) -> &BtType
pub fn get_innermost_scalar_type(&self) -> &BtType
Gets the type’s inner-most scalar type.
For an aggregate type, recurses into the type until a scalar type is found.
BtType::Array { BtType::Array { BtType::Int8 } } —> BtType::Int8
pub fn to_printer(&self) -> String
pub fn to_printer(&self) -> String
Converts the BtType to a string suitable for the IR printer.
Trait Implementations§
impl Eq for BtType
impl StructuralPartialEq for BtType
Auto Trait Implementations§
impl Freeze for BtType
impl RefUnwindSafe for BtType
impl Send for BtType
impl Sync for BtType
impl Unpin for BtType
impl UnwindSafe for BtType
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