pub enum VCodeConstantData {
Pool(Constant, ConstantData),
WellKnown(&'static [u8]),
Generated(ConstantData),
U64([u8; 8]),
}
Expand description
Identify the different types of constant that can be inserted into VCodeConstants. Tracking these separately instead of as raw byte buffers allows us to avoid some duplication.
Variants§
Pool(Constant, ConstantData)
A constant already present in the Cranelift IR ConstantPool.
WellKnown(&'static [u8])
A reference to a well-known constant value that is statically encoded within the compiler.
Generated(ConstantData)
A constant value generated during lowering; the value may depend on the instruction context which makes it difficult to de-duplicate–if possible, use other variants.
U64([u8; 8])
A constant of at most 64 bits. These are deduplicated as
well. Stored as a fixed-size array of u8
so that we do not
encounter endianness problems when cross-compiling.
Implementations§
Auto Trait Implementations§
impl Freeze for VCodeConstantData
impl RefUnwindSafe for VCodeConstantData
impl Send for VCodeConstantData
impl Sync for VCodeConstantData
impl Unpin for VCodeConstantData
impl UnwindSafe for VCodeConstantData
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