nx_search_win_src.nx
buildroot/runtime/nx_search_win_src.nx
about
nx_search_win_src.nx -- Builds a minimal inverted index for three documents, supporting query lookup and ranking on Windows.
dependencies 0 imports · 0 importers
imports: none
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 2 | const K_MAGIC_5381: i64 = 5381 |
| 14 | const SLOTS: i64 = 256 |
functions
| 10 | func sys_mmap(size: i64) -> *u8 { return __syscall(9, 0, size, 3, 34, 0-1, 0) as *u8 } |
| 11 | func sys_write(fd: i64, buf: *u8, n: i64) -> i64 { return __syscall(1, fd, buf as i64, n, 0, 0, 0) } |
| 12 | func sys_exit(code: i64) -> i64 { return __syscall(60, code, 0, 0, 0, 0, 0) } called by 1: main |
| 16 | func swin_lc(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c } called by 1: swin_hash |
| 17 | func swin_is_tok(c: i64) -> i64 { if c>=97 { if c<=122 { return 1 } } if c>=65 { if c<=90 { return 1 } } if c>=48 { if c<=57 { return 1 } } return 0 } called by 1: swin_doc |
| 18 | func swin_hash(b: *u8, s: i64, e: i64) -> i64 { var h: i64=K_MAGIC_5381; var i: i64=s; while i<e { h=h*33 + swin_lc(b[i] as i64); i=i+1 } if h<0 { h=0-h } return h } |
| 20 | func swin_add(tbl: *i64, hsh: i64, doc: i64) -> i64 called by 1: swin_doc |
| 30 | func swin_get(tbl: *i64, hsh: i64) -> i64 |
| 40 | func swin_doc(tbl: *i64, s: *u8, doc: i64) -> i64 |
| 52 | func swin_report(tbl: *i64, term: *u8) -> i64 |
| 64 | func swin_rank(tbl: *i64, terms: *i64, nterms: i64) -> i64 |
| 83 | func main() -> i64 |