nx_parse.nx
buildroot/runtime/nx_parse.nx
about
dependencies 4 imports · 29 importers
diagram shows first 10 each side; +0 more imports, +19 more importers in the complete lists below.
imports: nx_types.nxnx_quant.nxnx_lex_kinds.nxnx_ir.nx
imported by: end2end_test.nxnx_compile_wat.nxnx_compile_x86.nxnx_dom_oracle_gate.nxnx_lang_struct.nxnx_main.nxnx_nxc.nxnx_quality_grade_daemon.nxnx_quality_grade_quad.nxnx_quality_grade_self.nxnx_quality_grade_septagon.nxnx_smoke_nxc_pipeline.nxnx_smoke_nxc_pipeline10.nxnx_smoke_nxc_pipeline11.nxnx_smoke_nxc_pipeline12.nxnx_smoke_nxc_pipeline13.nxnx_smoke_nxc_pipeline14.nxnx_smoke_nxc_pipeline15.nxnx_smoke_nxc_pipeline2.nxnx_smoke_nxc_pipeline3.nxnx_smoke_nxc_pipeline4.nxnx_smoke_nxc_pipeline5.nxnx_smoke_nxc_pipeline7.nxnx_smoke_nxc_pipeline8.nxnx_smoke_nxc_pipeline9.nxnx_smoke_nxc_tilde.nxnx_vcc_color_wat.nxnx_vcc_probe_wat.nxparse.nx
structs
| 365 | struct Local |
| 391 | struct Parser |
| 463 | struct EnumEntry |
| 474 | struct StaticEntry |
| 487 | struct StructEntry |
| 496 | struct MConst |
consts
| 116 | const NX_DIAG_MAX_ERRS: i64 = 20 |
| 378 | const LOCAL_BYTES: i64 = 96 |
| 389 | const NX_PARSE_LOCALS_CAP: i64 = 8192 |
| 472 | const ENUM_ENTRY_BYTES: i64 = 96 |
| 482 | const STATIC_ENTRY_BYTES: i64 = 88 |
| 494 | const STRUCT_ENTRY_BYTES: i64 = 80 |
| 512 | const MCONST_BYTES: i64 = 96 |
| 1238 | const NX_BOUNDS_CHECK_LIVE: i64 = 1 |
| 1241 | const NX_TRAP_BOUNDS: i64 = 71 |
| 1245 | const NX_RV64_SYS_WRITE: i64 = 64 |
| 1246 | const NX_RV64_SYS_EXIT_GROUP: i64 = 94 |
| 1357 | const NX_FNPTR_MAX_ARGS: i64 = 23 |
functions
| 60 | func tok_at(toks: *Tok, i: i64) -> *Tok |
| 70 | func tr(c: i64) -> i64 |
| 85 | func parse_die(msg: *u8, msg_len: i64) -> i64 |
| 119 | func nx_diag_note_error() -> i64 |
| 131 | func nx_diag_set_source(p: *u8, n: i64) -> i64 called by 1: main |
| 140 | func nx_diag_caret(line: i64, col: i64) -> i64 |
| 183 | func nx_diag_show_line(line: i64) -> i64 |
| 221 | func nx_dym_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: nx_dym_suggest_ident |
| 225 | func nx_dym_dist(a: *u8, la: i64, b: *u8, lb: i64, budget: i64) -> i64 |
| 269 | func nx_dym_suggest_fn(m: *Module, name: *u8, nlen: i64) -> i64 |
| 303 | func nx_put_dec_err(n: i64) -> i64 |
| 325 | func nx_put_tok_text_err(t: *Tok) -> i64 |
| 349 | func nx_diag_token_window(P: *Parser, tidx: i64) -> i64 |
| 516 | func peek_kind(P: *Parser) -> i64 called by 40: check_kindmatch_kindparse_typeparse_exprparse_field_chainparse_primary+34 calls 1: tok_at |
| 543 | func at_stmt_boundary(P: *Parser) -> i64 called by 10: parse_multiplicativeparse_additiveparse_shiftparse_comparisonparse_equalityparse_bitand+4 calls 1: tok_at |
| 601 | func peek_at(P: *Parser, k: i64) -> *Tok |
| 604 | func advance_tok(P: *Parser) -> *Tok called by 42: parse_typeparse_exprparse_field_chainparse_primaryparse_primary_identparse_primary_qualified_variant+36 calls 1: tok_at |
| 609 | func check_kind(P: *Parser, k: i64) -> i64 calls 1: peek_kind |
| 613 | func match_kind(P: *Parser, k: i64) -> i64 |
| 637 | func ty_name_eq(a: *u8, a_len: i64, b: *u8, b_len: i64) -> i64 |
| 656 | func clone_type_substituting(t: *Type, param_name: *u8, called by 2: clone_type_substitutinginstantiate_generic_n calls 3: ty_name_eqclone_type_substitutingalloc_type |
| 686 | func ty_mangle_suffix(arg: *Type, out: *u8, off: i64, cap: i64) -> i64 |
| 755 | func lookup_struct(P: *Parser, name: *u8) -> *Type; |
| 756 | func register_struct(P: *Parser, name: *u8, name_len: i64, called by 1: instantiate_generic_n |
| 768 | func instantiate_generic_n(P: *Parser, tmpl: *Type, |
| 827 | func parse_type(P: *Parser) -> *Type |
| 969 | func parser_loc_at(P: *Parser, i: i64) -> *Local |
| 975 | func copy_name_into_local(L: *Local, src: *u8) -> i64 called by 1: add_local |
| 989 | func local_name_eq(L: *Local, name: *u8) -> i64 |
| 1009 | func nx_dym_suggest_ident(P: *Parser, name: *u8, nlen: i64) -> i64 |
| 1066 | func find_local(P: *Parser, name: *u8) -> *Local |
| 1079 | func local_in_block(P: *Parser, name: *u8) -> i64 |
| 1089 | func add_local(P: *Parser, name: *u8, value_id: i64, is_alloca: i64, |
| 1132 | func parse_logical_or(P: *Parser) -> i64; called by 1: parse_expr |
| 1133 | func parse_unary_core(P: *Parser) -> i64; |
| 1134 | func parse_primary(P: *Parser) -> i64; called by 1: parse_unary_core |
| 1135 | func parse_primary_ident(P: *Parser, t: *Tok) -> i64; called by 1: parse_primary |
| 1136 | func parse_primary_qualified_variant(P: *Parser, name: *u8) -> i64; called by 1: parse_primary_ident |
| 1137 | func parse_primary_intrinsic(P: *Parser, name: *u8) -> i64; called by 1: parse_primary_ident |
| 1138 | func parse_primary_call(P: *Parser, name: *u8) -> i64; called by 1: parse_primary_ident |
| 1139 | func parse_primary_local_or_const(P: *Parser, name: *u8) -> i64; called by 1: parse_primary_ident |
| 1140 | func parse_stmt_list(P: *Parser) -> i64; |
| 1141 | func parse_stmt(P: *Parser) -> i64; |
| 1142 | func parse_stmt_return(P: *Parser) -> i64; called by 1: parse_stmt |
| 1143 | func parse_stmt_let(P: *Parser) -> i64; called by 1: parse_stmt |
| 1144 | func parse_stmt_var(P: *Parser) -> i64; called by 1: parse_stmt |
| 1145 | func parse_stmt_if(P: *Parser) -> i64; |
| 1146 | func parse_stmt_while(P: *Parser) -> i64; called by 1: parse_stmt |
| 1147 | func parse_stmt_for(P: *Parser) -> i64; called by 1: parse_stmt |
| 1148 | func parse_stmt_break(P: *Parser) -> i64; called by 1: parse_stmt |
| 1149 | func parse_stmt_continue(P: *Parser) -> i64; called by 1: parse_stmt |
| 1150 | func parse_stmt_match(P: *Parser) -> i64; called by 1: parse_stmt |
| 1151 | func parse_stmt_star(P: *Parser) -> i64; called by 1: parse_stmt |
| 1152 | func parse_stmt_ident(P: *Parser) -> i64; called by 1: parse_stmt |
| 1153 | func parse_stmt_ident_assign(P: *Parser) -> i64; called by 1: parse_stmt_ident |
| 1154 | func parse_stmt_ident_subscript(P: *Parser) -> i64; called by 1: parse_stmt_ident |
| 1155 | func parse_stmt_ident_dot(P: *Parser) -> i64; called by 1: parse_stmt_ident |
| 1156 | func parse_stmt_expr_fallback(P: *Parser) -> i64; |
| 1157 | func parse_module_const(P: *Parser) -> i64; called by 1: parse_module |
| 1158 | func lookup_mconst(P: *Parser, name: *u8, out: *i64) -> i64; |
| 1159 | func lookup_mconst_string(P: *Parser, name: *u8, called by 1: parse_primary_local_or_const |
| 1161 | func mconst_name_eq(mc: *MConst, name: *u8) -> i64; |
| 1162 | func mconst_at(P: *Parser, i: i64) -> *MConst; |
| 1165 | func const_eval_expr(P: *Parser, depth: i64) -> i64; |
| 1166 | func const_eval_bor(P: *Parser, depth: i64) -> i64; |
| 1167 | func const_eval_bxor(P: *Parser, depth: i64) -> i64; |
| 1168 | func const_eval_band(P: *Parser, depth: i64) -> i64; |
| 1169 | func const_eval_shift(P: *Parser, depth: i64) -> i64; |
| 1170 | func const_eval_addsub(P: *Parser, depth: i64) -> i64; |
| 1171 | func const_eval_muldiv(P: *Parser, depth: i64) -> i64; |
| 1172 | func const_eval_unary(P: *Parser, depth: i64) -> i64; |
| 1173 | func const_eval_primary(P: *Parser, depth: i64) -> i64; |
| 1174 | func mconst_at(P: *Parser, i: i64) -> *MConst; |
| 1175 | func copy_name_into_mconst(mc: *MConst, src: *u8) -> i64; |
| 1176 | func parse_struct_decl(P: *Parser) -> i64; called by 1: parse_module |
| 1177 | func parse_static_decl(P: *Parser) -> i64; called by 1: parse_module |
| 1178 | func parse_module_enum(P: *Parser) -> i64; called by 1: parse_module |
| 1179 | func inject_statics(P: *Parser) -> i64; called by 1: parse_function |
| 1180 | func enum_entry_at(P: *Parser, i: i64) -> *EnumEntry; |
| 1181 | func lookup_enum(P: *Parser, name: *u8) -> *EnumEntry; |
| 1183 | func struct_entry_at(P: *Parser, i: i64) -> *StructEntry; |
| 1185 | func parse_expr(P: *Parser) -> i64 |
| 1225 | func safe_const_i64(P: *Parser, val: i64, tag: *u8) -> i64 |
| 1261 | func emit_bounds_trap(P: *Parser) -> i64 |
| 1316 | func emit_bounds_check_v(P: *Parser, idx: i64, len_v: i64) -> i64 |
| 1336 | func emit_bounds_check(P: *Parser, idx: i64, nelem: i64) -> i64 |
| 1358 | func parse_field_chain(P: *Parser, base: i64, base_ty: *Type) -> i64 |
| 1560 | func parse_primary(P: *Parser) -> i64 |
| 1777 | func parse_primary_ident(P: *Parser, t: *Tok) -> i64 |
| 1795 | func parse_primary_qualified_variant(P: *Parser, name: *u8) -> i64 |
| 1847 | func parse_primary_intrinsic(P: *Parser, name: *u8) -> i64 |
| 2784 | func parse_primary_call(P: *Parser, name: *u8) -> i64 |
| 3018 | func mc_name_eq(a: *u8, b: *u8) -> i64 called by 1: mconst_declared_later |
| 3028 | func mconst_declared_later(P: *Parser, name: *u8) -> i64 |
| 3052 | func parse_primary_local_or_const(P: *Parser, name: *u8) -> i64 |
| 3299 | func parse_unary(P: *Parser) -> i64 |
| 3325 | func parse_unary_core(P: *Parser) -> i64 |
| 3482 | func fp_op_for_int(op: i64) -> i64 |
| 3490 | func has_fp_operand(P: *Parser, v: i64) -> i64 called by 1: emit_typed_binop |
| 3501 | func nx_value_type(P: *Parser, v: i64) -> *Type |
| 3515 | func nx_value_is_const(P: *Parser, v: i64) -> i64 called by 1: int_binop_result_type |
| 3524 | func int_binop_result_type(P: *Parser, left: i64, right: i64) -> *Type called by 1: emit_typed_binop calls 5: nx_value_typenx_value_is_constalloc_type_salloc_typeir_type_i64 |
| 3573 | func fp_result_type(P: *Parser, left: i64, right: i64) -> *Type |
| 3582 | func emit_typed_binop(P: *Parser, op: i64, left: i64, right: i64) -> i64 |
| 3595 | func parse_multiplicative(P: *Parser) -> i64 called by 1: parse_additive calls 6: nx_assert_ptrparse_unaryat_stmt_boundarypeek_kindadvance_tokemit_typed_binop |
| 3616 | func parse_additive(P: *Parser) -> i64 |
| 3636 | func parse_shift(P: *Parser) -> i64 called by 1: parse_comparison calls 9: parse_additiveat_stmt_boundarypeek_kindadvance_tokir_type_i64nx_value_type+3 |
| 3663 | func parse_comparison(P: *Parser) -> i64 called by 1: parse_equality calls 7: nx_assert_ptrparse_shiftat_stmt_boundarypeek_kindadvance_tokir_emit_binop+1 |
| 3681 | func parse_equality(P: *Parser) -> i64 called by 1: parse_bitand calls 6: parse_comparisonat_stmt_boundarypeek_kindadvance_tokir_emit_binopir_type_bool |
| 3698 | func parse_bitand(P: *Parser) -> i64 called by 1: parse_bitxor calls 6: parse_equalitypeek_kindat_stmt_boundaryadvance_tokir_emit_binopir_type_i64 |
| 3709 | func parse_bitxor(P: *Parser) -> i64 called by 1: parse_bitor calls 6: parse_bitandpeek_kindat_stmt_boundaryadvance_tokir_emit_binopir_type_i64 |
| 3720 | func parse_bitor(P: *Parser) -> i64 called by 1: parse_logical_and calls 6: parse_bitxorpeek_kindat_stmt_boundaryadvance_tokir_emit_binopir_type_i64 |
| 3731 | func parse_logical_and(P: *Parser) -> i64 called by 1: parse_logical_or calls 6: parse_bitorpeek_kindat_stmt_boundaryadvance_tokir_emit_binopir_type_bool |
| 3742 | func parse_logical_or(P: *Parser) -> i64 |
| 3770 | func parse_stmt(P: *Parser) -> i64 |
| 3808 | func nx_require_ident_name(P: *Parser, name_tok: *Tok) -> i64 called by 4: parse_stmt_letparse_stmt_varparse_stmt_forparse_function calls 2: nx_put_dec_errnx_put_tok_text_err |
| 3820 | func parse_stmt_return(P: *Parser) -> i64 |
| 3833 | func parse_stmt_let(P: *Parser) -> i64 |
| 3881 | func parse_stmt_var(P: *Parser) -> i64 |
| 3917 | func parse_stmt_if(P: *Parser) -> i64 |
| 3956 | func parse_stmt_while(P: *Parser) -> i64 |
| 3980 | func parse_stmt_for(P: *Parser) -> i64 |
| 4038 | func parse_stmt_break(P: *Parser) -> i64 |
| 4047 | func parse_stmt_continue(P: *Parser) -> i64 |
| 4056 | func parse_stmt_match(P: *Parser) -> i64 |
| 4266 | func parse_stmt_star(P: *Parser) -> i64 |
| 4303 | func parse_stmt_ident(P: *Parser) -> i64 |
| 4312 | func parse_stmt_ident_assign(P: *Parser) -> i64 |
| 4371 | func parse_stmt_ident_subscript(P: *Parser) -> i64 |
| 4537 | func parse_stmt_ident_dot(P: *Parser) -> i64 |
| 4699 | func parse_stmt_expr_fallback(P: *Parser) -> i64 |
| 4711 | func parse_stmt_list(P: *Parser) -> i64 |
| 4741 | func nx_dupdef_name_eq(t: *Tok, name: *u8, name_len: i64) -> i64 |
| 4775 | func nx_find_first_def_line(P: *Parser, name: *u8, name_len: i64) -> i64 |
| 4831 | func parse_function(P: *Parser) -> i64 called by 1: parse_module calls 23: match_kindadvance_toknx_require_ident_nametok_text_ptrpeek_kindparse_type+17 |
| 5096 | func resolve_primitive_type(name: *u8) -> *Type |
| 5126 | func prepass_register_aliases(P: *Parser) -> i64 called by 1: parse_module calls 8: peek_kindadvance_toktok_text_ptrstreq_nresolve_primitive_typelookup_struct+2 |
| 5185 | func prepass_register_structs(P: *Parser) -> i64 called by 1: parse_module calls 8: peek_kindadvance_toktok_text_ptrmatch_kindlookup_structparse_die+2 |
| 5279 | func prepass_count_params(P: *Parser) -> i64 |
| 5317 | func prepass_register_funcs(P: *Parser) -> i64 called by 1: parse_module calls 8: peek_kindadvance_toktok_text_ptrfind_functionir_type_i64ir_function_new+2 |
| 5424 | func parse_module(toks: *Tok, m: *Module) -> *Module |
| 5607 | func parse_module_enum(P: *Parser) -> i64 |