Enum cretonne_codegen::ir::GlobalVarData
[−]
[src]
pub enum GlobalVarData { VMContext { offset: Offset32, }, Deref { base: GlobalVar, offset: Offset32, }, Sym { name: ExternalName, colocated: bool, }, }
Information about a global variable declaration.
Variants
VMContext
Variable is part of the VM context struct, it's address is a constant offset from the VM context pointer.
Fields of VMContext
offset: Offset32 | Offset from the |
Deref
Variable is part of a struct pointed to by another global variable.
The base
global variable is assumed to contain a pointer to a struct. This global
variable lives at an offset into the struct. The memory must be accessible, and
naturally aligned to hold a pointer value.
Fields of Deref
base: GlobalVar | The base pointer global variable. |
offset: Offset32 | Byte offset to be added to the pointer loaded from |
Sym
Variable is at an address 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 variable 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 GlobalVarData
[src]
pub fn symbol_name(&self) -> &ExternalName
[src]
Assume that self
is an GlobalVarData::Sym
and return its name.
Trait Implementations
impl Clone for GlobalVarData
[src]
fn clone(&self) -> GlobalVarData
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more