pub enum VCodeConstantData {
    Pool(ConstantConstantData),
    WellKnown(&'static [u8]),
    Generated(ConstantData),
}
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(ConstantConstantData)

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.

Implementations

Retrieve the constant data as a byte slice.

Calculate the alignment of the constant data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.