pub struct CompiledFunction<E: CompiledFuncEnv> {
pub buffer: MachBufferFinalized<Final>,
pub alignment: u32,
/* private fields */
}
Expand description
Compiled function: machine code body, jump table offsets, and unwind information.
Fields§
§buffer: MachBufferFinalized<Final>
The machine code buffer for this function.
alignment: u32
The alignment for the compiled function.
Implementations§
source§impl<E> CompiledFunction<E>where
E: CompiledFuncEnv,
impl<E> CompiledFunction<E>where E: CompiledFuncEnv,
sourcepub fn new(buffer: MachBufferFinalized<Final>, env: E, alignment: u32) -> Self
pub fn new(buffer: MachBufferFinalized<Final>, env: E, alignment: u32) -> Self
Creates a CompiledFunction from a cranelift_codegen::MachBufferFinalized
sourcepub fn relocations(&self) -> impl Iterator<Item = Relocation> + '_
pub fn relocations(&self) -> impl Iterator<Item = Relocation> + '_
Returns an iterator to the function’s relocation information.
sourcepub fn traps(&self) -> impl Iterator<Item = TrapInformation> + '_
pub fn traps(&self) -> impl Iterator<Item = TrapInformation> + '_
Returns an iterator to the function’s trap information.
sourcepub fn address_map(&self) -> &FunctionAddressMap
pub fn address_map(&self) -> &FunctionAddressMap
Get the function’s address map from the metadata.
sourcepub fn set_address_map(
&mut self,
offset: u32,
length: u32,
with_instruction_addresses: bool
)
pub fn set_address_map( &mut self, offset: u32, length: u32, with_instruction_addresses: bool )
Create and return the compiled function address map from the original source offset and length.
sourcepub fn unwind_info(&self) -> Option<&UnwindInfo>
pub fn unwind_info(&self) -> Option<&UnwindInfo>
Get a reference to the unwind information from the function’s metadata.
sourcepub fn metadata(&self) -> &CompiledFunctionMetadata
pub fn metadata(&self) -> &CompiledFunctionMetadata
Get a reference to the compiled function metadata.
sourcepub fn set_value_labels_ranges(&mut self, ranges: ValueLabelsRanges)
pub fn set_value_labels_ranges(&mut self, ranges: ValueLabelsRanges)
Set the value labels ranges in the function’s metadata.
sourcepub fn set_unwind_info(&mut self, unwind: UnwindInfo)
pub fn set_unwind_info(&mut self, unwind: UnwindInfo)
Set the unwind info in the function’s metadata.
sourcepub fn set_sized_stack_slots(&mut self, slots: StackSlots)
pub fn set_sized_stack_slots(&mut self, slots: StackSlots)
Set the sized stack slots.