pub fn call_builtin_alloc(&mut self, prototype: &str) {
        match self.platform {
            Platform::Windows => {
                // mov r8,rbp
                self.emit(&[0x49, 0x89, 0xE8]);
                // mov r9,rsp
                self.emit(&[0x49, 0x89, 0xE1]);
                // mov rdx,rsi
                self.emit(&[0x48, 0x89, 0xF2]);
                // lea rcx,[rip+{_PROTOTYPE}]
                self.emit(&[0x48, 0x8D, 0x0D]);
            }
            Platform::Linux | Platform::Macos => {
                // mov rdx,rbp
                self.emit(&[0x48, 0x89, 0xEA]);
                // mov rcx,rsp
                self.emit(&[0x48, 0x89, 0xE1]);
                // lea rdi,[rip+{_PROTOTYPE}]
                self.emit(&[0x48, 0x8D, 0x3D]);
            }
        }
        self.emit_link(prototype, 0);
        self.prepare_call(self.platform.stack_reserve());
        self.call(BUILTIN_ALLOC_OBJ);
        self.emit_ref_map();
    }
// Call into standard library to allocate object
Call into standard library to allocate object
Call into standard library to allocate object
pub fn call_builtin_alloc(&mut self, prototype: &str) {
        match self.platform {
            Platform::Windows => {
                // mov r8,rbp
                self.emit(&[0x49, 0x89, 0xE8]);
                // mov r9,rsp
                self.emit(&[0x49, 0x89, 0xE1]);
                // mov rdx,rsi
                self.emit(&[0x48, 0x89, 0xF2]);
                // lea rcx,[rip+{_PROTOTYPE}]
                self.emit(&[0x48, 0x8D, 0x0D]);
            }
            Platform::Linux | Platform::Macos => {
                // mov rdx,rbp
                self.emit(&[0x48, 0x89, 0xEA]);
                // mov rcx,rsp
                self.emit(&[0x48, 0x89, 0xE1]);
                // lea rdi,[rip+{_PROTOTYPE}]
                self.emit(&[0x48, 0x8D, 0x3D]);
            }
        }
        self.emit_link(prototype, 0);
        self.prepare_call(self.platform.stack_reserve());
        self.call(BUILTIN_ALLOC_OBJ);
        self.emit_ref_map();
    }
pub fn call_builtin_alloc ( & mut self , prototype : & str ) { match self . platform { Platform :: Windows => { // mov r8,rbp self . emit ( & [ 0x49 , 0x89 , 0xE8 ] ) ; // mov r9,rsp self . emit ( & [ 0x49 , 0x89 , 0xE1 ] ) ; // mov rdx,rsi self . emit ( & [ 0x48 , 0x89 , 0xF2 ] ) ; // lea rcx,[rip+{_PROTOTYPE}] self . emit ( & [ 0x48 , 0x8D , 0x0D ] ) ; } Platform :: Linux | Platform :: Macos => { // mov rdx,rbp self . emit ( & [ 0x48 , 0x89 , 0xEA ] ) ; // mov rcx,rsp self . emit ( & [ 0x48 , 0x89 , 0xE1 ] ) ; // lea rdi,[rip+{_PROTOTYPE}] self . emit ( & [ 0x48 , 0x8D , 0x3D ] ) ; } } self . emit_link ( prototype , 0 ) ; self . prepare_call ( self . platform . stack_reserve ( ) ) ; self . call ( BUILTIN_ALLOC_OBJ ) ; self . emit_ref_map ( ) ; }
Call into standard library to allocate object
Call into standard library to allocate object
&mut self
prototype
&str