code wiki / _hdl_build / nx_float_gate.nx

nx_float_gate.nx

buildroot/runtime/_hdl_build/nx_float_gate.nx

10402 B176 linesdepth 8pulls 28 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_float_gate.nx -- VERDICT gate for the R5 float rung of the sovereign HTML renderer (browser Phase 2-4). The sibling nx_float_test DUMPS per-box geometry for eyeballing; this gate ASSERTS the exact placement the float/flex layout must produce, so the rung is MACHINE-VERIFIED, not human-read. It runs the REAL render pipeline prefix (nx_layout_from_dom -> box<->element map -> rh_cascade -> nx_layout_block_layout) -- identical to what nx_render_html uses on real pages -- on controlled fixtures and checks x/y/w/h. Differential correctness is built in: the SAME markup with vs without float must lay out DIFFERENTLY (float:left -> main BESIDE at x=200; no float -> main BELOW at y=10), so a layout that ignored float could not pass both. LIAR-KILL: the checker is fed a deliberately wrong expectation and must REJECT it (proving it is not a rubber stamp). GREEN iff every assertion holds. 100% sovereign (no gcc/V8/Chrome). license_tier: ORIGINAL

dependencies 14 imports · 0 importers

nx_syscalls.nx nx_css_tokenize.nx nx_css_parse.nx nx_css_apply.nx nx_css_color_decode.nx nx_css_dimension_to_px.nx nx_css_selector_match.nx nx_html_tokenizer.nx nx_dom_query.nx nx_layout_box.nx nx_float_gate.nx

diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_parse.nxnx_css_apply.nxnx_css_color_decode.nxnx_css_dimension_to_px.nxnx_css_selector_match.nxnx_html_tokenizer.nxnx_dom_query.nxnx_layout_box.nxnx_layout_default_display.nxnx_layout_from_dom.nxnx_layout_block.nxnx_render_html.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap g_w sys_write run_layout sys_mmap ↻ nx_layout_tree_init nx_layout_from_dom_stack_i nx_layout_from_dom nx_layout_box_append _layout_box_at _lfd_push sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc _lfd_is_chrome_start _lfd_chrome_tag _lfd_has_role_nav _lfd_name_eq _lfd_lc _lfd_has_chrome_class _lfd_src_has_sub _lfd_inline_hidden _lfd_src_has_sub ↻ nx_layout_default_display _disp_eq1 _disp_lc _disp_is_h_family _disp_lc ↻ _disp_eq2 _disp_lc ↻ _disp_eq3 _disp_lc ↻ _disp_eq4 _disp_lc ↻ _disp_eq5

structs

none

consts

none

functions

27func g_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 }
called by 2: chkmain calls 1: sys_write
28func pn(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 2: chkmain calls 2: sys_mmapsys_write
32func run_layout(html: *u8, css: *u8, vw: i64) -> *LayoutTree
97func geom_match(tree: *LayoutTree, i: i64, ex: i64, ey: i64, ew: i64, eh: i64) -> i64
called by 2: chkmain
107func chk(tree: *LayoutTree, i: i64, ex: i64, ey: i64, ew: i64, eh: i64, label: *u8, pass: *i64) -> i64
called by 1: main calls 3: geom_matchg_wpn
119func main() -> i64