Enum cretonne::prelude::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
VMContext
Value 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 |
Deref
Value 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. |
Sym
Value is identified by a symbolic name. Cretonne 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 GlobalValueData
pub fn symbol_name(&self) -> &ExternalName
[src]
pub fn symbol_name(&self) -> &ExternalName
Assume that self
is an GlobalValueData::Sym
and return its name.
Trait Implementations
impl Clone for GlobalValueData
[src]
impl Clone for GlobalValueData
fn clone(&self) -> GlobalValueData
[src]
fn clone(&self) -> GlobalValueData
Returns 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 GlobalValueData
Auto Trait Implementations
impl Send for GlobalValueData
impl Send for GlobalValueData
impl Sync for GlobalValueData
impl Sync for GlobalValueData