N_NIMCALL(Tident166021*, getcallee_218647)(Tnode190813* n) { Tident166021* result; result = 0; { NIM_BOOL LOC3; LOC3 = 0; LOC3 = ((*n).kind == ((NU8) 27) || (*n).kind == ((NU8) 29) || (*n).kind == ((NU8) 30) || (*n).kind == ((NU8) 31) || (*n).kind == ((NU8) 26) || (*n).kind == ((NU8) 28) || (*n).kind == ((NU8) 32)); if (!(LOC3)) goto LA4; LOC3 = ((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 2)); LA4: ; if (!LOC3) goto LA5; result = (*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S5.ident; } goto LA1; LA5: ; { if (!((*n).kind == ((NU8) 2))) goto LA8; result = (*n).kindU.S5.ident; } goto LA1; LA8: ; { NimStringDesc* LOC11; LOC11 = 0; LOC11 = rendertree_212058(n, 0); rawmessage_163970(((NU16) 163), LOC11); } LA1: ; return result; }
N_NIMCALL(void, patternerror_268051)(Tnode190813* n) { NimStringDesc* LOC1; nimfr("patternError", "parampatterns.nim") nimln(45, "parampatterns.nim"); LOC1 = 0; LOC1 = rendertree_212058(n, 4); localerror_164155((*n).info, ((NU16) 1), LOC1); popFrame(); }
N_NIMCALL(Tnode190813*, evaltemplate_383260)(Tnode190813* n, Tsym190843* tmpl, Tsym190843* gensymowner) { Tnode190813* result; NI TMP7634; Tnode190813* args; Templctx383019 ctx; Tnode190813* body; NI TMP7637; nimfr("evalTemplate", "evaltempl.nim") result = 0; nimln(78, "evaltempl.nim"); TMP7634 = addInt(evaltemplatecounter_383256, ((NI) 1)); evaltemplatecounter_383256 = (NI)(TMP7634); nimln(79, "evaltempl.nim"); { if (!(((NI) 100) < evaltemplatecounter_383256)) goto LA3; nimln(80, "evaltempl.nim"); globalerror_164134((*n).info, ((NU16) 183), ((NimStringDesc*) &TMP7631)); nimln(81, "evaltempl.nim"); result = n; } LA3: ; nimln(84, "evaltempl.nim"); args = evaltemplateargs_383184(n, tmpl); memset((void*)(&ctx), 0, sizeof(ctx)); nimln(86, "evaltempl.nim"); ctx.owner = tmpl; nimln(87, "evaltempl.nim"); ctx.gensymowner = gensymowner; nimln(88, "evaltempl.nim"); initidtable_194057((&ctx.mapping)); nimln(90, "evaltempl.nim"); body = getbody_235648(tmpl); nimln(91, "evaltempl.nim"); { NIM_BOOL LOC7; LOC7 = 0; LOC7 = isatom_195905(body); if (!LOC7) goto LA8; nimln(92, "evaltempl.nim"); result = newnodei_192351(((NU8) 37), (*body).info); nimln(93, "evaltempl.nim"); evaltemplateaux_383039(body, args, (&ctx), result); nimln(94, "evaltempl.nim"); { NI LOC12; LOC12 = 0; LOC12 = len_191097(result); if (!(LOC12 == ((NI) 1))) goto LA13; if (((TMP7624[(*result).kind/8] &(1<<((*result).kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP7625)); if ((NU)(((NI) 0)) >= (NU)((*result).kindU.S6.sons->Sup.len)) raiseIndexError(); result = (*result).kindU.S6.sons->data[((NI) 0)]; } goto LA10; LA13: ; { NimStringDesc* LOC16; nimln(96, "evaltempl.nim"); nimln(97, "evaltempl.nim"); LOC16 = 0; LOC16 = rendertree_212058(result, 4); localerror_164155((*result).info, ((NU16) 1), LOC16); } LA10: ; } goto LA5; LA8: ; { nimln(99, "evaltempl.nim"); result = copynode_194640(body); nimln(100, "evaltempl.nim"); ctx.instlines = !(((*body).kind == ((NU8) 115) || (*body).kind == ((NU8) 126) || (*body).kind == ((NU8) 112) || (*body).kind == ((NU8) 127))); nimln(102, "evaltempl.nim"); { if (!ctx.instlines) goto LA20; (*result).info = (*n).info; } LA20: ; { NI i_383308; NI HEX3Atmp_383322; NI LOC23; NI TMP7635; NI res_383325; i_383308 = 0; HEX3Atmp_383322 = 0; nimln(103, "evaltempl.nim"); LOC23 = 0; LOC23 = safelen_191125(body); TMP7635 = subInt(LOC23, ((NI) 1)); HEX3Atmp_383322 = (NI)(TMP7635); nimln(1598, "system.nim"); res_383325 = ((NI) 0); { nimln(1599, "system.nim"); while (1) { NI TMP7636; if (!(res_383325 <= HEX3Atmp_383322)) goto LA25; nimln(1600, "system.nim"); i_383308 = res_383325; nimln(104, "evaltempl.nim"); if (((TMP7624[(*body).kind/8] &(1<<((*body).kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP7625)); if ((NU)(i_383308) >= (NU)((*body).kindU.S6.sons->Sup.len)) raiseIndexError(); evaltemplateaux_383039((*body).kindU.S6.sons->data[i_383308], args, (&ctx), result); nimln(1614, "system.nim"); TMP7636 = addInt(res_383325, ((NI) 1)); res_383325 = (NI)(TMP7636); } LA25: ; } } } LA5: ; nimln(106, "evaltempl.nim"); TMP7637 = subInt(evaltemplatecounter_383256, ((NI) 1)); evaltemplatecounter_383256 = (NI)(TMP7637); popFrame(); return result; }
N_NIMCALL(NimStringDesc*, getmodulename_250018)(Tnode190813* n) { NimStringDesc* result; { result = 0; switch ((*n).kind) { case ((NU8) 20): case ((NU8) 21): case ((NU8) 22): { result = nosunixToNativePath((*n).kindU.S3.strval, ((NimStringDesc*) &TMP3459)); } break; case ((NU8) 2): { result = copyString((*(*n).kindU.S5.ident).s); } break; case ((NU8) 3): { result = copyString((*(*(*n).kindU.S4.sym).name).s); } break; case ((NU8) 29): case ((NU8) 30): { NimStringDesc* LOC12; { NIM_BOOL LOC7; Tident166021* LOC9; LOC7 = 0; LOC7 = ((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 2)); if (!(LOC7)) goto LA8; LOC9 = 0; LOC9 = getident_166463(((NimStringDesc*) &TMP3460)); LOC7 = ((*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S5.ident).Sup.id == (*LOC9).Sup.id); LA8: ; if (!LOC7) goto LA10; (*n).kind = ((NU8) 78); asgnRefNoCycle((void**) (&(*n).kindU.S6.sons->data[((NI) 0)]), (*n).kindU.S6.sons->data[((NI) 1)]); asgnRefNoCycle((void**) (&(*n).kindU.S6.sons->data[((NI) 1)]), (*n).kindU.S6.sons->data[((NI) 2)]); (*n).kindU.S6.sons = (Tnodeseq190807*) setLengthSeq(&((*n).kindU.S6.sons)->Sup, sizeof(Tnode190813*), ((NI) 2)); result = getmodulename_250018((*n).kindU.S6.sons->data[((NI) 0)]); goto BeforeRet; } LA10: ; LOC12 = 0; LOC12 = rendertree_212058(n, 4); result = nsuReplaceStr(LOC12, ((NimStringDesc*) &TMP3461), ((NimStringDesc*) &TMP3459)); } break; case ((NU8) 45): { NimStringDesc* LOC14; LOC14 = 0; LOC14 = rendertree_212058(n, 4); result = nsuReplaceStr(LOC14, ((NimStringDesc*) &TMP3462), ((NimStringDesc*) &TMP3463)); } break; case ((NU8) 78): { result = getmodulename_250018((*n).kindU.S6.sons->data[((NI) 0)]); } break; default: { NimStringDesc* LOC17; NimStringDesc* LOC18; LOC17 = 0; LOC17 = rendertree_212058(n, 0); LOC18 = 0; LOC18 = nsuFormatSingleElem(((NimStringDesc*) &TMP3464), LOC17); localerror_164171((*n).info, ((NU16) 4), LOC18); result = copyString(((NimStringDesc*) &TMP3459)); } break; } }BeforeRet: ; return result; }
N_NIMCALL(Tnode190813*, evaltemplate_382260)(Tnode190813* n, Tsym190843* tmpl, Tsym190843* gensymowner) { Tnode190813* result; Tnode190813* args; Templctx382019 ctx; Tnode190813* body; result = 0; evaltemplatecounter_382256 += ((NI) 1); { if (!(((NI) 100) < evaltemplatecounter_382256)) goto LA3; globalerror_164150((*n).info, ((NU16) 183), ((NimStringDesc*) &TMP2819)); result = n; } LA3: ; args = evaltemplateargs_382184(n, tmpl); memset((void*)(&ctx), 0, sizeof(ctx)); ctx.owner = tmpl; ctx.gensymowner = gensymowner; initidtable_194057((&ctx.mapping)); body = getbody_234647(tmpl); { NIM_BOOL LOC7; LOC7 = 0; LOC7 = isatom_195906(body); if (!LOC7) goto LA8; result = newnodei_192351(((NU8) 37), (*body).info); evaltemplateaux_382039(body, args, (&ctx), result); { NI LOC12; LOC12 = 0; LOC12 = len_191097(result); if (!(LOC12 == ((NI) 1))) goto LA13; result = (*result).kindU.S6.sons->data[((NI) 0)]; } goto LA10; LA13: ; { NimStringDesc* LOC16; LOC16 = 0; LOC16 = rendertree_212058(result, 4); localerror_164171((*result).info, ((NU16) 1), LOC16); } LA10: ; } goto LA5; LA8: ; { result = copynode_194644(body); ctx.instlines = !(((*body).kind == ((NU8) 115) || (*body).kind == ((NU8) 126) || (*body).kind == ((NU8) 112) || (*body).kind == ((NU8) 127))); { if (!ctx.instlines) goto LA20; (*result).info = (*n).info; } LA20: ; { NI i_382308; NI HEX3Atmp_382322; NI LOC23; NI res_382325; i_382308 = 0; HEX3Atmp_382322 = 0; LOC23 = 0; LOC23 = safelen_191125(body); HEX3Atmp_382322 = (NI)(LOC23 - ((NI) 1)); res_382325 = ((NI) 0); { while (1) { if (!(res_382325 <= HEX3Atmp_382322)) goto LA25; i_382308 = res_382325; evaltemplateaux_382039((*body).kindU.S6.sons->data[i_382308], args, (&ctx), result); res_382325 += ((NI) 1); } LA25: ; } } } LA5: ; evaltemplatecounter_382256 -= ((NI) 1); return result; }
N_NIMCALL(void, invalidpragma_216047)(Tnode190813* n) { NimStringDesc* LOC1; LOC1 = 0; LOC1 = rendertree_212058(n, 4); localerror_164171((*n).info, ((NU16) 163), LOC1); }