[−][src]Struct cranelift_codegen::machinst::sections::MachSections
A collection of sections with defined start-offsets.
Fields
sections: Vec<MachSection>
Sections, in offset order.
Methods
impl MachSections
[src]
pub fn new() -> MachSections
[src]
New, empty set of sections.
pub fn add_section(&mut self, start: CodeOffset, length: CodeOffset) -> usize
[src]
Add a section with a known offset and size. Returns the index.
pub fn get_section<'a>(&'a mut self, idx: usize) -> &'a mut MachSection
[src]
Mutably borrow the given section by index.
pub fn two_sections<'a>(
&'a mut self,
idx1: usize,
idx2: usize
) -> (&'a mut MachSection, &'a mut MachSection)
[src]
&'a mut self,
idx1: usize,
idx2: usize
) -> (&'a mut MachSection, &'a mut MachSection)
Get mutable borrows of two sections simultaneously. Used during instruction emission to provide references to the .text and .rodata (constant pool) sections.
pub fn emit<CS: CodeSink>(&self, sink: &mut CS)
[src]
Emit this set of sections to a set of sinks for the code, relocations, traps, and stackmap.
pub fn get_srclocs_sorted<'a>(&'a self) -> MachSectionsSrcLocs<'a>
[src]
Get a list of source location mapping tuples in sorted-by-start-offset order.
pub fn total_size(&self) -> CodeOffset
[src]
Get the total required size for these sections.
Auto Trait Implementations
impl RefUnwindSafe for MachSections
impl Send for MachSections
impl Sync for MachSections
impl Unpin for MachSections
impl UnwindSafe for MachSections
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,