Struct ExtFuncData
pub struct ExtFuncData {
pub name: ExternalName,
pub signature: SigRef,
pub colocated: bool,
pub patchable: bool,
}Expand description
An external function.
Information about a function that can be called directly with a direct call instruction.
Fields§
§name: ExternalNameName of the external function.
signature: SigRefCall signature of function.
colocated: boolWill this function 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 or PLT. Note that symbols meant to be preemptible cannot be considered colocated.
If true, some backends may use relocation forms that have limited range. The exact
distance depends on the code model in use. Currently on AArch64, for example, Cranelift
uses a custom code model supporting up to +/- 128MB displacements. If it is unknown how
far away the target will be, it is best not to set the colocated flag; in general, this
flag is best used when the target is known to be in the same unit of code generation, such
as a Wasm module.
See the documentation for RelocDistance for more details. A colocated flag value of
true implies RelocDistance::Near.
patchable: boolIs this function “patchable”? If so, calls to this function will emit additional metadata indicating how to patch them in or out.
Calls to functions of any calling convention may be patchable, but only calls with no return values are patchable. This is because every SSA value must always be defined, and return values would not be if the call were patched out.
Implementations§
§impl ExtFuncData
impl ExtFuncData
Trait Implementations§
§impl Clone for ExtFuncData
impl Clone for ExtFuncData
§fn clone(&self) -> ExtFuncData
fn clone(&self) -> ExtFuncData
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ExtFuncData
impl Debug for ExtFuncData
§impl<'de> Deserialize<'de> for ExtFuncData
impl<'de> Deserialize<'de> for ExtFuncData
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExtFuncData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExtFuncData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for ExtFuncData
impl Hash for ExtFuncData
§impl PartialEq for ExtFuncData
impl PartialEq for ExtFuncData
§impl Serialize for ExtFuncData
impl Serialize for ExtFuncData
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ExtFuncData
Auto Trait Implementations§
impl Freeze for ExtFuncData
impl RefUnwindSafe for ExtFuncData
impl Send for ExtFuncData
impl Sync for ExtFuncData
impl Unpin for ExtFuncData
impl UnwindSafe for ExtFuncData
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)