Struct cranelift_codegen::ir::entities::GlobalValue [−][src]
pub struct GlobalValue(_);
Expand description
An opaque reference to a global value.
A GlobalValue
is a Value
that will be live across the entire
function lifetime. It can be preloaded from other global values.
You can create a GlobalValue
in the following ways:
- When compiling to WASM, you can use it to load values from a
VmContext
usingFuncEnvironment::make_global
. - When compiling to native code, you can use it for objects in static memory with
Module::declare_data_in_func
. - For any compilation target, it can be registered with
FunctionBuilder::create_global_value
.
GlobalValue
s can be retrieved with
InstBuilder:global_value
.
While the order is stable, it is arbitrary.
Implementations
impl GlobalValue
[src]
impl GlobalValue
[src]impl GlobalValue
[src]
impl GlobalValue
[src]pub fn with_number(n: u32) -> Option<Self>
[src]
pub fn with_number(n: u32) -> Option<Self>
[src]Create a new global value reference from its number.
This method is for use by the parser.
Trait Implementations
impl Clone for GlobalValue
[src]
impl Clone for GlobalValue
[src]fn clone(&self) -> GlobalValue
[src]
fn clone(&self) -> GlobalValue
[src]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)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for GlobalValue
[src]
impl Debug for GlobalValue
[src]impl Display for GlobalValue
[src]
impl Display for GlobalValue
[src]impl EntityRef for GlobalValue
[src]
impl EntityRef for GlobalValue
[src]impl From<GlobalValue> for AnyEntity
[src]
impl From<GlobalValue> for AnyEntity
[src]fn from(r: GlobalValue) -> Self
[src]
fn from(r: GlobalValue) -> Self
[src]Performs the conversion.
impl Hash for GlobalValue
[src]
impl Hash for GlobalValue
[src]impl Ord for GlobalValue
[src]
impl Ord for GlobalValue
[src]impl PartialEq<GlobalValue> for GlobalValue
[src]
impl PartialEq<GlobalValue> for GlobalValue
[src]fn eq(&self, other: &GlobalValue) -> bool
[src]
fn eq(&self, other: &GlobalValue) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &GlobalValue) -> bool
[src]
fn ne(&self, other: &GlobalValue) -> bool
[src]This method tests for !=
.
impl PartialOrd<GlobalValue> for GlobalValue
[src]
impl PartialOrd<GlobalValue> for GlobalValue
[src]fn partial_cmp(&self, other: &GlobalValue) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &GlobalValue) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl ReservedValue for GlobalValue
[src]
impl ReservedValue for GlobalValue
[src]fn reserved_value() -> GlobalValue
[src]
fn reserved_value() -> GlobalValue
[src]Create an instance of the reserved value.
fn is_reserved_value(&self) -> bool
[src]
fn is_reserved_value(&self) -> bool
[src]Checks whether value is the reserved one.
impl Copy for GlobalValue
[src]
impl Eq for GlobalValue
[src]
impl StructuralEq for GlobalValue
[src]
impl StructuralPartialEq for GlobalValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for GlobalValue
impl Send for GlobalValue
impl Sync for GlobalValue
impl Unpin for GlobalValue
impl UnwindSafe for GlobalValue
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> SparseMapValue<T> for T where
T: EntityRef,
[src]
impl<T> SparseMapValue<T> for T where
T: EntityRef,
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more