[−][src]Struct cranelift_codegen_meta::cdsl::ast::ConstPool
Contains constants created in the AST that must be inserted into the true ConstantPool when the legalizer code is generated. The constant data is named in the order it is inserted; inserting data using insert will avoid duplicates.
Fields
pool: Vec<Vec<u8>>
Implementations
impl ConstPool
[src]
pub fn new() -> Self
[src]
Create an empty constant pool.
fn create_name(position: usize) -> String
[src]
Create a name for a constant from its position in the pool.
pub fn insert(&mut self, data: Vec<u8>) -> String
[src]
Insert constant data into the pool, returning the name of the variable used to reference it. This method will search for data that matches the new data and return the existing constant name to avoid duplicates.
pub fn iter(&self) -> impl Iterator<Item = (String, &Vec<u8>)>
[src]
Iterate over the name/value pairs in the pool.
Auto Trait Implementations
impl RefUnwindSafe for ConstPool
impl Send for ConstPool
impl Sync for ConstPool
impl Unpin for ConstPool
impl UnwindSafe for ConstPool
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,