Exemplo n.º 1
0
N_NIMCALL(void, methoddef_355636)(Tsym191843* s, NIM_BOOL fromcache) {
	NI L;
	TY355243 LOC10;
	TY244447 LOC11;
{	L = (gmethods_355264 ? gmethods_355264->Sup.len : 0);
	{
		NI i_355661;
		NI HEX3Atmp_355831;
		NI res_355834;
		i_355661 = 0;
		HEX3Atmp_355831 = 0;
		HEX3Atmp_355831 = (NI)(L - ((NI) 1));
		res_355834 = ((NI) 0);
		{
			while (1) {
				Tsym191843* disp;
				if (!(res_355834 <= HEX3Atmp_355831)) goto LA3;
				i_355661 = res_355834;
				disp = gmethods_355264->data[i_355661].Field1;
				{
					NIM_BOOL LOC6;
					Tnode191813* LOC9;
					LOC6 = 0;
					LOC6 = samemethodbucket_355269(disp, s);
					if (!LOC6) goto LA7;
					gmethods_355264->data[i_355661].Field0 = (Tsymseq191815*) incrSeq(&(gmethods_355264->data[i_355661].Field0)->Sup, sizeof(Tsym191843*));
					asgnRefNoCycle((void**) (&gmethods_355264->data[i_355661].Field0->data[gmethods_355264->data[i_355661].Field0->Sup.len-1]), s);
					LOC9 = 0;
					LOC9 = lastson_194431((*disp).ast);
					attachdispatcher_355368(s, LOC9);
					fixupdispatcher_355484(s, disp);
					checkmethodeffects_329189(disp, s);
					goto BeforeRet;
				}
				LA7: ;
				res_355834 += ((NI) 1);
			} LA3: ;
		}
	}
	memset((void*)(&LOC10), 0, sizeof(LOC10));
	LOC10.Field0 = (Tsymseq191815*) newSeq((&NTI191815), 1);
	memset((void*)LOC11, 0, sizeof(LOC11));
	LOC11[0] = s;
	asgnRefNoCycle((void**) (&LOC10.Field0->data[0]), LOC11[0]);
	LOC10.Field1 = createdispatcher_355409(s);
	gmethods_355264 = (TY355242*) incrSeq(&(gmethods_355264)->Sup, sizeof(TY355243));
	genericSeqAssign((&gmethods_355264->data[gmethods_355264->Sup.len-1].Field0), LOC10.Field0, (&NTI191815));
	asgnRefNoCycle((void**) (&gmethods_355264->data[gmethods_355264->Sup.len-1].Field1), LOC10.Field1);
	{
		if (!fromcache) goto LA14;
		internalerror_165215((*s).info, ((NimStringDesc*) &TMP3276));
	}
	LA14: ;
	}BeforeRet: ;
}
Exemplo n.º 2
0
N_NIMCALL(TY68202*, Startprocessaux_68603)(NimStringDesc* Cmd_68605, NU8 Options_68607) {
TY68202* Result_68608;
TY39221* C_68609;
TY39221* A_68627;
NI I_68661;
NI HEX3Atmp_68680;
NI Res_68682;
Result_68608 = 0;
C_68609 = 0;
C_68609 = nosparseCmdLine(Cmd_68605);
A_68627 = 0;
A_68627 = (TY39221*) newSeq(NTI39221, 0);
I_68661 = 0;
HEX3Atmp_68680 = 0;
HEX3Atmp_68680 = (NI32)(C_68609->Sup.len - 1);
Res_68682 = 0;
Res_68682 = 1;
while (1) {
if (!(Res_68682 <= HEX3Atmp_68680)) goto LA1;
I_68661 = Res_68682;
A_68627 = (TY39221*) incrSeq(&(A_68627)->Sup, sizeof(NimStringDesc*));
asgnRefNoCycle((void**) &A_68627->data[A_68627->Sup.len-1], copyString(C_68609->data[I_68661]));
Res_68682 += 1;
} LA1: ;
Result_68608 = nospstartProcess(C_68609->data[0], ((NimStringDesc*) &TMP196865), A_68627->data, A_68627->Sup.len, NIM_NIL, Options_68607);
return Result_68608;
}
Exemplo n.º 3
0
N_NIMCALL(void, writerope_162070)(FILE* f, Ropeobj161009* r) {
	{
		NimStringDesc* s_162074;
		s_162074 = 0;
		{
			TY163351* stack_162081;
			TY161585 LOC6;
			if (!!((r == NIM_NIL))) goto LA4;
			stack_162081 = (TY163351*) newSeq((&NTI163351), 1);
			memset((void*)LOC6, 0, sizeof(LOC6));
			LOC6[0] = r;
			asgnRefNoCycle((void**) (&stack_162081->data[0]), LOC6[0]);
			{
				while (1) {
					Ropeobj161009* it_162083;
					if (!(((NI) 0) < (stack_162081 ? stack_162081->Sup.len : 0))) goto LA8;
					it_162083 = pop_161597((&stack_162081));
					{
						while (1) {
							if (!(*it_162083).data == 0) goto LA10;
							stack_162081 = (TY163351*) incrSeq(&(stack_162081)->Sup, sizeof(Ropeobj161009*));
							asgnRefNoCycle((void**) (&stack_162081->data[stack_162081->Sup.len-1]), (*it_162083).right);
							it_162083 = (*it_162083).left;
						} LA10: ;
					}
					s_162074 = (*it_162083).data;
					write_13457(f, s_162074);
				} LA8: ;
			}
		}
		LA4: ;
	}
}
Exemplo n.º 4
0
N_NIMCALL(void, getenvvarsc_121202)(void) {
	{
		NI i;
		if (!!(envcomputed_121007)) goto LA3;
		if (environment_121009) nimGCunrefNoCycle(environment_121009);
		environment_121009 = (TY121008*) newSeqRC1((&NTI121008), 0);
		i = ((NI) 0);
		{
			while (1) {
				NimStringDesc* LOC11;
				NimStringDesc* LOC12;
				{
					if (!(environ[(i)- 0] == NIM_NIL)) goto LA9;
					goto LA5;
				}
				LA9: ;
				LOC11 = 0;
				LOC11 = cstrToNimstr(environ[(i)- 0]);
				environment_121009 = (TY121008*) incrSeq(&(environment_121009)->Sup, sizeof(NimStringDesc*));
				LOC12 = 0;
				LOC12 = environment_121009->data[environment_121009->Sup.len-1]; environment_121009->data[environment_121009->Sup.len-1] = copyStringRC1(LOC11);
				if (LOC12) nimGCunrefNoCycle(LOC12);
				i += ((NI) 1);
			}
		} LA5: ;
		envcomputed_121007 = NIM_TRUE;
	}
	LA3: ;
}
Exemplo n.º 5
0
N_NIMCALL(void, add_295163)(trstnode295009* father, trstnode295009* son) {
	nimfr("add", "rstast.nim")
	nimln(90, "rstast.nim");
	(*father).Sons = (TY295084*) incrSeq(&((*father).Sons)->Sup, sizeof(trstnode295009*));
	asgnRefNoCycle((void**) &(*father).Sons->data[(*father).Sons->Sup.len-1], son);
	popFrame();
}
Exemplo n.º 6
0
N_NIMCALL(void, add_299165)(Trstnode299011* father, Trstnode299011* son) {
	nimfr("add", "rstast.nim")
	nimln(90, "rstast.nim");
	(*father).sons = (Trstnodeseq299009*) incrSeq(&((*father).sons)->Sup, sizeof(Trstnode299011*));
	asgnRefNoCycle((void**) (&(*father).sons->data[(*father).sons->Sup.len-1]), son);
	popFrame();
}
Exemplo n.º 7
0
N_NIMCALL(void, writerope_144993)(FILE* f, trope144007* c) {
    tropeseq144009* stack;
    TY144497 LOC1;
    nimfr("writeRope", "ropes.nim")
    nimln(220, "ropes.nim");
    nimln(220, "ropes.nim");
    stack = (tropeseq144009*) newSeq((&NTI144009), 1);
    memset((void*)LOC1, 0, sizeof(LOC1));
    LOC1[0] = c;
    asgnRefNoCycle((void**) &stack->data[0], LOC1[0]);
    nimln(221, "ropes.nim");
    while (1) {
        trope144007* it;
        nimln(221, "ropes.nim");
        nimln(221, "ropes.nim");
        if (!(0 < stack->Sup.len)) goto LA2;
        nimln(222, "ropes.nim");
        it = pop_144515(&stack);
        nimln(223, "ropes.nim");
        while (1) {
            nimln(223, "ropes.nim");
            if (!((*it).Data == NIM_NIL)) goto LA3;
            nimln(224, "ropes.nim");
            stack = (tropeseq144009*) incrSeq(&(stack)->Sup, sizeof(trope144007*));
            asgnRefNoCycle((void**) &stack->data[stack->Sup.len-1], (*it).Right);
            nimln(225, "ropes.nim");
            it = (*it).Left;
            nimln(226, "ropes.nim");
            {
                nimln(226, "ropes.nim");
                nimln(226, "ropes.nim");
                nimln(226, "ropes.nim");
                if (!!(!((it == NIM_NIL)))) goto LA6;
                nimln(226, "ropes.nim");
                failedassertimpl_79821(((NimStringDesc*) &TMP552));
            }
LA6:
            ;
        }
LA3:
        ;
        nimln(227, "ropes.nim");
        {
            nimln(227, "ropes.nim");
            nimln(227, "ropes.nim");
            nimln(227, "ropes.nim");
            if (!!(!(((*it).Data == NIM_NIL)))) goto LA10;
            nimln(227, "ropes.nim");
            failedassertimpl_79821(((NimStringDesc*) &TMP548));
        }
LA10:
        ;
        nimln(228, "ropes.nim");
        write_10463(f, (*it).Data);
    }
LA2:
    ;
    popFrame();
}
Exemplo n.º 8
0
static N_INLINE(void, add_330608)(Xmlnodeobj330019* father, Xmlnodeobj330019* son) {
	nimfr("add", "xmltree.nim")
	nimln(103, "xmltree.nim");
	if (!(((2 &(1<<(((*father).k)&7)))!=0))) raiseFieldError(((NimStringDesc*) &TMP6463));
	(*father).kU.S2.s = (TY330028*) incrSeq(&((*father).kU.S2.s)->Sup, sizeof(Xmlnodeobj330019*));
	asgnRefNoCycle((void**) (&(*father).kU.S2.s->data[(*father).kU.S2.s->Sup.len-1]), son);
	popFrame();
}
Exemplo n.º 9
0
static N_INLINE(void, add_331626)(txmlnode331009* father, txmlnode331009* son) {
	nimfr("add", "xmltree.nim")
	nimln(100, "xmltree.nim");
	if (!(((2 &(1<<(((*father).K)&7)))!=0))) raiseFieldError(((NimStringDesc*) &TMP4648));
	(*father).kU.S2.S = (TY331018*) incrSeq(&((*father).kU.S2.S)->Sup, sizeof(txmlnode331009*));
	asgnRefNoCycle((void**) &(*father).kU.S2.S->data[(*father).kU.S2.S->Sup.len-1], son);
	popFrame();
}
Exemplo n.º 10
0
N_NIMCALL(void, advance_136086)(tape136008* self) {
	(*self).Pos += 1;
	{
		if (!((*self).Tape->Sup.len <= (*self).Pos)) goto LA3;
		(*self).Tape = (TY136010*) incrSeq(&((*self).Tape)->Sup, sizeof(NI));
		(*self).Tape->data[(*self).Tape->Sup.len-1] = 0;
	}
	LA3: ;
}
Exemplo n.º 11
0
N_NIMCALL(void, newrecropetostr_148474)(NimStringDesc** result, NI* resultlen, trope148007* r) {
	tropeseq148009* stack;
	TY148497 LOC1;
	nimfr("newRecRopeToStr", "ropes.nim")
	nimln(173, "ropes.nim");
	nimln(173, "ropes.nim");
	stack = (tropeseq148009*) newSeq((&NTI148009), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = r;
	asgnRefNoCycle((void**) &stack->data[0], LOC1[0]);
	nimln(174, "ropes.nim");
	while (1) {
		trope148007* it;
		nimln(174, "ropes.nim");
		nimln(174, "ropes.nim");
		if (!(0 < stack->Sup.len)) goto LA2;
		nimln(175, "ropes.nim");
		it = pop_148515(&stack);
		nimln(176, "ropes.nim");
		while (1) {
			nimln(176, "ropes.nim");
			if (!((*it).Data == NIM_NIL)) goto LA3;
			nimln(177, "ropes.nim");
			stack = (tropeseq148009*) incrSeq(&(stack)->Sup, sizeof(trope148007*));
			asgnRefNoCycle((void**) &stack->data[stack->Sup.len-1], (*it).Right);
			nimln(178, "ropes.nim");
			it = (*it).Left;
		} LA3: ;
		nimln(179, "ropes.nim");
		{
			nimln(179, "ropes.nim");
			nimln(179, "ropes.nim");
			nimln(179, "ropes.nim");
			if (!!(!(((*it).Data == NIM_NIL)))) goto LA6;
			nimln(179, "ropes.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP552));
		}
		LA6: ;
		nimln(180, "ropes.nim");
		if ((NU)((*resultlen)) > (NU)((*result)->Sup.len)) raiseIndexError();
		if ((NU)(0) > (NU)((*it).Data->Sup.len)) raiseIndexError();
		memcpy(((void*) (&(*result)->data[(*resultlen)])), ((void*) (&(*it).Data->data[0])), (*it).Length);
		nimln(181, "ropes.nim");
		(*resultlen) = addInt((*resultlen), (*it).Length);
		nimln(182, "ropes.nim");
		{
			nimln(182, "ropes.nim");
			nimln(182, "ropes.nim");
			nimln(182, "ropes.nim");
			if (!!(((*resultlen) <= (*result)->Sup.len))) goto LA10;
			nimln(182, "ropes.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP553));
		}
		LA10: ;
	} LA2: ;
	popFrame();
}
Exemplo n.º 12
0
N_NIMCALL(void, createbomb_154524)(NI32 x, NI32 y) {
    BombHEX3Aobjecttype151022* LOC1;
    nimfr("createBomb", "game.nim")
    nimln(51, "game.nim");
    LOC1 = 0;
    LOC1 = newbomb_151027(x, y);
    bombs_154006 = (TY154005*) incrSeq(&(bombs_154006)->Sup, sizeof(BombHEX3Aobjecttype151022*));
    asgnRef((void**) (&bombs_154006->data[bombs_154006->Sup.len-1]), LOC1);
    popFrame();
}
Exemplo n.º 13
0
N_NIMCALL(void, newprogram_136200)(NimStringDesc* code, program136171* Result) {
	NI pc;
	TY136010* leftstack;
	inittable_136205(64, (&(*Result).Bracketmap));
	unsureAsgnRef((void**) (&(*Result).Code), copyString(((NimStringDesc*) &TMP38)));
	pc = 0;
	leftstack = newseq_136438(0);
	{
		NIM_CHAR c_136473;
		NI i_136819;
		NI l_136821;
		c_136473 = 0;
		i_136819 = 0;
		l_136821 = code->Sup.len;
		{
			while (1) {
				if (!(i_136819 < l_136821)) goto LA3;
				c_136473 = code->data[i_136819];
				{
					{
						NIM_BOOL LOC7;
						LOC7 = 0;
						LOC7 = contains_95245(((NimStringDesc*) &TMP39), c_136473);
						if (!!(LOC7)) goto LA8;
						goto LA4;
					}
					LA8: ;
					{
						if (!((NU8)(c_136473) == (NU8)(91))) goto LA12;
						leftstack = (TY136010*) incrSeq(&(leftstack)->Sup, sizeof(NI));
						leftstack->data[leftstack->Sup.len-1] = pc;
					}
					LA12: ;
					{
						NIM_BOOL LOC16;
						NI left;
						LOC16 = 0;
						LOC16 = ((NU8)(c_136473) == (NU8)(93));
						if (!(LOC16)) goto LA17;
						LOC16 = (0 < leftstack->Sup.len);
						LA17: ;
						if (!LOC16) goto LA18;
						left = pop_136507((&leftstack));
						add_136555((&(*Result).Bracketmap), pc, left);
						add_136555((&(*Result).Bracketmap), left, pc);
					}
					LA18: ;
					(*Result).Code = addChar((*Result).Code, c_136473);
					pc += 1;
				} LA4: ;
				i_136819 += 1;
			} LA3: ;
		}
	}
}
Exemplo n.º 14
0
N_NIMCALL(void, addsonskipintlit_238731)(Ttype191849* father, Ttype191849* son) {
	Ttype191849* s;
	{
		if (!(*father).sons == 0) goto LA3;
		if ((*father).sons) nimGCunrefNoCycle((*father).sons);
		(*father).sons = (Ttypeseq191845*) newSeqRC1((&NTI191845), 0);
	}
	LA3: ;
	s = skipintlit_238698(son);
	(*father).sons = (Ttypeseq191845*) incrSeq(&((*father).sons)->Sup, sizeof(Ttype191849*));
	asgnRefNoCycle((void**) (&(*father).sons->data[(*father).sons->Sup.len-1]), s);
	propagatetoowner_195274(father, s);
}
Exemplo n.º 15
0
N_NIMCALL(void, registercallback_242412)(Tctx242048* c, NimStringDesc* name, Vmcallback242044 callback) {
	TY242273 LOC1;
	NimStringDesc* LOC2;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	LOC1.Field0 = copyString(name);
	LOC1.Field1.ClEnv = callback.ClEnv;
	LOC1.Field1.ClPrc = callback.ClPrc;
	(*c).callbacks = (TY242272*) incrSeq(&((*c).callbacks)->Sup, sizeof(TY242273));
	LOC2 = 0;
	LOC2 = (*c).callbacks->data[(*c).callbacks->Sup.len-1].Field0; (*c).callbacks->data[(*c).callbacks->Sup.len-1].Field0 = copyStringRC1(LOC1.Field0);
	if (LOC2) nimGCunrefNoCycle(LOC2);
	asgnRef((void**) (&(*c).callbacks->data[(*c).callbacks->Sup.len-1].Field1.ClEnv), LOC1.Field1.ClEnv);
	(*c).callbacks->data[(*c).callbacks->Sup.len-1].Field1.ClPrc = LOC1.Field1.ClPrc;
}
Exemplo n.º 16
0
N_NIMCALL(void, putenv_121669)(NimStringDesc* key, NimStringDesc* val) {
	NI indx;
	indx = findenvvar_121605(key);
	{
		NimStringDesc* LOC5;
		if (!(((NI) 0) <= indx)) goto LA3;
		LOC5 = 0;
		LOC5 = rawNewString(key->Sup.len + val->Sup.len + 1);
appendString(LOC5, key);
appendChar(LOC5, 61);
appendString(LOC5, val);
		asgnRefNoCycle((void**) (&environment_121009->data[indx]), LOC5);
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC7;
		NimStringDesc* LOC8;
		LOC7 = 0;
		LOC7 = rawNewString(key->Sup.len + val->Sup.len + 1);
appendString(LOC7, key);
appendChar(LOC7, 61);
appendString(LOC7, val);
		environment_121009 = (TY121008*) incrSeq(&(environment_121009)->Sup, sizeof(NimStringDesc*));
		LOC8 = 0;
		LOC8 = environment_121009->data[environment_121009->Sup.len-1]; environment_121009->data[environment_121009->Sup.len-1] = copyStringRC1(LOC7);
		if (LOC8) nimGCunrefNoCycle(LOC8);
		indx = (environment_121009 ? (environment_121009->Sup.len-1) : -1);
	}
	LA1: ;
	{
		int LOC11;
		NI32 LOC14;
		LOC11 = 0;
		LOC11 = putenv(environment_121009->data[indx]->data);
		if (!!((LOC11 == ((NI32) 0)))) goto LA12;
		LOC14 = 0;
		LOC14 = oslasterror_115833();
		raiseoserror_115809(LOC14);
	}
	LA12: ;
}
Exemplo n.º 17
0
N_NIMCALL(NimStringDesc*, HEX24_162131)(Ropeobj161009* r) {
	NimStringDesc* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_161034(r);
	result = mnewString(((NI) (LOC1)));
	result = setLengthStr(result, ((NI) 0));
	{
		NimStringDesc* s_162135;
		s_162135 = 0;
		{
			TY163351* stack_162140;
			TY161585 LOC7;
			if (!!((r == NIM_NIL))) goto LA5;
			stack_162140 = (TY163351*) newSeq((&NTI163351), 1);
			memset((void*)LOC7, 0, sizeof(LOC7));
			LOC7[0] = r;
			asgnRefNoCycle((void**) (&stack_162140->data[0]), LOC7[0]);
			{
				while (1) {
					Ropeobj161009* it_162142;
					if (!(((NI) 0) < (stack_162140 ? stack_162140->Sup.len : 0))) goto LA9;
					it_162142 = pop_161597((&stack_162140));
					{
						while (1) {
							if (!(*it_162142).data == 0) goto LA11;
							stack_162140 = (TY163351*) incrSeq(&(stack_162140)->Sup, sizeof(Ropeobj161009*));
							asgnRefNoCycle((void**) (&stack_162140->data[stack_162140->Sup.len-1]), (*it_162142).right);
							it_162142 = (*it_162142).left;
						} LA11: ;
					}
					s_162135 = (*it_162142).data;
					result = resizeString(result, s_162135->Sup.len + 0);
appendString(result, s_162135);
				} LA9: ;
			}
		}
		LA5: ;
	}
	return result;
}
Exemplo n.º 18
0
N_NIMCALL(void, addsonskipintlit_242461)(ttype187847* father, ttype187847* son) {
	ttype187847* s;
	nimfr("addSonSkipIntLit", "magicsys.nim")
	nimln(130, "magicsys.nim");
	{
		nimln(130, "magicsys.nim");
		if (!(*father).Sons == 0) goto LA3;
		nimln(130, "magicsys.nim");
		if ((*father).Sons) nimGCunrefNoCycle((*father).Sons);
		(*father).Sons = (ttypeseq187845*) newSeqRC1((&NTI187845), 0);
	}
	LA3: ;
	nimln(131, "magicsys.nim");
	s = skipintlit_242424(son);
	nimln(132, "magicsys.nim");
	(*father).Sons = (ttypeseq187845*) incrSeq(&((*father).Sons)->Sup, sizeof(ttype187847*));
	asgnRefNoCycle((void**) &(*father).Sons->data[(*father).Sons->Sup.len-1], s);
	nimln(133, "magicsys.nim");
	propagatetoowner_191852(father, s);
	popFrame();
}
Exemplo n.º 19
0
N_NIMCALL(void, Compilecfile_70733)(TY43019* List_70735, TY52008** Script_70737, TY39221** Cmds_70739, NIM_BOOL Isexternal_70740) {
TY43015* It_70741;
NimStringDesc* Compilecmd_70765;
It_70741 = 0;
It_70741 = ((TY43015*) ((*List_70735).Head));
while (1) {
if (!!((It_70741 == NIM_NIL))) goto LA1;
Filecounter_70611 += 1;
Compilecmd_70765 = 0;
Compilecmd_70765 = Getcompilecfilecmd_70612((*It_70741).Data, Isexternal_70740);
if (!!(((Gglobaloptions_46079 &(1<<((((NU8) 6))&31)))!=0))) goto LA3;
(*Cmds_70739) = (TY39221*) incrSeq(&((*Cmds_70739))->Sup, sizeof(NimStringDesc*));
asgnRefNoCycle((void**) &(*Cmds_70739)->data[(*Cmds_70739)->Sup.len-1], copyString(Compilecmd_70765));
LA3: ;
if (!((Gglobaloptions_46079 &(1<<((((NU8) 12))&31)))!=0)) goto LA6;
App_52036(Script_70737, Compilecmd_70765);
App_52036(Script_70737, Tnl_51581);
LA6: ;
It_70741 = ((TY43015*) ((*It_70741).Sup.Next));
} LA1: ;
}
Exemplo n.º 20
0
N_NIMCALL(void, Newwriteroperec_47621)(FILE** F_47624, TY47008* C_47625) {
TY47406* Stack_47640;
TY47407 LOC1;
TY47008* It_47667;
Stack_47640 = 0;
Stack_47640 = (TY47406*) newSeq(NTI47406, 1);
memset((void*)&LOC1, 0, sizeof(LOC1));
LOC1[0] = C_47625;
asgnRefNoCycle((void**) &Stack_47640->data[0], LOC1[0]);
while (1) {
if (!(0 < Stack_47640->Sup.len)) goto LA2;
It_47667 = 0;
It_47667 = Pop_47429(&Stack_47640);
while (1) {
if (!((*It_47667).Data == NIM_NIL)) goto LA3;
Stack_47640 = (TY47406*) incrSeq(&(Stack_47640)->Sup, sizeof(TY47008*));
asgnRefNoCycle((void**) &Stack_47640->data[Stack_47640->Sup.len-1], (*It_47667).Right);
It_47667 = (*It_47667).Left;
} LA3: ;
Write_3866((*F_47624), (*It_47667).Data);
} LA2: ;
}
Exemplo n.º 21
0
N_NIMCALL(void, Newrecropetostr_47388)(NimStringDesc** Result_47391, NI* Resultlen_47393, TY47008* R_47394) {
TY47406* Stack_47409;
TY47407 LOC1;
TY47008* It_47460;
Stack_47409 = 0;
Stack_47409 = (TY47406*) newSeq(NTI47406, 1);
memset((void*)&LOC1, 0, sizeof(LOC1));
LOC1[0] = R_47394;
asgnRefNoCycle((void**) &Stack_47409->data[0], LOC1[0]);
while (1) {
if (!(0 < Stack_47409->Sup.len)) goto LA2;
It_47460 = 0;
It_47460 = Pop_47429(&Stack_47409);
while (1) {
if (!((*It_47460).Data == NIM_NIL)) goto LA3;
Stack_47409 = (TY47406*) incrSeq(&(Stack_47409)->Sup, sizeof(TY47008*));
asgnRefNoCycle((void**) &Stack_47409->data[Stack_47409->Sup.len-1], (*It_47460).Right);
It_47460 = (*It_47460).Left;
} LA3: ;
memcpy(((void*) (&(*Result_47391)->data[(*Resultlen_47393)])), ((void*) (&(*It_47460).Data->data[0])), (*It_47460).Length);
(*Resultlen_47393) += (*It_47460).Length;
} LA2: ;
}
Exemplo n.º 22
0
N_NIMCALL(NI32, Newcrcfromropeaux_47912)(TY47008* R_47914, NI32 Startval_47915) {
NI32 Result_47916;
TY47406* Stack_47931;
TY47407 LOC1;
TY47008* It_47958;
NI I_47977;
NI L_47980;
Result_47916 = 0;
Stack_47931 = 0;
Stack_47931 = (TY47406*) newSeq(NTI47406, 1);
memset((void*)&LOC1, 0, sizeof(LOC1));
LOC1[0] = R_47914;
asgnRefNoCycle((void**) &Stack_47931->data[0], LOC1[0]);
Result_47916 = Startval_47915;
while (1) {
if (!(0 < Stack_47931->Sup.len)) goto LA2;
It_47958 = 0;
It_47958 = Pop_47429(&Stack_47931);
while (1) {
if (!((*It_47958).Data == NIM_NIL)) goto LA3;
Stack_47931 = (TY47406*) incrSeq(&(Stack_47931)->Sup, sizeof(TY47008*));
asgnRefNoCycle((void**) &Stack_47931->data[Stack_47931->Sup.len-1], (*It_47958).Right);
It_47958 = (*It_47958).Left;
} LA3: ;
I_47977 = 0;
I_47977 = 0;
L_47980 = 0;
L_47980 = (*It_47958).Data->Sup.len;
while (1) {
if (!(I_47977 < L_47980)) goto LA4;
Result_47916 = Updatecrc32_45018((*It_47958).Data->data[I_47977], Result_47916);
I_47977 += 1;
} LA4: ;
} LA2: ;
return Result_47916;
}
Exemplo n.º 23
0
N_NIMCALL(void, renderparamtypes_339275)(TY121008** found, Tnode191813* n) {
{	switch ((*n).kind) {
	case ((NU8) 76):
	{
		{
			NI i_339299;
			NI HEX3Atmp_339619;
			NI LOC3;
			NI res_339622;
			i_339299 = 0;
			HEX3Atmp_339619 = 0;
			LOC3 = 0;
			LOC3 = len_192097(n);
			HEX3Atmp_339619 = (LOC3 - 1);
			res_339622 = ((NI) 1);
			{
				while (1) {
					Tnode191813* LOC6;
					if (!(res_339622 <= HEX3Atmp_339619)) goto LA5;
					i_339299 = res_339622;
					LOC6 = 0;
					LOC6 = HEX5BHEX5D_192246(n, i_339299);
					renderparamtypes_339275(found, LOC6);
					res_339622 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC8;
		NimStringDesc* typestr;
		Tnode191813* LOC9;
		LOC8 = 0;
		LOC8 = len_192097(n);
		typepos = (NI)(LOC8 - ((NI) 2));
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_192246(n, typepos);
		typestr = rendertype_337224(LOC9);
		{
			NIM_BOOL LOC12;
			Tnode191813* LOC14;
			Ttype191849* typ;
			Tnode191813* LOC17;
			LOC12 = 0;
			LOC12 = ((typestr ? typestr->Sup.len : 0) < ((NI) 1));
			if (!(LOC12)) goto LA13;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_192246(n, (NI)(typepos + ((NI) 1)));
			LOC12 = !(((*LOC14).kind == ((NU8) 1)));
			LA13: ;
			if (!LOC12) goto LA15;
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_192246(n, (NI)(typepos + ((NI) 1)));
			typ = (*LOC17).typ;
			{
				if (!!(typ == 0)) goto LA20;
				typestr = typetostring_221032(typ, ((NU8) 2));
			}
			LA20: ;
			{
				if (!((typestr ? typestr->Sup.len : 0) < ((NI) 1))) goto LA24;
				goto BeforeRet;
			}
			LA24: ;
		}
		LA15: ;
		{
			NI i_339438;
			NI HEX3Atmp_339627;
			NI res_339630;
			i_339438 = 0;
			HEX3Atmp_339627 = 0;
			HEX3Atmp_339627 = (typepos - 1);
			res_339630 = ((NI) 0);
			{
				while (1) {
					NimStringDesc* LOC29;
					if (!(res_339630 <= HEX3Atmp_339627)) goto LA28;
					i_339438 = res_339630;
					(*found) = (TY121008*) incrSeq(&((*found))->Sup, sizeof(NimStringDesc*));
					LOC29 = 0;
					LOC29 = (*found)->data[(*found)->Sup.len-1]; (*found)->data[(*found)->Sup.len-1] = copyStringRC1(typestr);
					if (LOC29) nimGCunrefNoCycle(LOC29);
					res_339630 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* LOC31;
		LOC31 = 0;
		LOC31 = rawNewString(reprEnum((*n).kind, (&NTI191029))->Sup.len + 31);
appendString(LOC31, ((NimStringDesc*) &TMP4814));
appendString(LOC31, reprEnum((*n).kind, (&NTI191029)));
		internalerror_165215((*n).info, LOC31);
	}
	break;
	}
	}BeforeRet: ;
}
Exemplo n.º 24
0
N_NIMCALL(void, renderparamtypes_345423)(TY10865** found, tnode192813* n) {
	nimfr("renderParamTypes", "typesrenderer.nim")
	nimln(81, "typesrenderer.nim");
	switch ((*n).Kind) {
	case ((NU8) 76):
	{
		NI i_345450;
		NI HEX3Atmp_345835;
		NI LOC2;
		NI res_345837;
		i_345450 = 0;
		HEX3Atmp_345835 = 0;
		nimln(83, "typesrenderer.nim");
		nimln(83, "typesrenderer.nim");
		nimln(83, "typesrenderer.nim");
		LOC2 = 0;
		LOC2 = len_193274(n);
		HEX3Atmp_345835 = subInt(LOC2, 1);
		nimln(1458, "system.nim");
		res_345837 = 1;
		nimln(1459, "system.nim");
		while (1) {
			tnode192813* LOC4;
			nimln(1459, "system.nim");
			if (!(res_345837 <= HEX3Atmp_345835)) goto LA3;
			nimln(1458, "system.nim");
			i_345450 = res_345837;
			nimln(83, "typesrenderer.nim");
			nimln(83, "typesrenderer.nim");
			LOC4 = 0;
			LOC4 = HEX5BHEX5D_193711(n, i_345450);
			renderparamtypes_345423(found, LOC4);
			nimln(1461, "system.nim");
			res_345837 = addInt(res_345837, 1);
		} LA3: ;
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC6;
		NI TMP4796;
		NimStringDesc* typestr;
		tnode192813* LOC11;
		NI i_345647;
		NI HEX3Atmp_345839;
		NI res_345841;
		nimln(86, "typesrenderer.nim");
		nimln(86, "typesrenderer.nim");
		nimln(86, "typesrenderer.nim");
		LOC6 = 0;
		LOC6 = len_193274(n);
		TMP4796 = subInt(LOC6, 2);
		typepos = (NI32)(TMP4796);
		nimln(87, "typesrenderer.nim");
		{
			nimln(87, "typesrenderer.nim");
			nimln(87, "typesrenderer.nim");
			if (!!((0 < typepos))) goto LA9;
			nimln(87, "typesrenderer.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP4797));
		}
		LA9: ;
		nimln(88, "typesrenderer.nim");
		nimln(88, "typesrenderer.nim");
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_193711(n, typepos);
		typestr = rendertype_343208(LOC11);
		nimln(89, "typesrenderer.nim");
		{
			NIM_BOOL LOC14;
			NI TMP4798;
			tnode192813* LOC16;
			ttype192847* typ;
			NI TMP4799;
			tnode192813* LOC19;
			nimln(89, "typesrenderer.nim");
			LOC14 = 0;
			nimln(89, "typesrenderer.nim");
			nimln(89, "typesrenderer.nim");
			LOC14 = (typestr->Sup.len < 1);
			if (!(LOC14)) goto LA15;
			nimln(89, "typesrenderer.nim");
			nimln(89, "typesrenderer.nim");
			nimln(89, "typesrenderer.nim");
			nimln(89, "typesrenderer.nim");
			TMP4798 = addInt(typepos, 1);
			LOC16 = 0;
			LOC16 = HEX5BHEX5D_193711(n, (NI32)(TMP4798));
			LOC14 = !(((*LOC16).Kind == ((NU8) 1)));
			LA15: ;
			if (!LOC14) goto LA17;
			nimln(91, "typesrenderer.nim");
			nimln(91, "typesrenderer.nim");
			nimln(91, "typesrenderer.nim");
			TMP4799 = addInt(typepos, 1);
			LOC19 = 0;
			LOC19 = HEX5BHEX5D_193711(n, (NI32)(TMP4799));
			typ = (*LOC19).Typ;
			nimln(92, "typesrenderer.nim");
			{
				nimln(92, "typesrenderer.nim");
				nimln(92, "typesrenderer.nim");
				if (!!(typ == 0)) goto LA22;
				nimln(92, "typesrenderer.nim");
				typestr = typetostring_228020(typ, ((NU8) 2));
			}
			LA22: ;
			nimln(93, "typesrenderer.nim");
			{
				nimln(93, "typesrenderer.nim");
				nimln(93, "typesrenderer.nim");
				if (!(typestr->Sup.len < 1)) goto LA26;
				nimln(93, "typesrenderer.nim");
				goto BeforeRet;
			}
			LA26: ;
		}
		LA17: ;
		i_345647 = 0;
		HEX3Atmp_345839 = 0;
		nimln(94, "typesrenderer.nim");
		nimln(94, "typesrenderer.nim");
		HEX3Atmp_345839 = subInt(typepos, 1);
		nimln(1458, "system.nim");
		res_345841 = 0;
		nimln(1459, "system.nim");
		while (1) {
			NimStringDesc* LOC34;
			nimln(1459, "system.nim");
			if (!(res_345841 <= HEX3Atmp_345839)) goto LA28;
			nimln(1458, "system.nim");
			i_345647 = res_345841;
			nimln(95, "typesrenderer.nim");
			{
				tnode192813* LOC31;
				nimln(95, "typesrenderer.nim");
				nimln(95, "typesrenderer.nim");
				nimln(95, "typesrenderer.nim");
				LOC31 = 0;
				LOC31 = HEX5BHEX5D_193711(n, i_345647);
				if (!!(((*LOC31).Kind == ((NU8) 2)))) goto LA32;
				nimln(95, "typesrenderer.nim");
				failedassertimpl_80421(((NimStringDesc*) &TMP4792));
			}
			LA32: ;
			nimln(96, "typesrenderer.nim");
			(*found) = (TY10865*) incrSeq(&((*found))->Sup, sizeof(NimStringDesc*));
			LOC34 = 0;
			LOC34 = (*found)->data[(*found)->Sup.len-1]; (*found)->data[(*found)->Sup.len-1] = copyStringRC1(typestr);
			if (LOC34) nimGCunrefNoCycle(LOC34);
			nimln(1461, "system.nim");
			res_345841 = addInt(res_345841, 1);
		} LA28: ;
	}
	break;
	default:
	{
		NimStringDesc* LOC36;
		nimln(98, "typesrenderer.nim");
		nimln(98, "typesrenderer.nim");
		LOC36 = 0;
		nimln(98, "typesrenderer.nim");
		LOC36 = rawNewString(reprEnum((*n).Kind, (&NTI192023))->Sup.len + 31);
appendString(LOC36, ((NimStringDesc*) &TMP4800));
appendString(LOC36, reprEnum((*n).Kind, (&NTI192023)));
		internalerror_169591((*n).Info, LOC36);
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}
Exemplo n.º 25
0
N_NIMCALL(void, loadfile_248043)(Tlineinfo163338 info) {
	NI32 i;
	i = info.fileindex;
	{
		if (!((gsourcefiles_248038 ? gsourcefiles_248038->Sup.len : 0) <= ((NI) (i)))) goto LA3;
		gsourcefiles_248038 = (TY248019*) setLengthSeq(&(gsourcefiles_248038)->Sup, sizeof(Tsourcefile248008), ((NI) ((NI32)(i + ((NI32) 1)))));
	}
	LA3: ;
	{
		NimStringDesc* path;
		NimStringDesc* LOC9;
		TY118589 LOC10;
		Baselexer246024 lex;
		Filestreamobj137692* LOC16;
		Streamobj137027* LOC17;
		NI pos;
		if (!gsourcefiles_248038->data[i].lines == 0) goto LA7;
		gsourcefiles_248038->data[i].fileidx = info.fileindex;
		if (gsourcefiles_248038->data[i].lines) nimGCunrefNoCycle(gsourcefiles_248038->data[i].lines);
		gsourcefiles_248038->data[i].lines = (TY121008*) newSeqRC1((&NTI121008), 0);
		path = tofullpath_164284(info.fileindex);
		LOC9 = 0;
		LOC9 = gsourcefiles_248038->data[i].fullpath; gsourcefiles_248038->data[i].fullpath = copyStringRC1(path);
		if (LOC9) nimGCunrefNoCycle(LOC9);
		memset((void*)(&LOC10), 0, sizeof(LOC10));
		nossplitFile(path, (&LOC10));
		gsourcefiles_248038->data[i].isnimfixfile = eqStrings(LOC10.Field2, ((NimStringDesc*) &TMP2680));
		{
			NimStringDesc* line_248092;
			FILE* f_248119;
			NimStringDesc* res_248121;
			line_248092 = 0;
			f_248119 = open_13217(path, ((NU8) 0), ((NI) 8000));
			res_248121 = rawNewString(((NI) 80));
			{
				while (1) {
					NIM_BOOL LOC14;
					NimStringDesc* LOC15;
					LOC14 = 0;
					LOC14 = readline_13481(f_248119, (&res_248121));
					if (!LOC14) goto LA13;
					line_248092 = res_248121;
					gsourcefiles_248038->data[i].lines = (TY121008*) incrSeq(&(gsourcefiles_248038->data[i].lines)->Sup, sizeof(NimStringDesc*));
					LOC15 = 0;
					LOC15 = gsourcefiles_248038->data[i].lines->data[gsourcefiles_248038->data[i].lines->Sup.len-1]; gsourcefiles_248038->data[i].lines->data[gsourcefiles_248038->data[i].lines->Sup.len-1] = copyStringRC1(line_248092);
					if (LOC15) nimGCunrefNoCycle(LOC15);
				} LA13: ;
			}
			fclose(f_248119);
		}
		memset((void*)(&lex), 0, sizeof(lex));
		lex.Sup.m_type = (&NTI246024);
		LOC16 = 0;
		LOC16 = newfilestream_137773(path, ((NU8) 0));
		LOC17 = 0;
		LOC17 = &LOC16->Sup;
		open_246040((&lex), LOC17, ((NI) 8192));
		pos = lex.bufpos;
		{
			while (1) {
				switch (((NU8)(lex.buf[pos]))) {
				case 13:
				{
					NimStringDesc* LOC21;
					LOC21 = 0;
					LOC21 = gsourcefiles_248038->data[i].newline; gsourcefiles_248038->data[i].newline = copyStringRC1(((NimStringDesc*) &TMP2688));
					if (LOC21) nimGCunrefNoCycle(LOC21);
					goto LA18;
				}
				break;
				case 10:
				case 0:
				{
					NimStringDesc* LOC23;
					LOC23 = 0;
					LOC23 = gsourcefiles_248038->data[i].newline; gsourcefiles_248038->data[i].newline = copyStringRC1(((NimStringDesc*) &TMP2689));
					if (LOC23) nimGCunrefNoCycle(LOC23);
					goto LA18;
				}
				break;
				default:
				{
				}
				break;
				}
				pos += ((NI) 1);
			}
		} LA18: ;
		close_246050((&lex));
	}
	LA7: ;
}
Exemplo n.º 26
0
N_NIMCALL(NI32, newcrcfromropeaux_150063)(trope148007* r, NI32 startval) {
	NI32 result;
	tropeseq148009* stack;
	TY148497 LOC1;
	nimfr("newCrcFromRopeAux", "ropes.nim")
	result = 0;
	nimln(337, "ropes.nim");
	nimln(337, "ropes.nim");
	stack = (tropeseq148009*) newSeq((&NTI148009), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = r;
	asgnRefNoCycle((void**) &stack->data[0], LOC1[0]);
	nimln(338, "ropes.nim");
	result = startval;
	nimln(339, "ropes.nim");
	while (1) {
		trope148007* it;
		NI i;
		NI l;
		nimln(339, "ropes.nim");
		nimln(339, "ropes.nim");
		if (!(0 < stack->Sup.len)) goto LA2;
		nimln(340, "ropes.nim");
		it = pop_148515(&stack);
		nimln(341, "ropes.nim");
		while (1) {
			nimln(341, "ropes.nim");
			if (!((*it).Data == NIM_NIL)) goto LA3;
			nimln(342, "ropes.nim");
			stack = (tropeseq148009*) incrSeq(&(stack)->Sup, sizeof(trope148007*));
			asgnRefNoCycle((void**) &stack->data[stack->Sup.len-1], (*it).Right);
			nimln(343, "ropes.nim");
			it = (*it).Left;
		} LA3: ;
		nimln(344, "ropes.nim");
		{
			nimln(344, "ropes.nim");
			nimln(344, "ropes.nim");
			nimln(344, "ropes.nim");
			if (!!(!(((*it).Data == NIM_NIL)))) goto LA6;
			nimln(344, "ropes.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP552));
		}
		LA6: ;
		nimln(345, "ropes.nim");
		i = 0;
		nimln(346, "ropes.nim");
		nimln(346, "ropes.nim");
		l = (*it).Data->Sup.len;
		nimln(347, "ropes.nim");
		while (1) {
			nimln(347, "ropes.nim");
			if (!(i < l)) goto LA8;
			nimln(348, "ropes.nim");
			if ((NU)(i) > (NU)((*it).Data->Sup.len)) raiseIndexError();
			result = updatecrc32_147017((*it).Data->data[i], result);
			nimln(349, "ropes.nim");
			i = addInt(i, 1);
		} LA8: ;
	} LA2: ;
	popFrame();
	return result;
}
Exemplo n.º 27
0
N_NIMCALL(void, Pushowner_107094)(TY55548* Owner_107096) {
Gowners_107116 = (TY55528*) incrSeq(&(Gowners_107116)->Sup, sizeof(TY55548*));
asgnRef((void**) &Gowners_107116->data[Gowners_107116->Sup.len-1], Owner_107096);
}
Exemplo n.º 28
0
N_NIMCALL(void, add_295167)(Trstnode295011* father, Trstnode295011* son) {
	(*father).sons = (Trstnodeseq295009*) incrSeq(&((*father).sons)->Sup, sizeof(Trstnode295011*));
	asgnRefNoCycle((void**) (&(*father).sons->data[(*father).sons->Sup.len-1]), son);
}
Exemplo n.º 29
0
N_NIMCALL(void, findall_333429)(txmlnode331009* n, NimStringDesc* tag, TY331018** result) {
	txmlnode331009* child_333810;
	NI i_333849;
	NI HEX3Atmp_333851;
	NI LOC13;
	NI TMP4680;
	NI res_333853;
	nimfr("findAll", "xmltree.nim")
	nimln(316, "xmltree.nim");
	{
		nimln(316, "xmltree.nim");
		nimln(316, "xmltree.nim");
		nimln(316, "xmltree.nim");
		if (!!(((*result) == 0 == NIM_FALSE))) goto LA3;
		nimln(316, "xmltree.nim");
		failedassertimpl_80021(((NimStringDesc*) &TMP4679));
	}
	LA3: ;
	nimln(317, "xmltree.nim");
	{
		nimln(317, "xmltree.nim");
		nimln(317, "xmltree.nim");
		if (!!(((*n).K == ((NU8) 1)))) goto LA7;
		nimln(317, "xmltree.nim");
		failedassertimpl_80021(((NimStringDesc*) &TMP4652));
	}
	LA7: ;
	child_333810 = 0;
	nimln(117, "xmltree.nim");
	{
		nimln(117, "xmltree.nim");
		nimln(117, "xmltree.nim");
		if (!!(((*n).K == ((NU8) 1)))) goto LA11;
		nimln(117, "xmltree.nim");
		failedassertimpl_80021(((NimStringDesc*) &TMP4652));
	}
	LA11: ;
	i_333849 = 0;
	HEX3Atmp_333851 = 0;
	nimln(118, "xmltree.nim");
	nimln(118, "xmltree.nim");
	nimln(118, "xmltree.nim");
	LOC13 = 0;
	LOC13 = len_331664(n);
	TMP4680 = subInt(LOC13, 1);
	HEX3Atmp_333851 = (NI32)(TMP4680);
	nimln(1457, "system.nim");
	res_333853 = 0;
	nimln(1458, "system.nim");
	while (1) {
		nimln(1458, "system.nim");
		if (!(res_333853 <= HEX3Atmp_333851)) goto LA14;
		nimln(1457, "system.nim");
		i_333849 = res_333853;
		nimln(118, "xmltree.nim");
		child_333810 = HEX5BHEX5D_331710(n, i_333849);
		{
			nimln(319, "xmltree.nim");
			{
				nimln(319, "xmltree.nim");
				nimln(319, "xmltree.nim");
				if (!!(((*child_333810).K == ((NU8) 1)))) goto LA18;
				nimln(320, "xmltree.nim");
				goto LA15;
			}
			LA18: ;
			nimln(321, "xmltree.nim");
			{
				NimStringDesc* LOC22;
				nimln(321, "xmltree.nim");
				nimln(321, "xmltree.nim");
				LOC22 = 0;
				LOC22 = tag_331509(child_333810);
				if (!eqStrings(LOC22, tag)) goto LA23;
				nimln(322, "xmltree.nim");
				(*result) = (TY331018*) incrSeq(&((*result))->Sup, sizeof(txmlnode331009*));
				asgnRefNoCycle((void**) &(*result)->data[(*result)->Sup.len-1], child_333810);
			}
			goto LA20;
			LA23: ;
			{
				nimln(323, "xmltree.nim");
				if (!((*child_333810).K == ((NU8) 1))) goto LA26;
				nimln(324, "xmltree.nim");
				findall_333429(child_333810, tag, result);
			}
			goto LA20;
			LA26: ;
			LA20: ;
		} LA15: ;
		nimln(1460, "system.nim");
		res_333853 = addInt(res_333853, 1);
	} LA14: ;
	popFrame();
}
Exemplo n.º 30
0
N_NIMCALL(void, processcmdline_525207)(NU8 pass, NimStringDesc* cmd) {
	toptparser523807 p;
	NI argscount;
	nimfr("processCmdLine", "service.nim")
	nimln(33, "service.nim");
	chckNil((void*)&p);
	memset((void*)&p, 0, sizeof(p));
	p.Sup.m_type = (&NTI523807);
	initoptparser_523819(cmd, &p);
	nimln(34, "service.nim");
	argscount = 0;
	nimln(35, "service.nim");
	while (1) {
		nimln(36, "service.nim");
		nponext(&p);
		nimln(37, "service.nim");
		switch (p.Kind) {
		case ((NU8) 0):
		{
			nimln(38, "service.nim");
			goto LA1;
		}
		break;
		case ((NU8) 2):
		case ((NU8) 3):
		{
			NI bracketle;
			nimln(42, "service.nim");
			bracketle = nsuFindChar(p.Key, 91, 0);
			nimln(43, "service.nim");
			{
				NimStringDesc* key;
				NI TMP7644;
				NimStringDesc* val;
				NimStringDesc* LOC8;
				NI TMP7645;
				NimStringDesc* LOC9;
				nimln(43, "service.nim");
				if (!(0 <= bracketle)) goto LA6;
				nimln(44, "service.nim");
				nimln(44, "service.nim");
				nimln(44, "service.nim");
				TMP7644 = subInt(bracketle, 1);
				key = copyStrLast(p.Key, 0, (NI32)(TMP7644));
				nimln(45, "service.nim");
				nimln(45, "service.nim");
				LOC8 = 0;
				nimln(45, "service.nim");
				nimln(45, "service.nim");
				TMP7645 = addInt(bracketle, 1);
				LOC9 = 0;
				LOC9 = copyStr(p.Key, (NI32)(TMP7645));
				LOC8 = rawNewString(LOC9->Sup.len + p.Val->Sup.len + 1);
appendString(LOC8, LOC9);
appendChar(LOC8, 58);
appendString(LOC8, p.Val);
				val = LOC8;
				nimln(46, "service.nim");
				processswitch_173016(key, val, pass, gcmdlineinfo_164104);
			}
			goto LA4;
			LA6: ;
			{
				nimln(48, "service.nim");
				processswitch_173016(p.Key, p.Val, pass, gcmdlineinfo_164104);
			}
			LA4: ;
		}
		break;
		case ((NU8) 1):
		{
			nimln(50, "service.nim");
			{
				NimStringDesc* LOC16;
				nimln(50, "service.nim");
				if (!(argscount == 0)) goto LA14;
				nimln(51, "service.nim");
				LOC16 = 0;
				LOC16 = command_137212; command_137212 = copyStringRC1(p.Key);
				if (LOC16) nimGCunrefNoCycle(LOC16);
			}
			goto LA12;
			LA14: ;
			{
				nimln(53, "service.nim");
				{
					NimStringDesc* LOC22;
					nimln(53, "service.nim");
					if (!(pass == ((NU8) 0))) goto LA20;
					nimln(53, "service.nim");
					commandargs_137234 = (TY10665*) incrSeq(&(commandargs_137234)->Sup, sizeof(NimStringDesc*));
					LOC22 = 0;
					LOC22 = commandargs_137234->data[commandargs_137234->Sup.len-1]; commandargs_137234->data[commandargs_137234->Sup.len-1] = copyStringRC1(p.Key);
					if (LOC22) nimGCunrefNoCycle(LOC22);
				}
				LA20: ;
				nimln(54, "service.nim");
				{
					nimln(54, "service.nim");
					if (!(argscount == 1)) goto LA25;
					nimln(56, "service.nim");
					asgnRefNoCycle((void**) &gprojectname_137206, nosunixToNativePath(p.Key, ((NimStringDesc*) &TMP7639)));
					nimln(57, "service.nim");
					asgnRefNoCycle((void**) &arguments_525205, npocmdLineRest(&p));
					nimln(58, "service.nim");
					goto LA1;
				}
				LA25: ;
			}
			LA12: ;
			nimln(59, "service.nim");
			argscount = addInt(argscount, 1);
		}
		break;
		}
	} LA1: ;
	nimln(61, "service.nim");
	{
		nimln(61, "service.nim");
		if (!(pass == ((NU8) 1))) goto LA29;
		nimln(62, "service.nim");
		{
			NIM_BOOL LOC33;
			TY127462 LOC37;
			nimln(62, "service.nim");
			LOC33 = 0;
			nimln(62, "service.nim");
			nimln(62, "service.nim");
			LOC33 = !(((gglobaloptions_137111 &(1<<((((NU8) 13))&31)))!=0));
			if (!(LOC33)) goto LA34;
			nimln(62, "service.nim");
			nimln(62, "service.nim");
			LOC33 = !(((arguments_525205) && (arguments_525205)->Sup.len == 0));
			LA34: ;
			if (!LOC33) goto LA35;
			nimln(63, "service.nim");
			memset((void*)LOC37, 0, sizeof(LOC37));
			rawmessage_165292(((NU16) 57), LOC37, 0);
		}
		LA35: ;
	}
	LA29: ;
	popFrame();
}