code wiki / (root) / nx_pe_dll_com_device.nx

nx_pe_dll_com_device.nx

buildroot/runtime/nx_pe_dll_com_device.nx

11611 B187 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic pe
docsdependenciesstructsconstsfunctions

about

nx_pe_dll_com_device.nx -- THE CONVERGENCE RUNG: emit a sovereign DLL exporting a D3D11CreateDevice-shaped factory that returns a COM object whose vtable methods run REAL nx_cc-compiled rasterizer code. Fuses the two proven halves: (COM object + vtable dispatch) x (compiled render fn) = a foreign Windows process does dev = nishi_d3d_create_device(mem); dev->lpVtbl->Render(dev, buf, w, h) -> compiled rasterizer -> pixels. Method BODIES (nx_dev_render/nx_dev_get_info) = sovereign nx_cc-compiled NishiLang. COM PLUMBING (per-method MS-x64-> SysV ABI thunks + a factory that builds the vtable in the CALLER-PROVIDED buffer via RIP-relative LEA) = generated by THIS sovereign emitter (toolchain ABI glue, like a C++ compiler's vtables+thiscall adapters -- NO C++ ships). Position-independent (no .reloc). Input /tmp/nishi_export_lib.s Output knowledge/nishi_com_device.dll license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nxasm_x86.nx nx_pe_writer.nx nx_pe_dll_com_device.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnxasm_x86.nxnx_pe_writer.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cdv_puts sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close sys_exit ↻ cdv_assemble sys_mmap ↻ cdv_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num nxi_buf sys_write ↻ sys_munmap ↻ cdv_emit _w16 _w32 _w8

structs

none

consts

none

functions

15func cdv_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
20func cdv_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
21func cdv_wstr(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } buf[off+i]=0 as u8; return i+1 }
called by 1: cdv_emit
23func cdv_assemble(src: *u8, n: i64, out: *u8, out_cap: i64, p0: *i64, l0: *u8, p1: *i64, l1: *u8) -> i64
called by 1: main calls 1: sys_mmap
58func cdv_emit(buf: *u8, code: *u8, code_len: i64, getinfo_off: i64, render_off: i64) -> i64
148func main() -> i64