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
Create a new global value reference from its number.
This method is for use by the parser.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Create an instance of the reserved value.
Checks whether value is the reserved one.
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
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.