Skip to main content

LowerCtx

Struct LowerCtx 

Source
pub struct LowerCtx<'a> {
Show 14 fields pub backend: Backend, pub emitter: &'a mut AsmEmitter, pub referenced_extern: Vec<String>, pub globals: HashMap<String, (bool, bool)>, pub is_win: bool, pub macho: bool, pub local_strings: HashMap<String, String>, pub known_labels: HashSet<String>, pub ir_labels: Vec<String>, pub ir_syms: Vec<String>, pub ir_fresh: HashMap<u32, String>, pub declared_externs: HashMap<String, Reach>, pub ir_externs: Vec<String>, pub extern_slots: HashMap<u32, String>, /* private fields */
}

Fields§

§backend: Backend§emitter: &'a mut AsmEmitter§referenced_extern: Vec<String>§globals: HashMap<String, (bool, bool)>§is_win: bool§macho: bool§local_strings: HashMap<String, String>§known_labels: HashSet<String>§ir_labels: Vec<String>§ir_syms: Vec<String>§ir_fresh: HashMap<u32, String>§declared_externs: HashMap<String, Reach>§ir_externs: Vec<String>§extern_slots: HashMap<u32, String>

Implementations§

Source§

impl<'a> LowerCtx<'a>

Source

pub fn new(backend: Backend, emitter: &'a mut AsmEmitter) -> Self

Source

pub fn intern_extern(&mut self, text: String) -> ExternId

Source

pub fn coff(&self) -> bool

Source

pub fn intern_label(&mut self, text: String) -> Label

Source

pub fn intern_sym(&mut self, text: String) -> u32

Source

pub fn set_settings(&mut self, settings: SettingsMap)

Source

pub fn setting(&self, name: &str) -> bool

Source

pub fn global_symbol(&self, name: &str) -> String

Source

pub fn local_symbol(&self, name: &str) -> String

Source

pub fn mark_used(&mut self, name: &str, is_extern: bool)

Source

pub fn local_label_string(name: &str, origin: &CodeOrigin) -> String

Source

pub fn local_string(&self, name: &str) -> Result<String, String>

Source

pub fn unique_local( &mut self, comment: &str, origin: &CodeOrigin, ) -> (Node, Node)

Source

pub fn lower_synth( &mut self, nodes: &[Node], label_flags: LabelFlags<'_>, ) -> Result<(), String>

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for LowerCtx<'a>

§

impl<'a> Forget for LowerCtx<'a>

§

impl<'a> Freeze for LowerCtx<'a>

§

impl<'a> Move for LowerCtx<'a>

§

impl<'a> RefUnwindSafe for LowerCtx<'a>

§

impl<'a> Send for LowerCtx<'a>

§

impl<'a> Sync for LowerCtx<'a>

§

impl<'a> Unpin for LowerCtx<'a>

§

impl<'a> UnsafeUnpin for LowerCtx<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.