pub fn new(
        name: &str,
        return_type: Option<&'a ValueType>,
        storage_env: Option<&'a StorageEnv>,
        classes: Option<&'a HashMap<String, ClassSlot>>,
        // A list of offsets relative to rbp
        // where references are passed in as parameter and GC should be aware
        ref_list: Vec<i32>,
        level: u32, // Nesting level. 0 = global function / class method / main procedure
        platform: Platform,
    ) -> Emitter<'a> {
        Emitter {
            name: name.to_owned(),
            return_type,
            storage_env,
            classes,
            current_stack_top: 0,
            max_stack_top: 0,
            ref_list,
            level,
            // push rbp; mov rbp,rsp; add rsp,{}
            code: vec![0x55, 0x48, 0x89, 0xe5, 0x48, 0x81, 0xEC, 0, 0, 0, 0],
            links: vec![],
            platform,
        }
    }
// Construct a full machine code emitter
Construct a full machine code emitter
Construct a full machine code emitter
pub fn new(
        name: &str,
        return_type: Option<&'a ValueType>,
        storage_env: Option<&'a StorageEnv>,
        classes: Option<&'a HashMap<String, ClassSlot>>,
        // A list of offsets relative to rbp
        // where references are passed in as parameter and GC should be aware
        ref_list: Vec<i32>,
        level: u32, // Nesting level. 0 = global function / class method / main procedure
        platform: Platform,
    ) -> Emitter<'a> {
        Emitter {
            name: name.to_owned(),
            return_type,
            storage_env,
            classes,
            current_stack_top: 0,
            max_stack_top: 0,
            ref_list,
            level,
            // push rbp; mov rbp,rsp; add rsp,{}
            code: vec![0x55, 0x48, 0x89, 0xe5, 0x48, 0x81, 0xEC, 0, 0, 0, 0],
            links: vec![],
            platform,
        }
    }
pub fn new ( name : & str , return_type : Option < & ' a ValueType > , storage_env : Option < & ' a StorageEnv > , classes : Option < & ' a HashMap < String , ClassSlot > > , // A list of offsets relative to rbp // where references are passed in as parameter and GC should be aware ref_list : Vec < i32 > , level : u32 , // Nesting level. 0 = global function / class method / main procedure platform : Platform , ) -> Emitter < ' a > { Emitter { name : name . to_owned ( ) , return_type , storage_env , classes , current_stack_top : 0 , max_stack_top : 0 , ref_list , level , // push rbp; mov rbp,rsp; add rsp,{} code : vec ! [ 0x55 0x48 0x89 0xe5 0x48 0x81 0xEC 0 0 0 0 ] , links : vec ! [ ] , platform , } }
Construct a full machine code emitter
Construct a full machine code emitter
name
&str
return_type
Option<&'a ValueType>
storage_env
Option<&'a StorageEnv>
classes
Option<&'a HashMap<String, ClassSlot>>
ref_list
Vec<i32>
level
u32
platform
Platform