Enum cranelift_codegen::ir::GlobalValueData [−][src]
pub enum GlobalValueData {
VMContext {
offset: Offset32,
},
Deref {
base: GlobalValue,
offset: Offset32,
},
Sym {
name: ExternalName,
colocated: bool,
},
}Information about a global value declaration.
Variants
VMContextValue is the address of a field in the VM context struct, a constant offset from the VM context pointer.
Fields of VMContext
offset: Offset32 | Offset from the |
DerefValue is pointed to by another global value.
The base global value is assumed to contain a pointer. This global value is computed
by loading from memory at that pointer value, and then adding an offset. The memory must
be accessible, and naturally aligned to hold a pointer value.
Fields of Deref
base: GlobalValue | The base pointer global value. |
offset: Offset32 | Byte offset to be added to the loaded value. |
SymValue is identified by a symbolic name. Cranelift itself does not interpret this name; it's used by embedders to link with other data structures.
Fields of Sym
name: ExternalName | The symbolic name. |
colocated: bool | Will this symbol be defined nearby, such that it will always be a certain distance away, after linking? If so, references to it can avoid going through a GOT. Note that symbols meant to be preemptible cannot be colocated. |
Methods
impl GlobalValueData[src]
impl GlobalValueDatapub fn symbol_name(&self) -> &ExternalName[src]
pub fn symbol_name(&self) -> &ExternalNameAssume that self is an GlobalValueData::Sym and return its name.
Trait Implementations
impl Clone for GlobalValueData[src]
impl Clone for GlobalValueDatafn clone(&self) -> GlobalValueData[src]
fn clone(&self) -> GlobalValueDataReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Display for GlobalValueData[src]
impl Display for GlobalValueDataAuto Trait Implementations
impl Send for GlobalValueData
impl Send for GlobalValueDataimpl Sync for GlobalValueData
impl Sync for GlobalValueData