code wiki / _hdl_build / nx_js_hydrate_index_gate.nx

nx_js_hydrate_index_gate.nx

buildroot/runtime/_hdl_build/nx_js_hydrate_index_gate.nx

5649 B97 linesdepth 7pulls 24 transitivereach 0 importersview sourcekind gate/prooftopic js
docsdependenciesstructsconstsfunctions

about

nx_js_hydrate_index_gate.nx -- CLOSES THE LOOP: a page whose INLINE JS builds content -> hydrate (js_render_page, async-drained) -> extract text -> INDEX into a seg_store shard -> the JS-built token is SEARCHABLE (ss_term finds it), whereas indexing the RAW static HTML does NOT. Proves hydration makes JS content indexable/searchable -- the payoff of the whole JS-execution arc, end-to-end, HERMETIC. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_js_eval.nx nx_html_to_text.nx nx_seg_store.nx nx_js_hydrate_index_gate.nx

imports: nx_syscalls.nxnx_js_eval.nxnx_html_to_text.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main r_p sys_write sys_mmap r_clen nx_html_to_text nx_html_to_text_x h2t_state_new sys_mmap ↻ sys_mmap ↻ h2t_scan_tag h2t_skip_to_gt h2t_scan_name h2t_is_name h2t_is_block_tag h2t_name_eq_lit h2t_lc h2t_lc ↻ h2t_is_suppress_tag h2t_name_eq_lit ↻ h2t_emit_newline h2t_name_eq_lit ↻ h2t_emit_raw h2t_find_href h2t_lc ↻ h2t_is_name ↻ h2t_decode_entity h2t_decode_numeric h2t_is_name ↻ nx_html_entity_lookup h2t_emit_codepoint h2t_emit_text_byte h2t_is_ws h2t_emit_text_byte ↻ sys_munmap index_doc next_segid sys_mmap ↻ ss_manifest_cap ss_manifest_file_cap

structs

none

consts

none

functions

11func r_p(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 2: chkmain calls 1: sys_write
12func r_pn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var q: i64=k-1; var x: i64=0; while q>=0 { o[x]=t[q]; x=x+1; q=q-1 } sys_write(1,o,x); return 0 }
called by 1: main calls 2: sys_writesys_mmap
13func r_clen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
15func next_segid(prefix: *u8) -> i64
called by 1: index_doc calls 2: sys_mmapss_manifest_cap
35func index_doc(prefix: *u8, key: *u8, text: *u8, tlen: i64) -> i64
43func term_count(prefix: *u8, term: *u8) -> i64
called by 1: main calls 3: ss_opensys_mmapss_term
50func chk(cond: i64, name: *u8, pp: *i64, tp: *i64) -> i64
called by 1: main calls 1: r_p
56func main() -> i64