nx_import.nx
buildroot/runtime/nx_import.nx
about
dependencies 2 imports · 41 importers
diagram shows first 10 each side; +0 more imports, +31 more importers in the complete lists below.
imports: nx_syscalls.nxnx_linemap.nx
imported by: nx_compile_field_candidate_t280.nxnx_compile_wat.nxnx_compile_wat_call_operands_t143.nxnx_compile_wat_scalararm.nxnx_compile_x86.nxnx_dom_oracle_gate.nxnx_import_qualified_gate.nxnx_ir_substitute_pairs_candidate_t216.nxnx_ir_substitute_qualification_t206.nxnx_lsp.nxnx_nxc.nxnx_sbr_admission_candidate.nxnx_sbr_key_candidate.nxnx_sov_build_run.nxnx_sov_build_run_qualify_20260910.nxnx_vcc_color_wat.nxnx_vcc_probe_wat.nxnx_wgsl.nxnx_wgsl_authored_t55.nxnx_wgsl_before_front_t217.nxnx_wgsl_canonical_skin_t140.nxnx_wgsl_cast_control_t181.nxnx_wgsl_cast_lbs_t181.nxnx_wgsl_cast_material_t181.nxnx_wgsl_cloud_transport_t155.nxnx_wgsl_cumulus_release_t161.nxnx_wgsl_cumulus_t156.nxnx_wgsl_depth_candidate_t192.nxnx_wgsl_eye_t138.nxnx_wgsl_face_mask_t163.nxnx_wgsl_front_candidate_t217.nxnx_wgsl_inspection_t165.nxnx_wgsl_sand_baseline_t137.nxnx_wgsl_sand_private_t137.nxnx_wgsl_scene_light_candidate_t364.nxnx_wgsl_skin_t138.nxnx_wgsl_sky_light_t154.nxnx_wgsl_sky_private_20260910.nxnx_wgsl_sky_review_t154.nxnx_wgsl_static_t335.nxnx_wgsl_world_depth_t195.nx
structs
| 403 | struct ExpandCtx |
consts
| 46 | const MAX_IMPORTS: i64 = 256 |
| 47 | const IMPORT_PATH_LEN: i64 = 1024 |
| 50 | const ERR_IMPORTS_FULL: i64 = -1 |
| 51 | const ERR_READ_FAILED: i64 = -2 |
| 52 | const ERR_OUT_OVERFLOW: i64 = -3 |
| 53 | const ERR_BAD_IMPORT: i64 = -4 |
| 61 | const MAX_ALIASES: i64 = 256 |
| 64 | const AL_FIELDS: i64 = 6 |
| 65 | const AL_F_NAMEOFF: i64 = 0 // byte offset of the alias spelling in al_names |
| 66 | const AL_F_EXPADDR: i64 = 1 // *i64: absolute address of each export name |
| 67 | const AL_F_EXPLEN: i64 = 2 // *i64: length of each export name |
| 68 | const AL_F_EXPN: i64 = 3 // export count |
| 69 | const AL_F_RWBUF: i64 = 4 // *u8: this module's line-rewrite scratch |
| 70 | const AL_F_RWCAP: i64 = 5 // bytes in AL_F_RWBUF |
| 77 | const EXP_MIN_DECL_BYTES: i64 = 8 |
| 86 | const RW_GROWTH_SLACK: i64 = 3 |
| 93 | const EXPAND_CTX_BYTES: i64 = 4096 |
| 97 | const ERR_ALIAS_FULL: i64 = -5 |
| 98 | const ERR_ALIAS_CONFLICT: i64 = -6 |
| 99 | const ERR_ALIAS_UNKNOWN: i64 = -7 |
| 100 | const ERR_ALIAS_NOEXPORT: i64 = -8 |
| 101 | const ERR_ALIAS_BADNAME: i64 = -9 |
| 102 | const ERR_ALIAS_LINE_CAP: i64 = -10 |
functions
| 106 | func cstr_len(s: *u8) -> i64 |
| 112 | func cstr_eq(a: *u8, b: *u8) -> i64 |
| 123 | func u8_copy(dst: *u8, src: *u8, n: i64) -> i64 |
| 130 | func ptr_at(p: *u8, delta: i64) -> *u8 |
| 141 | func imp_ident_ch(b: i64) -> i64 |
| 151 | func imp_kw_at(src: *u8, p: i64, kw: *u8) -> i64 |
| 165 | func imp_is_main(src: *u8, s: i64, n: i64) -> i64 called by 1: imp_alias_scan_exports |
| 177 | func imp_err(s: *u8) -> i64 |
| 184 | func imp_err_span(p: *u8, n: i64) -> i64 |
| 193 | func imp_has_qual(src: *u8, s: i64, e: i64) -> i64 called by 1: expand_imports_inner |
| 211 | func imp_path_index(paths: *u8, n: i64, path: *u8) -> i64 |
| 221 | func import_already(paths: *u8, n: i64, path: *u8) -> i64 calls 1: imp_path_index |
| 226 | func import_add(paths: *u8, n: i64, path: *u8) -> i64 |
| 240 | func path_dir(path: *u8, out: *u8) -> i64 |
| 257 | func join_path(dir: *u8, name: *u8, out: *u8) -> i64 |
| 289 | func is_sep(b: i64) -> i64 called by 1: canonicalise_path |
| 299 | func canonicalise_path(path: *u8, out: *u8, scratch: *u8) -> i64 |
| 385 | func starts_with_import(src: *u8, p: i64) -> i64 |
| 430 | func expand_ctx_new(out: *u8, out_cap: i64) -> *ExpandCtx |
| 466 | func expand_ctx_enable_linemap(ctx: *ExpandCtx) -> *LineMap |
| 473 | func out_push(ctx: *ExpandCtx, b: i64) -> i64 called by 1: expand_imports_inner |
| 491 | func out_append_line(ctx: *ExpandCtx, src: *u8, n: i64) -> i64 |
| 501 | func out_append(ctx: *ExpandCtx, src: *u8, n: i64) -> i64 |
| 555 | func imp_alias_init(ctx: *ExpandCtx) -> i64 |
| 563 | func imp_alias_slot(ctx: *ExpandCtx, k: i64, f: i64) -> i64 |
| 567 | func imp_alias_set(ctx: *ExpandCtx, k: i64, f: i64, v: i64) -> i64 |
| 572 | func imp_alias_name(ctx: *ExpandCtx, k: i64) -> *u8 |
| 577 | func imp_alias_find(ctx: *ExpandCtx, src: *u8, s: i64, n: i64) -> i64 |
| 596 | func imp_alias_add(ctx: *ExpandCtx, src: *u8, s: i64, n: i64) -> i64 called by 2: expand_imports_innermain calls 5: imp_alias_initimp_alias_findptr_atu8_copyimp_alias_set |
| 621 | func imp_alias_scan_exports(ctx: *ExpandCtx, k: i64, src: *u8, n: i64) -> i64 called by 2: expand_imports_innermain calls 7: sys_mmapimp_kw_atimp_ident_chimp_is_maincstr_lenimp_alias_name+1 |
| 691 | func imp_alias_exports(ctx: *ExpandCtx, k: i64, src: *u8, s: i64, n: i64) -> i64 |
| 720 | func imp_qualified_name(ctx: *ExpandCtx, src: *u8, s: i64, e: i64, out: *u8, ocap: i64) -> i64 |
| 767 | func imp_rw_line(ctx: *ExpandCtx, src: *u8, s: i64, e: i64, alias_idx: i64, called by 1: expand_imports_inner calls 8: imp_kw_atimp_ident_chimp_qualified_nameptr_atimp_alias_exportsimp_alias_name+2 |
| 892 | func is_func_main_line(src: *u8, p: i64) -> i64 called by 1: expand_imports_inner |
| 919 | func skip_func_main(src: *u8, p: i64) -> i64 called by 1: expand_imports_inner |
| 967 | func expand_imports_inner(ctx: *ExpandCtx, path: *u8, is_root: i64, alias_idx: i64) -> i64; |
| 980 | func file_exists(path: *u8) -> i64 |
| 987 | func try_subroot(dir: *u8, subroot: *u8, ipath: *u8, |
| 1015 | func try_resolve_import(dir: *u8, ipath: *u8, out: *u8) -> i64 |
| 1094 | func expand_imports(ctx: *ExpandCtx, path: *u8) -> i64 |
| 1098 | func expand_imports_inner(ctx: *ExpandCtx, path: *u8, is_root: i64, alias_idx: i64) -> i64 called by 2: mainmain calls 24: sys_mmapcanonicalise_pathimp_path_indeximp_errimport_addsys_read_file+18 |