pub struct CilBackend {
pub assembly: CilAssembly,
pub default_namespace: String,
/* private fields */
}Expand description
CIL code generation backend.
Converts LCNF IR into .NET CIL IL assembly (suitable for ilasm).
Fields§
§assembly: CilAssembly§default_namespace: StringImplementations§
Source§impl CilBackend
impl CilBackend
Sourcepub fn lcnf_to_cil_type(&self, ty: &LcnfType) -> CilType
pub fn lcnf_to_cil_type(&self, ty: &LcnfType) -> CilType
Map an LCNF type to a CIL type.
Sourcepub fn emit_literal(&self, method: &mut CilMethod, lit: &LcnfLit)
pub fn emit_literal(&self, method: &mut CilMethod, lit: &LcnfLit)
Emit CIL instructions for an LCNF literal.
Sourcepub fn emit_arg(&mut self, method: &mut CilMethod, arg: &LcnfArg)
pub fn emit_arg(&mut self, method: &mut CilMethod, arg: &LcnfArg)
Emit CIL instructions for an LCNF argument.
Sourcepub fn emit_let_value(&mut self, method: &mut CilMethod, val: &LcnfLetValue)
pub fn emit_let_value(&mut self, method: &mut CilMethod, val: &LcnfLetValue)
Emit CIL instructions for an LCNF let-value.
Sourcepub fn emit_expr(&mut self, method: &mut CilMethod, expr: &LcnfExpr)
pub fn emit_expr(&mut self, method: &mut CilMethod, expr: &LcnfExpr)
Emit CIL instructions for an LCNF expression.
Sourcepub fn emit_fun_decl(&mut self, decl: &LcnfFunDecl) -> CilMethod
pub fn emit_fun_decl(&mut self, decl: &LcnfFunDecl) -> CilMethod
Emit a complete LCNF function declaration as a CIL method.
Sourcepub fn emit_ilasm(&self) -> String
pub fn emit_ilasm(&self) -> String
Emit the assembly as IL assembly source text (for ilasm).
Auto Trait Implementations§
impl Freeze for CilBackend
impl RefUnwindSafe for CilBackend
impl Send for CilBackend
impl Sync for CilBackend
impl Unpin for CilBackend
impl UnsafeUnpin for CilBackend
impl UnwindSafe for CilBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more