Ejemplo n.º 1
0
N_NIMCALL(tnode186813*, semnodekindconstraints_275472)(tnode186813* p) {
	tnode186813* result;
	nimfr("semNodeKindConstraints", "parampatterns.nim")
	result = 0;
	nimln(120, "parampatterns.nim");
	{
		nimln(120, "parampatterns.nim");
		nimln(120, "parampatterns.nim");
		if (!!(((*p).Kind == ((NU8) 40)))) goto LA3;
		nimln(120, "parampatterns.nim");
		failedassertimpl_79821(((NimStringDesc*) &TMP3595));
	}
	LA3: ;
	nimln(121, "parampatterns.nim");
	result = newnodei_187109(((NU8) 20), (*p).Info);
	nimln(122, "parampatterns.nim");
	if (!(((TMP3572[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
	nimln(122, "parampatterns.nim");
	asgnRefNoCycle((void**) &(*result).kindU.S3.Strval, rawNewString(10));
	nimln(123, "parampatterns.nim");
	if (!(((TMP3572[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
	(*result).kindU.S3.Strval = addChar((*result).kindU.S3.Strval, 1);
	nimln(124, "parampatterns.nim");
	{
		NI LOC7;
		NI i_275667;
		NI HEX3Atmp_275727;
		NI LOC10;
		NI res_275729;
		nimln(124, "parampatterns.nim");
		nimln(124, "parampatterns.nim");
		LOC7 = 0;
		LOC7 = len_187274(p);
		if (!(2 <= LOC7)) goto LA8;
		i_275667 = 0;
		HEX3Atmp_275727 = 0;
		nimln(125, "parampatterns.nim");
		nimln(125, "parampatterns.nim");
		nimln(125, "parampatterns.nim");
		LOC10 = 0;
		LOC10 = len_187274(p);
		HEX3Atmp_275727 = subInt(LOC10, 1);
		nimln(1457, "system.nim");
		res_275729 = 1;
		nimln(1458, "system.nim");
		while (1) {
			nimln(1458, "system.nim");
			if (!(res_275729 <= HEX3Atmp_275727)) goto LA11;
			nimln(1457, "system.nim");
			i_275667 = res_275729;
			nimln(126, "parampatterns.nim");
			if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(i_275667) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!(((TMP3572[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
			compileconstraints_275106((*p).kindU.S6.Sons->data[i_275667], &(*result).kindU.S3.Strval);
			nimln(1460, "system.nim");
			res_275729 = addInt(res_275729, 1);
		} LA11: ;
		nimln(127, "parampatterns.nim");
		{
			nimln(127, "parampatterns.nim");
			nimln(127, "parampatterns.nim");
			if (!(((TMP3572[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
			if (!(63 < (*result).kindU.S3.Strval->Sup.len)) goto LA14;
			nimln(128, "parampatterns.nim");
			internalerror_164591((*p).Info, ((NimStringDesc*) &TMP3596));
		}
		LA14: ;
	}
	goto LA5;
	LA8: ;
	{
		nimln(130, "parampatterns.nim");
		patternerror_275040(p);
	}
	LA5: ;
	nimln(131, "parampatterns.nim");
	if (!(((TMP3572[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
	add_275046(&(*result).kindU.S3.Strval, ((NU8) 1));
	popFrame();
	return result;
}
Ejemplo n.º 2
0
N_NIMCALL(void, fillbuffer_163072)(tbaselexer163018* l) {
	NI charsread;
	NI tocopy;
	NI s;
	NI oldbuflen;
	NI TMP1622;
	NI TMP1623;
	NI TMP1627;
	NI TMP1628;
	NI LOC13;
	NI TMP1629;
	NI TMP1630;
	nimfr("FillBuffer", "nimlexbase.nim")
	charsread = 0;
	tocopy = 0;
	s = 0;
	oldbuflen = 0;
	nimln(82, "nimlexbase.nim");
	{
		nimln(82, "nimlexbase.nim");
		nimln(82, "nimlexbase.nim");
		if (!!(((*l).Sentinel < (*l).Buflen))) goto LA3;
		nimln(82, "nimlexbase.nim");
		hiddenraiseassert_76017(((NimStringDesc*) &TMP1621));	}	LA3: ;
	nimln(83, "nimlexbase.nim");
	nimln(83, "nimlexbase.nim");
	nimln(83, "nimlexbase.nim");
	TMP1622 = subInt((*l).Buflen, (*l).Sentinel);
	TMP1623 = subInt((NI32)(TMP1622), 1);
	tocopy = (NI32)(TMP1623);
	nimln(84, "nimlexbase.nim");
	{
		nimln(84, "nimlexbase.nim");
		nimln(84, "nimlexbase.nim");
		if (!!((0 <= tocopy))) goto LA7;
		nimln(84, "nimlexbase.nim");
		hiddenraiseassert_76017(((NimStringDesc*) &TMP1624));	}	LA7: ;
	nimln(85, "nimlexbase.nim");
	{
		NI TMP1625;
		NI TMP1626;
		nimln(706, "system.nim");
		if (!(0 < tocopy)) goto LA11;
		nimln(86, "nimlexbase.nim");
		nimln(86, "nimlexbase.nim");
		TMP1625 = addInt((*l).Sentinel, 1);
		nimln(86, "nimlexbase.nim");
		TMP1626 = mulInt(tocopy, 1);
		memmove(((void*) ((*l).Buf)), ((void*) (&(*l).Buf[(NI32)(TMP1625)])), (NI32)(TMP1626));	}	LA11: ;
	nimln(88, "nimlexbase.nim");
	nimln(89, "nimlexbase.nim");
	nimln(88, "nimlexbase.nim");
	nimln(89, "nimlexbase.nim");
	nimln(89, "nimlexbase.nim");
	TMP1627 = addInt((*l).Sentinel, 1);
	TMP1628 = mulInt((NI32)(TMP1627), 1);
	LOC13 = 0;
	LOC13 = llstreamread_162242((*l).Stream, ((void*) (&(*l).Buf[tocopy])), (NI32)(TMP1628));
	TMP1629 = divInt(LOC13, 1);
	charsread = (NI32)(TMP1629);
	nimln(90, "nimlexbase.nim");
	nimln(90, "nimlexbase.nim");
	TMP1630 = addInt(tocopy, charsread);
	s = (NI32)(TMP1630);
	nimln(91, "nimlexbase.nim");
	{
		NI TMP1631;
		nimln(91, "nimlexbase.nim");
		nimln(91, "nimlexbase.nim");
		TMP1631 = addInt((*l).Sentinel, 1);
		if (!(charsread < (NI32)(TMP1631))) goto LA16;
		nimln(92, "nimlexbase.nim");
		(*l).Buf[s] = 0;
		nimln(93, "nimlexbase.nim");
		(*l).Sentinel = s;
	}	goto LA14;
	LA16: ;
	{
		nimln(96, "nimlexbase.nim");
		s = subInt(s, 1);
		nimln(97, "nimlexbase.nim");
		while (1) {
			nimln(98, "nimlexbase.nim");
			{
				nimln(98, "nimlexbase.nim");
				nimln(98, "nimlexbase.nim");
				if (!!((s < (*l).Buflen))) goto LA22;
				nimln(98, "nimlexbase.nim");
				hiddenraiseassert_76017(((NimStringDesc*) &TMP1632));			}			LA22: ;
			nimln(99, "nimlexbase.nim");
			while (1) {
				NIM_BOOL LOC25;
				nimln(99, "nimlexbase.nim");
				LOC25 = 0;
				nimln(702, "system.nim");
				LOC25 = (0 <= s);
				if (!(LOC25)) goto LA26;
				nimln(99, "nimlexbase.nim");
				nimln(730, "system.nim");
				LOC25 = !((((NU8)((*l).Buf[s])) == ((NU8)(13)) || ((NU8)((*l).Buf[s])) == ((NU8)(10))));
				LA26: ;
				if (!LOC25) goto LA24;
				nimln(99, "nimlexbase.nim");
				s = subInt(s, 1);
			} LA24: ;
			nimln(100, "nimlexbase.nim");
			{
				nimln(702, "system.nim");
				if (!(0 <= s)) goto LA29;
				nimln(102, "nimlexbase.nim");
				(*l).Sentinel = s;
				nimln(103, "nimlexbase.nim");
				goto LA19;
			}			goto LA27;
			LA29: ;
			{
				NI TMP1633;
				NI TMP1634;
				void* LOC32;
				NI TMP1637;
				NI LOC37;
				NI TMP1638;
				NI TMP1641;
				nimln(107, "nimlexbase.nim");
				oldbuflen = (*l).Buflen;
				nimln(108, "nimlexbase.nim");
				nimln(108, "nimlexbase.nim");
				TMP1633 = mulInt((*l).Buflen, 2);
				(*l).Buflen = (NI32)(TMP1633);
				nimln(109, "nimlexbase.nim");
				nimln(109, "nimlexbase.nim");
				nimln(109, "nimlexbase.nim");
				TMP1634 = mulInt((*l).Buflen, 1);
				LOC32 = 0;
				LOC32 = realloc_4007(((void*) ((*l).Buf)), (NI32)(TMP1634));
				(*l).Buf = ((NCSTRING) (LOC32));
				nimln(110, "nimlexbase.nim");
				{
					NI TMP1635;
					nimln(110, "nimlexbase.nim");
					nimln(110, "nimlexbase.nim");
					nimln(110, "nimlexbase.nim");
					TMP1635 = subInt((*l).Buflen, oldbuflen);
					if (!!(((NI32)(TMP1635) == oldbuflen))) goto LA35;
					nimln(110, "nimlexbase.nim");
					hiddenraiseassert_76017(((NimStringDesc*) &TMP1636));				}				LA35: ;
				nimln(111, "nimlexbase.nim");
				nimln(112, "nimlexbase.nim");
				nimln(111, "nimlexbase.nim");
				nimln(112, "nimlexbase.nim");
				TMP1637 = mulInt(oldbuflen, 1);
				LOC37 = 0;
				LOC37 = llstreamread_162242((*l).Stream, ((void*) (&(*l).Buf[oldbuflen])), (NI32)(TMP1637));
				TMP1638 = divInt(LOC37, 1);
				charsread = (NI32)(TMP1638);
				nimln(113, "nimlexbase.nim");
				{
					NI TMP1639;
					NI TMP1640;
					nimln(113, "nimlexbase.nim");
					if (!(charsread < oldbuflen)) goto LA40;
					nimln(114, "nimlexbase.nim");
					nimln(114, "nimlexbase.nim");
					TMP1639 = addInt(oldbuflen, charsread);
					(*l).Buf[(NI32)(TMP1639)] = 0;
					nimln(115, "nimlexbase.nim");
					nimln(115, "nimlexbase.nim");
					TMP1640 = addInt(oldbuflen, charsread);
					(*l).Sentinel = (NI32)(TMP1640);
					nimln(116, "nimlexbase.nim");
					goto LA19;
				}				LA40: ;
				nimln(117, "nimlexbase.nim");
				nimln(117, "nimlexbase.nim");
				TMP1641 = subInt((*l).Buflen, 1);
				s = (NI32)(TMP1641);
			}			LA27: ;
		} LA19: ;
	}	LA14: ;
	popFrame();
}
Ejemplo n.º 3
0
N_NIMCALL(NimStringDesc*, nstFormat)(NimStringDesc* f, tstringtable112610* t, NU8 flags) {
	NimStringDesc* result;
	NI i;
	nimfr("%", "strtabs.nim")
	result = 0;
	nimln(194, "strtabs.nim");
	result = copyString(((NimStringDesc*) &TMP284));
	nimln(195, "strtabs.nim");
	i = 0;
	nimln(196, "strtabs.nim");
	while (1) {
		nimln(196, "strtabs.nim");
		nimln(196, "strtabs.nim");
		if (!(i < f->Sup.len)) goto LA1;
		nimln(197, "strtabs.nim");
		{
			NI TMP300;
			nimln(197, "strtabs.nim");
			if ((NU)(i) > (NU)(f->Sup.len)) raiseIndexError();
			if (!((NU8)(f->data[i]) == (NU8)(36))) goto LA4;
			nimln(198, "strtabs.nim");
			nimln(198, "strtabs.nim");
			TMP300 = addInt(i, 1);
			if ((NU)((NI32)(TMP300)) > (NU)(f->Sup.len)) raiseIndexError();
			switch (((NU8)(f->data[(NI32)(TMP300)]))) {
			case 36:
			{
				nimln(200, "strtabs.nim");
				result = addChar(result, 36);
				nimln(201, "strtabs.nim");
				i = addInt(i, 2);
			}			break;
			case 123:
			{
				NI j;
				NI TMP301;
				NI TMP302;
				NI TMP303;
				NimStringDesc* LOC11;
				NimStringDesc* LOC12;
				NI TMP304;
				nimln(203, "strtabs.nim");
				nimln(203, "strtabs.nim");
				TMP301 = addInt(i, 1);
				j = (NI32)(TMP301);
				nimln(204, "strtabs.nim");
				while (1) {
					NIM_BOOL LOC9;
					nimln(204, "strtabs.nim");
					LOC9 = 0;
					nimln(204, "strtabs.nim");
					nimln(204, "strtabs.nim");
					LOC9 = (j < f->Sup.len);
					if (!(LOC9)) goto LA10;
					nimln(698, "system.nim");
					nimln(698, "system.nim");
					if ((NU)(j) > (NU)(f->Sup.len)) raiseIndexError();
					LOC9 = !(((NU8)(f->data[j]) == (NU8)(125)));
					LA10: ;
					if (!LOC9) goto LA8;
					nimln(204, "strtabs.nim");
					j = addInt(j, 1);
				} LA8: ;
				nimln(205, "strtabs.nim");
				nimln(205, "strtabs.nim");
				nimln(205, "strtabs.nim");
				nimln(205, "strtabs.nim");
				TMP302 = addInt(i, 2);
				nimln(205, "strtabs.nim");
				TMP303 = subInt(j, 1);
				LOC11 = 0;
				LOC11 = copyStrLast(f, (NI32)(TMP302), (NI32)(TMP303));
				LOC12 = 0;
				LOC12 = getvalue_112975(t, flags, LOC11);
				result = resizeString(result, LOC12->Sup.len + 0);
appendString(result, LOC12);
				nimln(206, "strtabs.nim");
				nimln(206, "strtabs.nim");
				TMP304 = addInt(j, 1);
				i = (NI32)(TMP304);
			}			break;
			case 97 ... 122:
			case 65 ... 90:
			case 128 ... 255:
			case 95:
			{
				NI j;
				NI TMP305;
				NI TMP306;
				NI TMP307;
				NimStringDesc* LOC17;
				NimStringDesc* LOC18;
				nimln(208, "strtabs.nim");
				nimln(208, "strtabs.nim");
				TMP305 = addInt(i, 1);
				j = (NI32)(TMP305);
				nimln(209, "strtabs.nim");
				while (1) {
					NIM_BOOL LOC15;
					nimln(209, "strtabs.nim");
					LOC15 = 0;
					nimln(209, "strtabs.nim");
					nimln(209, "strtabs.nim");
					LOC15 = (j < f->Sup.len);
					if (!(LOC15)) goto LA16;
					nimln(730, "system.nim");
					if ((NU)(j) > (NU)(f->Sup.len)) raiseIndexError();
					LOC15 = (((NU8)(f->data[j])) >= ((NU8)(97)) && ((NU8)(f->data[j])) <= ((NU8)(122)) || ((NU8)(f->data[j])) >= ((NU8)(65)) && ((NU8)(f->data[j])) <= ((NU8)(90)) || ((NU8)(f->data[j])) >= ((NU8)(48)) && ((NU8)(f->data[j])) <= ((NU8)(57)) || ((NU8)(f->data[j])) == ((NU8)(95)) || ((NU8)(f->data[j])) >= ((NU8)(128)) && ((NU8)(f->data[j])) <= ((NU8)(255)));
					LA16: ;
					if (!LOC15) goto LA14;
					nimln(209, "strtabs.nim");
					j = addInt(j, 1);
				} LA14: ;
				nimln(210, "strtabs.nim");
				nimln(210, "strtabs.nim");
				nimln(210, "strtabs.nim");
				nimln(210, "strtabs.nim");
				TMP306 = addInt(i, 1);
				nimln(210, "strtabs.nim");
				TMP307 = subInt(j, 1);
				LOC17 = 0;
				LOC17 = copyStrLast(f, (NI32)(TMP306), (NI32)(TMP307));
				LOC18 = 0;
				LOC18 = getvalue_112975(t, flags, LOC17);
				result = resizeString(result, LOC18->Sup.len + 0);
appendString(result, LOC18);
				nimln(211, "strtabs.nim");
				i = j;
			}			break;
			default:
			{
				nimln(213, "strtabs.nim");
				if ((NU)(i) > (NU)(f->Sup.len)) raiseIndexError();
				result = addChar(result, f->data[i]);
				nimln(214, "strtabs.nim");
				i = addInt(i, 1);
			}			break;
			}
		}		goto LA2;
		LA4: ;
		{
			nimln(216, "strtabs.nim");
			if ((NU)(i) > (NU)(f->Sup.len)) raiseIndexError();
			result = addChar(result, f->data[i]);
			nimln(217, "strtabs.nim");
			i = addInt(i, 1);
		}		LA2: ;
	} LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 4
0
N_NIMCALL(void, merge_323468)(tentry322943* a, NI aLen0, tentry322943* b, NI bLen0, NI lo, NI m, NI hi, TY323431 cmp, NU8 order) {
	NI j;
	NI bb;
	NI i;
	NI k;
	nimfr("merge", "algorithm.nim")
	nimln(71, "algorithm.nim");
	{
		NI TMP5001;
		NI LOC3;
		NI LOC4;
		nimln(71, "algorithm.nim");
		nimln(71, "algorithm.nim");
		nimln(71, "algorithm.nim");
		if ((NU)(m) >= (NU)(aLen0)) raiseIndexError();
		nimln(71, "algorithm.nim");
		TMP5001 = addInt(m, 1);
		if ((NU)((NI32)(TMP5001)) >= (NU)(aLen0)) raiseIndexError();
		LOC3 = 0;
		LOC3 = cmp.ClEnv? cmp.ClPrc(a[m], a[(NI32)(TMP5001)], cmp.ClEnv) : ((TMP5002)(cmp.ClPrc))(a[m], a[(NI32)(TMP5001)]);
		LOC4 = 0;
		LOC4 = HEX2A_318040(LOC3, order);
		if (!(LOC4 <= 0)) goto LA5;
		nimln(71, "algorithm.nim");
		goto BeforeRet;
	}	LA5: ;
	nimln(72, "algorithm.nim");
	j = lo;
	nimln(74, "algorithm.nim");
	{
		nimln(74, "algorithm.nim");
		nimln(74, "algorithm.nim");
		if (!!((j <= m))) goto LA9;
		nimln(74, "algorithm.nim");
		hiddenraiseassert_76017(((NimStringDesc*) &TMP4984));	}	LA9: ;
	nimln(76, "algorithm.nim");
	bb = 0;
	nimln(77, "algorithm.nim");
	while (1) {
		nimln(77, "algorithm.nim");
		if (!(j <= m)) goto LA11;
		nimln(64, "algorithm.nim");
		if ((NU)(bb) >= (NU)(bLen0)) raiseIndexError();
		if ((NU)(j) >= (NU)(aLen0)) raiseIndexError();
		b[bb].Pos = a[j].Pos;
		unsureAsgnRef((void**) &b[bb].Sym, a[j].Sym);
		nimln(79, "algorithm.nim");
		bb = addInt(bb, 1);
		nimln(80, "algorithm.nim");
		j = addInt(j, 1);
	} LA11: ;
	nimln(84, "algorithm.nim");
	i = 0;
	nimln(85, "algorithm.nim");
	k = lo;
	nimln(87, "algorithm.nim");
	while (1) {
		NIM_BOOL LOC13;
		nimln(87, "algorithm.nim");
		LOC13 = 0;
		nimln(87, "algorithm.nim");
		LOC13 = (k < j);
		if (!(LOC13)) goto LA14;
		nimln(87, "algorithm.nim");
		LOC13 = (j <= hi);
		LA14: ;
		if (!LOC13) goto LA12;
		nimln(88, "algorithm.nim");
		{
			NI LOC17;
			NI LOC18;
			nimln(88, "algorithm.nim");
			nimln(88, "algorithm.nim");
			nimln(88, "algorithm.nim");
			if ((NU)(i) >= (NU)(bLen0)) raiseIndexError();
			if ((NU)(j) >= (NU)(aLen0)) raiseIndexError();
			LOC17 = 0;
			LOC17 = cmp.ClEnv? cmp.ClPrc(b[i], a[j], cmp.ClEnv) : ((TMP5003)(cmp.ClPrc))(b[i], a[j]);
			LOC18 = 0;
			LOC18 = HEX2A_318040(LOC17, order);
			if (!(LOC18 <= 0)) goto LA19;
			nimln(64, "algorithm.nim");
			if ((NU)(k) >= (NU)(aLen0)) raiseIndexError();
			if ((NU)(i) >= (NU)(bLen0)) raiseIndexError();
			a[k].Pos = b[i].Pos;
			unsureAsgnRef((void**) &a[k].Sym, b[i].Sym);
			nimln(90, "algorithm.nim");
			i = addInt(i, 1);
		}		goto LA15;
		LA19: ;
		{
			nimln(64, "algorithm.nim");
			if ((NU)(k) >= (NU)(aLen0)) raiseIndexError();
			if ((NU)(j) >= (NU)(aLen0)) raiseIndexError();
			a[k].Pos = a[j].Pos;
			unsureAsgnRef((void**) &a[k].Sym, a[j].Sym);
			nimln(93, "algorithm.nim");
			j = addInt(j, 1);
		}		LA15: ;
		nimln(94, "algorithm.nim");
		k = addInt(k, 1);
	} LA12: ;
	nimln(97, "algorithm.nim");
	while (1) {
		nimln(97, "algorithm.nim");
		if (!(k < j)) goto LA22;
		nimln(64, "algorithm.nim");
		if ((NU)(k) >= (NU)(aLen0)) raiseIndexError();
		if ((NU)(i) >= (NU)(bLen0)) raiseIndexError();
		a[k].Pos = b[i].Pos;
		unsureAsgnRef((void**) &a[k].Sym, b[i].Sym);
		nimln(99, "algorithm.nim");
		k = addInt(k, 1);
		nimln(100, "algorithm.nim");
		i = addInt(i, 1);
	} LA22: ;
	BeforeRet: ;	popFrame();
}
Ejemplo n.º 5
0
N_NIMCALL(NU8, ispartofaux_416013)(ttype191847* a, ttype191847* b, tintset188047* marker) {
	NU8 result;
	nimfr("isPartOfAux", "aliases.nim")
	result = 0;
	nimln(43, "aliases.nim");
	result = ((NU8) 0);
	nimln(44, "aliases.nim");
	{
		NIM_BOOL LOC3;
		nimln(44, "aliases.nim");
		LOC3 = 0;
		nimln(44, "aliases.nim");
		LOC3 = (a == NIM_NIL);
		if (LOC3) goto LA4;
		nimln(44, "aliases.nim");
		LOC3 = (b == NIM_NIL);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(44, "aliases.nim");
		goto BeforeRet;
	}
	LA5: ;
	nimln(45, "aliases.nim");
	{
		NIM_BOOL LOC9;
		nimln(45, "aliases.nim");
		LOC9 = 0;
		LOC9 = containsorincl_188905(marker, (*a).Sup.Id);
		if (!LOC9) goto LA10;
		nimln(45, "aliases.nim");
		goto BeforeRet;
	}
	LA10: ;
	nimln(46, "aliases.nim");
	{
		NIM_BOOL LOC14;
		nimln(46, "aliases.nim");
		LOC14 = 0;
		LOC14 = comparetypes_234564(a, b, ((NU8) 1), 0);
		if (!LOC14) goto LA15;
		nimln(46, "aliases.nim");
		nimln(46, "aliases.nim");
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA15: ;
	nimln(47, "aliases.nim");
	switch ((*a).Kind) {
	case ((NU8) 17):
	{
		nimln(49, "aliases.nim");
		if ((NU)(0) >= (NU)((*a).Sons->Sup.len)) raiseIndexError();
		result = ispartofaux_416013((*a).Sons->data[0], b, marker);
		nimln(50, "aliases.nim");
		{
			nimln(50, "aliases.nim");
			if (!(result == ((NU8) 0))) goto LA20;
			nimln(50, "aliases.nim");
			result = ispartofaux_416020((*a).N, b, marker);
		}
		LA20: ;
	}
	break;
	case ((NU8) 11):
	case ((NU8) 13):
	{
		ttype191847* LOC23;
		nimln(52, "aliases.nim");
		nimln(52, "aliases.nim");
		LOC23 = 0;
		LOC23 = lastson_192203(a);
		result = ispartofaux_416013(LOC23, b, marker);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	case ((NU8) 19):
	case ((NU8) 18):
	{
		NI i_416385;
		NI HEX3Atmp_416395;
		NI LOC25;
		NI TMP5630;
		NI res_416397;
		i_416385 = 0;
		HEX3Atmp_416395 = 0;
		nimln(54, "aliases.nim");
		nimln(54, "aliases.nim");
		nimln(54, "aliases.nim");
		LOC25 = 0;
		LOC25 = sonslen_192195(a);
		TMP5630 = subInt(LOC25, 1);
		HEX3Atmp_416395 = (NI64)(TMP5630);
		nimln(1451, "system.nim");
		res_416397 = 0;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_416397 <= HEX3Atmp_416395)) goto LA26;
			nimln(1451, "system.nim");
			i_416385 = res_416397;
			nimln(55, "aliases.nim");
			if ((NU)(i_416385) >= (NU)((*a).Sons->Sup.len)) raiseIndexError();
			result = ispartofaux_416013((*a).Sons->data[i_416385], b, marker);
			nimln(56, "aliases.nim");
			{
				nimln(56, "aliases.nim");
				if (!(result == ((NU8) 2))) goto LA29;
				nimln(56, "aliases.nim");
				goto BeforeRet;
			}
			LA29: ;
			nimln(1454, "system.nim");
			res_416397 = addInt(res_416397, 1);
		} LA26: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 6
0
N_NIMCALL(void, evaltemplateaux_395024)(tnode191813* templ, tnode191813* actual, templctx395010* c, tnode191813* result) {
	nimfr("evalTemplateAux", "evaltempl.nim")
	nimln(28, "evaltempl.nim");
	switch ((*templ).Kind) {
	case ((NU8) 3):
	{
		tsym191843* s;
		nimln(30, "evaltempl.nim");
		if (!(((TMP5459[(*templ).Kind/8] &(1<<((*templ).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5460));
		s = (*templ).kindU.S4.Sym;
		nimln(31, "evaltempl.nim");
		{
			nimln(31, "evaltempl.nim");
			if (!((*(*s).Owner).Sup.Id == (*(*c).Owner).Sup.Id)) goto LA4;
			nimln(32, "evaltempl.nim");
			{
				tnode191813* x;
				nimln(32, "evaltempl.nim");
				if (!((*s).Kind == ((NU8) 3))) goto LA8;
				nimln(33, "evaltempl.nim");
				if (((TMP5461[(*actual).Kind/8] &(1<<((*actual).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
				if ((NU)((*s).Position) >= (NU)((*actual).kindU.S6.Sons->Sup.len)) raiseIndexError();
				x = (*actual).kindU.S6.Sons->data[(*s).Position];
				nimln(34, "evaltempl.nim");
				{
					tnode191813* y_395079;
					NI i_395161;
					NI HEX3Atmp_395163;
					NI LOC14;
					NI res_395165;
					nimln(34, "evaltempl.nim");
					if (!((*x).Kind == ((NU8) 150))) goto LA12;
					y_395079 = 0;
					i_395161 = 0;
					HEX3Atmp_395163 = 0;
					nimln(1521, "ast.nim");
					nimln(1521, "ast.nim");
					nimln(1521, "ast.nim");
					LOC14 = 0;
					LOC14 = len_192274(x);
					HEX3Atmp_395163 = subInt(LOC14, 1);
					nimln(1458, "system.nim");
					res_395165 = 0;
					nimln(1459, "system.nim");
					while (1) {
						nimln(1459, "system.nim");
						if (!(res_395165 <= HEX3Atmp_395163)) goto LA15;
						nimln(1458, "system.nim");
						i_395161 = res_395165;
						nimln(1521, "ast.nim");
						if (((TMP5461[(*x).Kind/8] &(1<<((*x).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
						if ((NU)(i_395161) >= (NU)((*x).kindU.S6.Sons->Sup.len)) raiseIndexError();
						y_395079 = (*x).kindU.S6.Sons->data[i_395161];
						nimln(35, "evaltempl.nim");
						add_192400(result, y_395079);
						nimln(1461, "system.nim");
						res_395165 = addInt(res_395165, 1);
					} LA15: ;
				}
				goto LA10;
				LA12: ;
				{
					tnode191813* LOC17;
					nimln(37, "evaltempl.nim");
					nimln(37, "evaltempl.nim");
					LOC17 = 0;
					LOC17 = copytree_192247(x);
					add_192400(result, LOC17);
				}
				LA10: ;
			}
			goto LA6;
			LA8: ;
			{
				tsym191843* x;
				TNimObject* LOC24;
				tlineinfo166527 LOC29;
				tnode191813* LOC35;
				nimln(849, "msgs.nim");
				{
					NimStringDesc* LOC23;
					nimln(849, "msgs.nim");
					nimln(39, "evaltempl.nim");
					if (!!((((*s).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA21;
					nimln(849, "msgs.nim");
					nimln(849, "msgs.nim");
					LOC23 = 0;
					LOC23 = HEX24_168714(TMP5463);
					internalerror_168606(LOC23);
				}
				LA21: ;
				nimln(40, "evaltempl.nim");
				nimln(40, "evaltempl.nim");
				LOC24 = 0;
				LOC24 = idtableget_200137((*c).Mapping, &s->Sup);
				if (LOC24) chckObj((*LOC24).m_type, (&NTI191843));
				x = ((tsym191843*) (LOC24));
				nimln(41, "evaltempl.nim");
				{
					nimln(41, "evaltempl.nim");
					if (!(x == NIM_NIL)) goto LA27;
					nimln(42, "evaltempl.nim");
					x = copysym_192157(s, NIM_FALSE);
					nimln(43, "evaltempl.nim");
					asgnRefNoCycle((void**) &(*x).Owner, (*c).Gensymowner);
					nimln(44, "evaltempl.nim");
					idtableput_200147(&(*c).Mapping, &s->Sup, &x->Sup.Sup);
				}
				LA27: ;
				nimln(45, "evaltempl.nim");
				nimln(45, "evaltempl.nim");
				nimln(45, "evaltempl.nim");
				{
					if (!(*c).Instlines) goto LA32;
					LOC29 = (*actual).Info;
				}
				goto LA30;
				LA32: ;
				{
					LOC29 = (*templ).Info;
				}
				LA30: ;
				LOC35 = 0;
				LOC35 = newsymnode_193722(x, LOC29);
				add_192400(result, LOC35);
			}
			LA6: ;
		}
		goto LA2;
		LA4: ;
		{
			tnode191813* LOC37;
			nimln(47, "evaltempl.nim");
			nimln(47, "evaltempl.nim");
			LOC37 = 0;
			LOC37 = copynode_395016(&(*c), templ, actual);
			add_192400(result, LOC37);
		}
		LA2: ;
	}
	break;
	case ((NU8) 0) ... ((NU8) 2):
	case ((NU8) 4) ... ((NU8) 23):
	{
		tnode191813* LOC39;
		nimln(49, "evaltempl.nim");
		nimln(49, "evaltempl.nim");
		LOC39 = 0;
		LOC39 = copynode_395016(&(*c), templ, actual);
		add_192400(result, LOC39);
	}
	break;
	default:
	{
		tnode191813* res;
		NI i_395145;
		NI HEX3Atmp_395166;
		NI LOC41;
		NI TMP5465;
		NI res_395168;
		nimln(51, "evaltempl.nim");
		res = copynode_395016(&(*c), templ, actual);
		i_395145 = 0;
		HEX3Atmp_395166 = 0;
		nimln(52, "evaltempl.nim");
		nimln(52, "evaltempl.nim");
		nimln(52, "evaltempl.nim");
		LOC41 = 0;
		LOC41 = sonslen_192191(templ);
		TMP5465 = subInt(LOC41, 1);
		HEX3Atmp_395166 = (NI64)(TMP5465);
		nimln(1451, "system.nim");
		res_395168 = 0;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_395168 <= HEX3Atmp_395166)) goto LA42;
			nimln(1451, "system.nim");
			i_395145 = res_395168;
			nimln(53, "evaltempl.nim");
			if (((TMP5461[(*templ).Kind/8] &(1<<((*templ).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395145) >= (NU)((*templ).kindU.S6.Sons->Sup.len)) raiseIndexError();
			evaltemplateaux_395024((*templ).kindU.S6.Sons->data[i_395145], actual, c, res);
			nimln(1454, "system.nim");
			res_395168 = addInt(res_395168, 1);
		} LA42: ;
		nimln(54, "evaltempl.nim");
		add_192400(result, res);
	}
	break;
	}
	popFrame();
}
Ejemplo n.º 7
0
N_NIMCALL(tnode191813*, evaltemplate_395275)(tnode191813* n, tsym191843* tmpl, tsym191843* gensymowner) {
	tnode191813* result;
	tnode191813* args;
	templctx395010 ctx;
	tnode191813* body;
	nimfr("evalTemplate", "evaltempl.nim")
	result = 0;
	nimln(78, "evaltempl.nim");
	evaltemplatecounter_395273 = addInt(evaltemplatecounter_395273, 1);
	nimln(79, "evaltempl.nim");
	{
		nimln(79, "evaltempl.nim");
		if (!(100 < evaltemplatecounter_395273)) goto LA3;
		nimln(80, "evaltempl.nim");
		globalerror_168558((*n).Info, ((NU16) 183), ((NimStringDesc*) &TMP5466));
		nimln(81, "evaltempl.nim");
		result = n;
	}
	LA3: ;
	nimln(84, "evaltempl.nim");
	args = evaltemplateargs_395174(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_192130(&ctx.Mapping);
	nimln(90, "evaltempl.nim");
	body = getbody_243243(tmpl);
	nimln(91, "evaltempl.nim");
	{
		NIM_BOOL LOC7;
		nimln(91, "evaltempl.nim");
		LOC7 = 0;
		LOC7 = isatom_198187(body);
		if (!LOC7) goto LA8;
		nimln(92, "evaltempl.nim");
		result = newnodei_192109(((NU8) 37), (*body).Info);
		nimln(93, "evaltempl.nim");
		evaltemplateaux_395024(body, args, &ctx, result);
		nimln(94, "evaltempl.nim");
		{
			NI LOC12;
			nimln(94, "evaltempl.nim");
			nimln(94, "evaltempl.nim");
			LOC12 = 0;
			LOC12 = len_192274(result);
			if (!(LOC12 == 1)) goto LA13;
			nimln(94, "evaltempl.nim");
			if (((TMP5461[(*result).Kind/8] &(1<<((*result).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(0) >= (NU)((*result).kindU.S6.Sons->Sup.len)) raiseIndexError();
			result = (*result).kindU.S6.Sons->data[0];
		}
		goto LA10;
		LA13: ;
		{
			NimStringDesc* LOC16;
			nimln(96, "evaltempl.nim");
			nimln(97, "evaltempl.nim");
			LOC16 = 0;
			LOC16 = rendertree_215051(result, 4);
			globalerror_168558((*result).Info, ((NU16) 1), LOC16);
		}
		LA10: ;
	}
	goto LA5;
	LA8: ;
	{
		NI i_395345;
		NI HEX3Atmp_395378;
		NI LOC22;
		NI TMP5468;
		NI res_395380;
		nimln(99, "evaltempl.nim");
		result = copynode_192243(body);
		nimln(100, "evaltempl.nim");
		nimln(100, "evaltempl.nim");
		nimln(100, "evaltempl.nim");
		ctx.Instlines = !(((*body).Kind == ((NU8) 114) || (*body).Kind == ((NU8) 125) || (*body).Kind == ((NU8) 111) || (*body).Kind == ((NU8) 126)));
		nimln(102, "evaltempl.nim");
		{
			if (!ctx.Instlines) goto LA20;
			nimln(102, "evaltempl.nim");
			(*result).Info = (*n).Info;
		}
		LA20: ;
		i_395345 = 0;
		HEX3Atmp_395378 = 0;
		nimln(103, "evaltempl.nim");
		nimln(103, "evaltempl.nim");
		nimln(103, "evaltempl.nim");
		LOC22 = 0;
		LOC22 = safelen_192330(body);
		TMP5468 = subInt(LOC22, 1);
		HEX3Atmp_395378 = (NI64)(TMP5468);
		nimln(1451, "system.nim");
		res_395380 = 0;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_395380 <= HEX3Atmp_395378)) goto LA23;
			nimln(1451, "system.nim");
			i_395345 = res_395380;
			nimln(104, "evaltempl.nim");
			if (((TMP5461[(*body).Kind/8] &(1<<((*body).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395345) >= (NU)((*body).kindU.S6.Sons->Sup.len)) raiseIndexError();
			evaltemplateaux_395024((*body).kindU.S6.Sons->data[i_395345], args, &ctx, result);
			nimln(1454, "system.nim");
			res_395380 = addInt(res_395380, 1);
		} LA23: ;
	}
	LA5: ;
	nimln(106, "evaltempl.nim");
	evaltemplatecounter_395273 = subInt(evaltemplatecounter_395273, 1);
	popFrame();
	return result;
}
Ejemplo n.º 8
0
N_NIMCALL(void, importforwarded_259633)(tcontext254019* c, tnode191813* n, tintset188047* exceptset) {
	nimfr("importForwarded", "importer.nim")
	nimln(133, "importer.nim");
	{
		nimln(133, "importer.nim");
		if (!n == 0) goto LA3;
		nimln(133, "importer.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(134, "importer.nim");
	switch ((*n).Kind) {
	case ((NU8) 117):
	{
		tnode191813* a_259649;
		NI i_259860;
		NI HEX3Atmp_259862;
		NI LOC6;
		NI res_259864;
		a_259649 = 0;
		i_259860 = 0;
		HEX3Atmp_259862 = 0;
		nimln(1521, "ast.nim");
		nimln(1521, "ast.nim");
		nimln(1521, "ast.nim");
		LOC6 = 0;
		LOC6 = len_192274(n);
		HEX3Atmp_259862 = subInt(LOC6, 1);
		nimln(1458, "system.nim");
		res_259864 = 0;
		nimln(1459, "system.nim");
		while (1) {
			tsym191843* s;
			nimln(1459, "system.nim");
			if (!(res_259864 <= HEX3Atmp_259862)) goto LA7;
			nimln(1458, "system.nim");
			i_259860 = res_259864;
			nimln(1521, "ast.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(i_259860) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			a_259649 = (*n).kindU.S6.Sons->data[i_259860];
			nimln(137, "importer.nim");
			{
				nimln(137, "importer.nim");
				nimln(137, "importer.nim");
				if (!!(((*a_259649).Kind == ((NU8) 3)))) goto LA10;
				nimln(137, "importer.nim");
				failedassertimpl_81621(((NimStringDesc*) &TMP3289));
			}
			LA10: ;
			nimln(138, "importer.nim");
			if (!(((TMP3274[(*a_259649).Kind/8] &(1<<((*a_259649).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3275));
			s = (*a_259649).kindU.S4.Sym;
			nimln(139, "importer.nim");
			{
				nimln(139, "importer.nim");
				if (!((*s).Kind == ((NU8) 6))) goto LA14;
				nimln(140, "importer.nim");
				importallsymbolsexcept_259529(c, s, exceptset);
			}
			goto LA12;
			LA14: ;
			{
				NIM_BOOL LOC17;
				NIM_BOOL LOC19;
				nimln(141, "importer.nim");
				LOC17 = 0;
				nimln(141, "importer.nim");
				LOC17 = empty_189342(exceptset);
				if (LOC17) goto LA18;
				nimln(141, "importer.nim");
				nimln(141, "importer.nim");
				LOC19 = 0;
				LOC19 = contains_188838(exceptset, (*(*s).Name).Sup.Id);
				LOC17 = !(LOC19);
				LA18: ;
				if (!LOC17) goto LA20;
				nimln(142, "importer.nim");
				rawimportsymbol_259235(c, s);
			}
			goto LA12;
			LA20: ;
			LA12: ;
			nimln(1461, "system.nim");
			res_259864 = addInt(res_259864, 1);
		} LA7: ;
	}
	break;
	case ((NU8) 118):
	{
		nimln(144, "importer.nim");
		localerror_168571((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3290));
	}
	break;
	default:
	{
		NI i_259844;
		NI HEX3Atmp_259865;
		NI LOC24;
		NI TMP3291;
		NI res_259867;
		i_259844 = 0;
		HEX3Atmp_259865 = 0;
		nimln(146, "importer.nim");
		nimln(146, "importer.nim");
		nimln(146, "importer.nim");
		LOC24 = 0;
		LOC24 = safelen_192330(n);
		TMP3291 = subInt(LOC24, 1);
		HEX3Atmp_259865 = (NI64)(TMP3291);
		nimln(1458, "system.nim");
		res_259867 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_259867 <= HEX3Atmp_259865)) goto LA25;
			nimln(1458, "system.nim");
			i_259844 = res_259867;
			nimln(147, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(i_259844) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			importforwarded_259633(c, (*n).kindU.S6.Sons->data[i_259844], exceptset);
			nimln(1461, "system.nim");
			res_259867 = addInt(res_259867, 1);
		} LA25: ;
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}
Ejemplo n.º 9
0
N_NIMCALL(tnode191813*, evalfrom_259007)(tcontext254019* c, tnode191813* n) {
	tnode191813* result;
	tsym191843* m;
	nimfr("evalFrom", "importer.nim")
	result = 0;
	nimln(177, "importer.nim");
	result = n;
	nimln(178, "importer.nim");
	checkminsonslen_255222(n, 2);
	nimln(179, "importer.nim");
	if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
	if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
	m = myimportmodule_259982(c, (*n).kindU.S6.Sons->data[0]);
	nimln(180, "importer.nim");
	{
		NI i_260125;
		NI HEX3Atmp_260163;
		NI LOC5;
		NI TMP3294;
		NI res_260165;
		nimln(180, "importer.nim");
		nimln(180, "importer.nim");
		if (!!((m == NIM_NIL))) goto LA3;
		nimln(181, "importer.nim");
		if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[0], newsymnode_192105(m));
		nimln(182, "importer.nim");
		adddecl_256550(c, m);
		i_260125 = 0;
		HEX3Atmp_260163 = 0;
		nimln(183, "importer.nim");
		nimln(183, "importer.nim");
		nimln(183, "importer.nim");
		LOC5 = 0;
		LOC5 = sonslen_192191(n);
		TMP3294 = subInt(LOC5, 1);
		HEX3Atmp_260163 = (NI64)(TMP3294);
		nimln(1451, "system.nim");
		res_260165 = 1;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_260165 <= HEX3Atmp_260163)) goto LA6;
			nimln(1451, "system.nim");
			i_260125 = res_260165;
			nimln(184, "importer.nim");
			{
				nimln(184, "importer.nim");
				nimln(184, "importer.nim");
				if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
				if ((NU)(i_260125) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				if (!!(((*(*n).kindU.S6.Sons->data[i_260125]).Kind == ((NU8) 23)))) goto LA9;
				nimln(185, "importer.nim");
				if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
				if ((NU)(i_260125) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				importsymbol_259416(c, (*n).kindU.S6.Sons->data[i_260125], m);
			}
			LA9: ;
			nimln(1454, "system.nim");
			res_260165 = addInt(res_260165, 1);
		} LA6: ;
	}
	LA3: ;
	popFrame();
	return result;
}
Ejemplo n.º 10
0
N_NIMCALL(tsym186843*, ithfield_415007)(tnode186813* n, NI field) {
	tsym186843* result;
	nimfr("ithField", "semmacrosanity.nim")
	result = 0;
	nimln(16, "semmacrosanity.nim");
	result = NIM_NIL;
	nimln(17, "semmacrosanity.nim");
	switch ((*n).Kind) {
	case ((NU8) 136):
	{
		NI i_415024;
		NI HEX3Atmp_415182;
		NI LOC2;
		NI TMP5676;
		NI res_415184;
		i_415024 = 0;
		HEX3Atmp_415182 = 0;
		nimln(19, "semmacrosanity.nim");
		nimln(19, "semmacrosanity.nim");
		nimln(19, "semmacrosanity.nim");
		LOC2 = 0;
		LOC2 = sonslen_187191(n);
		TMP5676 = subInt(LOC2, 1);
		HEX3Atmp_415182 = (NI32)(TMP5676);
		nimln(1450, "system.nim");
		res_415184 = 0;
		nimln(1451, "system.nim");
		while (1) {
			NI TMP5677;
			nimln(1451, "system.nim");
			if (!(res_415184 <= HEX3Atmp_415182)) goto LA3;
			nimln(1450, "system.nim");
			i_415024 = res_415184;
			nimln(20, "semmacrosanity.nim");
			if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
			if ((NU)(i_415024) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			nimln(20, "semmacrosanity.nim");
			TMP5677 = subInt(field, i_415024);
			result = ithfield_415007((*n).kindU.S6.Sons->data[i_415024], (NI32)(TMP5677));
			nimln(21, "semmacrosanity.nim");
			{
				nimln(21, "semmacrosanity.nim");
				nimln(21, "semmacrosanity.nim");
				if (!!((result == NIM_NIL))) goto LA6;
				nimln(21, "semmacrosanity.nim");
				goto BeforeRet;
			}
			LA6: ;
			nimln(1453, "system.nim");
			res_415184 = addInt(res_415184, 1);
		} LA3: ;
	}
	break;
	case ((NU8) 137):
	{
		NI TMP5679;
		NI i_415122;
		NI HEX3Atmp_415186;
		NI LOC17;
		NI TMP5680;
		NI res_415188;
		nimln(23, "semmacrosanity.nim");
		{
			nimln(23, "semmacrosanity.nim");
			nimln(23, "semmacrosanity.nim");
			if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA11;
			nimln(23, "semmacrosanity.nim");
			internalerror_164591((*n).Info, ((NimStringDesc*) &TMP5678));
		}
		LA11: ;
		nimln(24, "semmacrosanity.nim");
		if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		nimln(24, "semmacrosanity.nim");
		TMP5679 = subInt(field, 1);
		result = ithfield_415007((*n).kindU.S6.Sons->data[0], (NI32)(TMP5679));
		nimln(25, "semmacrosanity.nim");
		{
			nimln(25, "semmacrosanity.nim");
			nimln(25, "semmacrosanity.nim");
			if (!!((result == NIM_NIL))) goto LA15;
			nimln(25, "semmacrosanity.nim");
			goto BeforeRet;
		}
		LA15: ;
		i_415122 = 0;
		HEX3Atmp_415186 = 0;
		nimln(26, "semmacrosanity.nim");
		nimln(26, "semmacrosanity.nim");
		nimln(26, "semmacrosanity.nim");
		LOC17 = 0;
		LOC17 = sonslen_187191(n);
		TMP5680 = subInt(LOC17, 1);
		HEX3Atmp_415186 = (NI32)(TMP5680);
		nimln(1450, "system.nim");
		res_415188 = 1;
		nimln(1451, "system.nim");
		while (1) {
			nimln(1451, "system.nim");
			if (!(res_415188 <= HEX3Atmp_415186)) goto LA18;
			nimln(1450, "system.nim");
			i_415122 = res_415188;
			nimln(27, "semmacrosanity.nim");
			if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
			if ((NU)(i_415122) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			switch ((*(*n).kindU.S6.Sons->data[i_415122]).Kind) {
			case ((NU8) 85):
			case ((NU8) 88):
			{
				tnode186813* LOC20;
				NI TMP5682;
				nimln(29, "semmacrosanity.nim");
				nimln(29, "semmacrosanity.nim");
				if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
				if ((NU)(i_415122) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC20 = 0;
				LOC20 = lastson_187199((*n).kindU.S6.Sons->data[i_415122]);
				nimln(29, "semmacrosanity.nim");
				TMP5682 = subInt(field, 1);
				result = ithfield_415007(LOC20, (NI32)(TMP5682));
				nimln(30, "semmacrosanity.nim");
				{
					nimln(30, "semmacrosanity.nim");
					nimln(30, "semmacrosanity.nim");
					if (!!((result == NIM_NIL))) goto LA23;
					nimln(30, "semmacrosanity.nim");
					goto BeforeRet;
				}
				LA23: ;
			}
			break;
			default:
			{
				nimln(31, "semmacrosanity.nim");
				internalerror_164591((*n).Info, ((NimStringDesc*) &TMP5683));
			}
			break;
			}
			nimln(1453, "system.nim");
			res_415188 = addInt(res_415188, 1);
		} LA18: ;
	}
	break;
	case ((NU8) 3):
	{
		nimln(33, "semmacrosanity.nim");
		{
			nimln(33, "semmacrosanity.nim");
			if (!(field == 0)) goto LA29;
			nimln(33, "semmacrosanity.nim");
			if (!(((TMP5684[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5685));
			result = (*n).kindU.S4.Sym;
		}
		LA29: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 11
0
N_NIMCALL(void, annotatetype_415194)(tnode186813* n, ttype186847* t) {
	ttype186847* x;
	nimfr("annotateType", "semmacrosanity.nim")
	nimln(37, "semmacrosanity.nim");
	x = skiptypes_190793(t, IL64(211106232576256));
	nimln(40, "semmacrosanity.nim");
	switch ((*n).Kind) {
	case ((NU8) 37):
	{
		nimln(42, "semmacrosanity.nim");
		{
			NI i_415229;
			NI HEX3Atmp_415404;
			NI LOC6;
			NI res_415406;
			nimln(42, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 17))) goto LA4;
			nimln(43, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
			i_415229 = 0;
			HEX3Atmp_415404 = 0;
			nimln(44, "semmacrosanity.nim");
			nimln(44, "semmacrosanity.nim");
			nimln(44, "semmacrosanity.nim");
			LOC6 = 0;
			LOC6 = len_187274(n);
			HEX3Atmp_415404 = subInt(LOC6, 1);
			nimln(1457, "system.nim");
			res_415406 = 0;
			nimln(1458, "system.nim");
			while (1) {
				tsym186843* field;
				nimln(1458, "system.nim");
				if (!(res_415406 <= HEX3Atmp_415404)) goto LA7;
				nimln(1457, "system.nim");
				i_415229 = res_415406;
				nimln(45, "semmacrosanity.nim");
				field = ithfield_415007((*x).N, i_415229);
				nimln(46, "semmacrosanity.nim");
				{
					NimStringDesc* LOC12;
					NimStringDesc* LOC13;
					nimln(46, "semmacrosanity.nim");
					if (!field == 0) goto LA10;
					nimln(46, "semmacrosanity.nim");
					nimln(46, "semmacrosanity.nim");
					LOC12 = 0;
					nimln(46, "semmacrosanity.nim");
					LOC13 = 0;
					LOC13 = nimIntToStr(i_415229);
					LOC12 = rawNewString(LOC13->Sup.len + 23);
appendString(LOC12, ((NimStringDesc*) &TMP5686));
appendString(LOC12, LOC13);
					globalerror_164565((*n).Info, LOC12);
				}
				goto LA8;
				LA10: ;
				{
					nimln(47, "semmacrosanity.nim");
					if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
					if ((NU)(i_415229) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
					annotatetype_415194((*n).kindU.S6.Sons->data[i_415229], (*field).Typ);
				}
				LA8: ;
				nimln(1460, "system.nim");
				res_415406 = addInt(res_415406, 1);
			} LA7: ;
		}
		goto LA2;
		LA4: ;
		{
			NI i_415286;
			NI HEX3Atmp_415408;
			NI LOC18;
			NI res_415410;
			nimln(48, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 18))) goto LA16;
			nimln(49, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
			i_415286 = 0;
			HEX3Atmp_415408 = 0;
			nimln(50, "semmacrosanity.nim");
			nimln(50, "semmacrosanity.nim");
			nimln(50, "semmacrosanity.nim");
			LOC18 = 0;
			LOC18 = len_187274(n);
			HEX3Atmp_415408 = subInt(LOC18, 1);
			nimln(1457, "system.nim");
			res_415410 = 0;
			nimln(1458, "system.nim");
			while (1) {
				nimln(1458, "system.nim");
				if (!(res_415410 <= HEX3Atmp_415408)) goto LA19;
				nimln(1457, "system.nim");
				i_415286 = res_415410;
				nimln(51, "semmacrosanity.nim");
				{
					NI LOC22;
					NimStringDesc* LOC25;
					NimStringDesc* LOC26;
					nimln(51, "semmacrosanity.nim");
					nimln(51, "semmacrosanity.nim");
					LOC22 = 0;
					LOC22 = len_190569(x);
					if (!(LOC22 <= i_415286)) goto LA23;
					nimln(51, "semmacrosanity.nim");
					nimln(51, "semmacrosanity.nim");
					LOC25 = 0;
					nimln(51, "semmacrosanity.nim");
					LOC26 = 0;
					LOC26 = nimIntToStr(i_415286);
					LOC25 = rawNewString(LOC26->Sup.len + 23);
appendString(LOC25, ((NimStringDesc*) &TMP5686));
appendString(LOC25, LOC26);
					globalerror_164565((*n).Info, LOC25);
				}
				goto LA20;
				LA23: ;
				{
					nimln(52, "semmacrosanity.nim");
					if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
					if ((NU)(i_415286) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
					if ((NU)(i_415286) >= (NU)((*x).Sons->Sup.len)) raiseIndexError();
					annotatetype_415194((*n).kindU.S6.Sons->data[i_415286], (*x).Sons->data[i_415286]);
				}
				LA20: ;
				nimln(1460, "system.nim");
				res_415410 = addInt(res_415410, 1);
			} LA19: ;
		}
		goto LA2;
		LA16: ;
		{
			NIM_BOOL LOC29;
			nimln(53, "semmacrosanity.nim");
			LOC29 = 0;
			nimln(53, "semmacrosanity.nim");
			LOC29 = ((*x).Kind == ((NU8) 25));
			if (!(LOC29)) goto LA30;
			nimln(53, "semmacrosanity.nim");
			LOC29 = ((*x).Callconv == ((NU8) 8));
			LA30: ;
			if (!LOC29) goto LA31;
			nimln(54, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
		}
		goto LA2;
		LA31: ;
		{
			nimln(56, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5687));
		}
		LA2: ;
	}
	break;
	case ((NU8) 41):
	{
		nimln(58, "semmacrosanity.nim");
		{
			tnode186813* m_415333;
			NI i_415413;
			NI HEX3Atmp_415415;
			NI LOC39;
			NI res_415417;
			nimln(58, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 4) || (*x).Kind == ((NU8) 16) || (*x).Kind == ((NU8) 24) || (*x).Kind == ((NU8) 27))) goto LA37;
			nimln(59, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
			m_415333 = 0;
			i_415413 = 0;
			HEX3Atmp_415415 = 0;
			nimln(1522, "ast.nim");
			nimln(1522, "ast.nim");
			nimln(1522, "ast.nim");
			LOC39 = 0;
			LOC39 = len_187274(n);
			HEX3Atmp_415415 = subInt(LOC39, 1);
			nimln(1457, "system.nim");
			res_415417 = 0;
			nimln(1458, "system.nim");
			while (1) {
				ttype186847* LOC41;
				nimln(1458, "system.nim");
				if (!(res_415417 <= HEX3Atmp_415415)) goto LA40;
				nimln(1457, "system.nim");
				i_415413 = res_415417;
				nimln(1522, "ast.nim");
				if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
				if ((NU)(i_415413) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				m_415333 = (*n).kindU.S6.Sons->data[i_415413];
				nimln(60, "semmacrosanity.nim");
				nimln(60, "semmacrosanity.nim");
				LOC41 = 0;
				LOC41 = elemtype_222559(x);
				annotatetype_415194(m_415333, LOC41);
				nimln(1460, "system.nim");
				res_415417 = addInt(res_415417, 1);
			} LA40: ;
		}
		goto LA35;
		LA37: ;
		{
			nimln(62, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5688));
		}
		LA35: ;
	}
	break;
	case ((NU8) 39):
	{
		nimln(64, "semmacrosanity.nim");
		{
			tnode186813* m_415348;
			NI i_415419;
			NI HEX3Atmp_415421;
			NI LOC48;
			NI res_415423;
			nimln(64, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 19))) goto LA46;
			nimln(65, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
			m_415348 = 0;
			i_415419 = 0;
			HEX3Atmp_415421 = 0;
			nimln(1522, "ast.nim");
			nimln(1522, "ast.nim");
			nimln(1522, "ast.nim");
			LOC48 = 0;
			LOC48 = len_187274(n);
			HEX3Atmp_415421 = subInt(LOC48, 1);
			nimln(1457, "system.nim");
			res_415423 = 0;
			nimln(1458, "system.nim");
			while (1) {
				ttype186847* LOC50;
				nimln(1458, "system.nim");
				if (!(res_415423 <= HEX3Atmp_415421)) goto LA49;
				nimln(1457, "system.nim");
				i_415419 = res_415423;
				nimln(1522, "ast.nim");
				if (((TMP5674[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5675));
				if ((NU)(i_415419) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				m_415348 = (*n).kindU.S6.Sons->data[i_415419];
				nimln(66, "semmacrosanity.nim");
				nimln(66, "semmacrosanity.nim");
				LOC50 = 0;
				LOC50 = elemtype_222559(x);
				annotatetype_415194(m_415348, LOC50);
				nimln(1460, "system.nim");
				res_415423 = addInt(res_415423, 1);
			} LA49: ;
		}
		goto LA44;
		LA46: ;
		{
			nimln(68, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5689));
		}
		LA44: ;
	}
	break;
	case ((NU8) 16) ... ((NU8) 19):
	{
		nimln(70, "semmacrosanity.nim");
		{
			nimln(70, "semmacrosanity.nim");
			if (!((*x).Kind >= ((NU8) 36) && (*x).Kind <= ((NU8) 39))) goto LA55;
			nimln(71, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
		}
		goto LA53;
		LA55: ;
		{
			nimln(73, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5690));
		}
		LA53: ;
	}
	break;
	case ((NU8) 5) ... ((NU8) 15):
	{
		nimln(75, "semmacrosanity.nim");
		{
			nimln(75, "semmacrosanity.nim");
			if (!((*x).Kind >= ((NU8) 31) && (*x).Kind <= ((NU8) 44) || (*x).Kind == ((NU8) 1) || (*x).Kind == ((NU8) 2) || (*x).Kind == ((NU8) 14))) goto LA61;
			nimln(76, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
		}
		goto LA59;
		LA61: ;
		{
			nimln(78, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5691));
		}
		LA59: ;
	}
	break;
	case ((NU8) 20) ... ((NU8) 22):
	{
		nimln(80, "semmacrosanity.nim");
		{
			nimln(80, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 28) || (*x).Kind == ((NU8) 29))) goto LA67;
			nimln(81, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
		}
		goto LA65;
		LA67: ;
		{
			nimln(83, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5692));
		}
		LA65: ;
	}
	break;
	case ((NU8) 23):
	{
		nimln(85, "semmacrosanity.nim");
		{
			nimln(85, "semmacrosanity.nim");
			if (!((*x).Kind == ((NU8) 26) || (*x).Kind == ((NU8) 29) || (*x).Kind == ((NU8) 22) || (*x).Kind == ((NU8) 21) || (*x).Kind == ((NU8) 24) || (*x).Kind == ((NU8) 25) || (*x).Kind == ((NU8) 28) || (*x).Kind == ((NU8) 50))) goto LA73;
			nimln(86, "semmacrosanity.nim");
			asgnRefNoCycle((void**) &(*n).Typ, t);
		}
		goto LA71;
		LA73: ;
		{
			nimln(88, "semmacrosanity.nim");
			globalerror_164565((*n).Info, ((NimStringDesc*) &TMP5693));
		}
		LA71: ;
	}
	break;
	default:
	{
	}
	break;
	}
	popFrame();
}
Ejemplo n.º 12
0
N_NIMCALL(void, compileconstraints_275106)(tnode186813* p, NimStringDesc** result) {
	nimfr("compileConstraints", "parampatterns.nim")
	nimln(57, "parampatterns.nim");
	switch ((*p).Kind) {
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		tident166019* op;
		nimln(59, "parampatterns.nim");
		{
			nimln(59, "parampatterns.nim");
			nimln(59, "parampatterns.nim");
			if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(0) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!!(((*(*p).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA4;
			nimln(60, "parampatterns.nim");
			if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(0) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
			patternerror_275040((*p).kindU.S6.Sons->data[0]);
			nimln(61, "parampatterns.nim");
			goto BeforeRet;
		}
		LA4: ;
		nimln(62, "parampatterns.nim");
		if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
		if ((NU)(0) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
		if (!(((TMP3576[(*(*p).kindU.S6.Sons->data[0]).Kind/8] &(1<<((*(*p).kindU.S6.Sons->data[0]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3577));
		op = (*(*p).kindU.S6.Sons->data[0]).kindU.S5.Ident;
		nimln(63, "parampatterns.nim");
		{
			NI LOC8;
			nimln(63, "parampatterns.nim");
			nimln(63, "parampatterns.nim");
			LOC8 = 0;
			LOC8 = len_187274(p);
			if (!(LOC8 == 3)) goto LA9;
			nimln(64, "parampatterns.nim");
			{
				NIM_BOOL LOC13;
				nimln(64, "parampatterns.nim");
				LOC13 = 0;
				nimln(64, "parampatterns.nim");
				LOC13 = eqStrings((*op).S, ((NimStringDesc*) &TMP3578));
				if (LOC13) goto LA14;
				nimln(64, "parampatterns.nim");
				LOC13 = ((*op).Sup.Id == 47);
				LA14: ;
				if (!LOC13) goto LA15;
				nimln(65, "parampatterns.nim");
				if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
				if ((NU)(1) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
				compileconstraints_275106((*p).kindU.S6.Sons->data[1], result);
				nimln(66, "parampatterns.nim");
				if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
				if ((NU)(2) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
				compileconstraints_275106((*p).kindU.S6.Sons->data[2], result);
				nimln(67, "parampatterns.nim");
				add_275046(result, ((NU8) 2));
			}
			goto LA11;
			LA15: ;
			{
				NIM_BOOL LOC18;
				nimln(68, "parampatterns.nim");
				LOC18 = 0;
				nimln(68, "parampatterns.nim");
				LOC18 = eqStrings((*op).S, ((NimStringDesc*) &TMP3579));
				if (LOC18) goto LA19;
				nimln(68, "parampatterns.nim");
				LOC18 = ((*op).Sup.Id == 2);
				LA19: ;
				if (!LOC18) goto LA20;
				nimln(69, "parampatterns.nim");
				if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
				if ((NU)(1) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
				compileconstraints_275106((*p).kindU.S6.Sons->data[1], result);
				nimln(70, "parampatterns.nim");
				if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
				if ((NU)(2) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
				compileconstraints_275106((*p).kindU.S6.Sons->data[2], result);
				nimln(71, "parampatterns.nim");
				add_275046(result, ((NU8) 3));
			}
			goto LA11;
			LA20: ;
			{
				nimln(73, "parampatterns.nim");
				patternerror_275040(p);
			}
			LA11: ;
		}
		goto LA6;
		LA9: ;
		{
			NIM_BOOL LOC24;
			NI LOC25;
			NIM_BOOL LOC27;
			nimln(74, "parampatterns.nim");
			LOC24 = 0;
			nimln(74, "parampatterns.nim");
			nimln(74, "parampatterns.nim");
			LOC25 = 0;
			LOC25 = len_187274(p);
			LOC24 = (LOC25 == 2);
			if (!(LOC24)) goto LA26;
			nimln(74, "parampatterns.nim");
			LOC27 = 0;
			nimln(74, "parampatterns.nim");
			LOC27 = eqStrings((*op).S, ((NimStringDesc*) &TMP3580));
			if (LOC27) goto LA28;
			nimln(74, "parampatterns.nim");
			LOC27 = ((*op).Sup.Id == 43);
			LA28: ;
			LOC24 = LOC27;
			LA26: ;
			if (!LOC24) goto LA29;
			nimln(75, "parampatterns.nim");
			if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(1) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
			compileconstraints_275106((*p).kindU.S6.Sons->data[1], result);
			nimln(76, "parampatterns.nim");
			add_275046(result, ((NU8) 4));
		}
		goto LA6;
		LA29: ;
		{
			nimln(78, "parampatterns.nim");
			patternerror_275040(p);
		}
		LA6: ;
	}
	break;
	case ((NU8) 53):
	case ((NU8) 37):
	{
		nimln(80, "parampatterns.nim");
		{
			NI LOC35;
			nimln(80, "parampatterns.nim");
			nimln(80, "parampatterns.nim");
			LOC35 = 0;
			LOC35 = len_187274(p);
			if (!(LOC35 == 1)) goto LA36;
			nimln(81, "parampatterns.nim");
			if (((TMP3574[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(0) >= (NU)((*p).kindU.S6.Sons->Sup.len)) raiseIndexError();
			compileconstraints_275106((*p).kindU.S6.Sons->data[0], result);
		}
		goto LA33;
		LA36: ;
		{
			nimln(83, "parampatterns.nim");
			patternerror_275040(p);
		}
		LA33: ;
	}
	break;
	case ((NU8) 2):
	{
		NimStringDesc* spec;
		nimln(85, "parampatterns.nim");
		if (!(((TMP3576[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3577));
		spec = nsuNormalize((*(*p).kindU.S5.Ident).S);
		nimln(86, "parampatterns.nim");
		switch (hashString(spec) & 15) {
		case 1: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3591))) goto LA50;
break;
		case 3: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3587))) goto LA46;
if (eqStrings(spec, ((NimStringDesc*) &TMP3588))) goto LA47;
if (eqStrings(spec, ((NimStringDesc*) &TMP3590))) goto LA49;
break;
		case 4: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3583))) goto LA42;
break;
		case 6: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3584))) goto LA43;
if (eqStrings(spec, ((NimStringDesc*) &TMP3589))) goto LA48;
break;
		case 11: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3581))) goto LA40;
break;
		case 12: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3582))) goto LA41;
break;
		case 13: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3585))) goto LA44;
break;
		case 14: 
if (eqStrings(spec, ((NimStringDesc*) &TMP3586))) goto LA45;
break;
		}
		goto LA51;
		LA40: ;
		{
			nimln(87, "parampatterns.nim");
			add_275046(result, ((NU8) 6));
		}
		goto LA52;
		LA41: ;
		{
			nimln(88, "parampatterns.nim");
			add_275046(result, ((NU8) 7));
		}
		goto LA52;
		LA42: ;
		{
			nimln(89, "parampatterns.nim");
			add_275046(result, ((NU8) 5));
		}
		goto LA52;
		LA43: ;
		{
			nimln(90, "parampatterns.nim");
			add_275046(result, ((NU8) 8));
		}
		goto LA52;
		LA44: ;
		{
			nimln(91, "parampatterns.nim");
			add_275046(result, ((NU8) 9));
		}
		goto LA52;
		LA45: ;
		{
			nimln(92, "parampatterns.nim");
			if ((NU)(0) > (NU)((*result)->Sup.len)) raiseIndexError();
			(*result)->data[0] = 2;
		}
		goto LA52;
		LA46: ;
		{
			nimln(93, "parampatterns.nim");
			if ((NU)(0) > (NU)((*result)->Sup.len)) raiseIndexError();
			(*result)->data[0] = 3;
		}
		goto LA52;
		LA47: ;
		{
			nimln(94, "parampatterns.nim");
			add_275046(result, ((NU8) 12));
		}
		goto LA52;
		LA48: ;
		{
			nimln(95, "parampatterns.nim");
			add_275046(result, ((NU8) 13));
		}
		goto LA52;
		LA49: ;
		{
			nimln(96, "parampatterns.nim");
			add_275046(result, ((NU8) 14));
		}
		goto LA52;
		LA50: ;
		{
			nimln(97, "parampatterns.nim");
			add_275046(result, ((NU8) 15));
		}
		goto LA52;
		LA51: ;
		{
			NU8 i_275371;
			NU8 res_275461;
			NU8 i_275442;
			NU8 res_275466;
			nimln(849, "msgs.nim");
			{
				NimStringDesc* LOC69;
				if (!NIM_FALSE) goto LA67;
				nimln(849, "msgs.nim");
				nimln(849, "msgs.nim");
				LOC69 = 0;
				LOC69 = HEX24_164714(TMP3592);
				internalerror_164606(LOC69);
			}
			LA67: ;
			i_275371 = 0;
			nimln(1457, "system.nim");
			res_275461 = ((NU8) 0);
			nimln(1458, "system.nim");
			while (1) {
				nimln(1458, "system.nim");
				if (!(res_275461 <= ((NU8) 24))) goto LA70;
				nimln(1457, "system.nim");
				i_275371 = res_275461;
				nimln(102, "parampatterns.nim");
				{
					NimStringDesc* LOC73;
					NI LOC74;
					nimln(102, "parampatterns.nim");
					nimln(102, "parampatterns.nim");
					nimln(102, "parampatterns.nim");
					nimln(102, "parampatterns.nim");
					LOC73 = 0;
					LOC73 = copyStr(reprEnum(i_275371, (&NTI186451)), 2);
					LOC74 = 0;
					LOC74 = nsuCmpIgnoreStyle(LOC73, spec);
					if (!(LOC74 == 0)) goto LA75;
					nimln(103, "parampatterns.nim");
					add_275046(result, ((NU8) 10));
					nimln(104, "parampatterns.nim");
					nimln(104, "parampatterns.nim");
					nimln(104, "parampatterns.nim");
					(*result) = addChar((*result), ((NIM_CHAR) (((NI) (i_275371)))));
					nimln(105, "parampatterns.nim");
					goto BeforeRet;
				}
				LA75: ;
				nimln(1460, "system.nim");
				res_275461 = addInt(res_275461, 1);
			} LA70: ;
			nimln(849, "msgs.nim");
			{
				NimStringDesc* LOC81;
				if (!NIM_FALSE) goto LA79;
				nimln(849, "msgs.nim");
				nimln(849, "msgs.nim");
				LOC81 = 0;
				LOC81 = HEX24_164714(TMP3594);
				internalerror_164606(LOC81);
			}
			LA79: ;
			i_275442 = 0;
			nimln(1457, "system.nim");
			res_275466 = ((NU8) 0);
			nimln(1458, "system.nim");
			while (1) {
				nimln(1458, "system.nim");
				if (!(res_275466 <= ((NU8) 156))) goto LA82;
				nimln(1457, "system.nim");
				i_275442 = res_275466;
				nimln(109, "parampatterns.nim");
				{
					NI LOC85;
					nimln(109, "parampatterns.nim");
					nimln(109, "parampatterns.nim");
					nimln(109, "parampatterns.nim");
					LOC85 = 0;
					LOC85 = nsuCmpIgnoreStyle(reprEnum(i_275442, (&NTI186023)), spec);
					if (!(LOC85 == 0)) goto LA86;
					nimln(110, "parampatterns.nim");
					add_275046(result, ((NU8) 11));
					nimln(111, "parampatterns.nim");
					nimln(111, "parampatterns.nim");
					nimln(111, "parampatterns.nim");
					(*result) = addChar((*result), ((NIM_CHAR) (((NI) (i_275442)))));
					nimln(112, "parampatterns.nim");
					goto BeforeRet;
				}
				LA86: ;
				nimln(1460, "system.nim");
				res_275466 = addInt(res_275466, 1);
			} LA82: ;
			nimln(113, "parampatterns.nim");
			patternerror_275040(p);
		}
		LA52: ;
	}
	break;
	default:
	{
		nimln(115, "parampatterns.nim");
		patternerror_275040(p);
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}
Ejemplo n.º 13
0
N_NIMCALL(NIM_BOOL, matchnodekinds_276321)(tnode186813* p, tnode186813* n) {
	NIM_BOOL result;
	TY276326 stack;
	NI sp;
	NimStringDesc* code;
	NI pc;
	NI TMP3609;
	nimfr("matchNodeKinds", "parampatterns.nim")
	result = 0;
	nimln(226, "parampatterns.nim");
	stack[(0)- 0] = NIM_TRUE;
	nimln(227, "parampatterns.nim");
	sp = 1;
	nimln(233, "parampatterns.nim");
	if (!(((TMP3572[(*p).Kind/8] &(1<<((*p).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3573));
	code = (*p).kindU.S3.Strval;
	nimln(234, "parampatterns.nim");
	pc = 1;
	nimln(235, "parampatterns.nim");
	while (1) {
		nimln(236, "parampatterns.nim");
		if ((NU)(pc) > (NU)(code->Sup.len)) raiseIndexError();
		switch (((NU8)chckRange(((NU8)(code->data[pc])), ((NU8) 1), ((NU8) 15)))) {
		case ((NU8) 1):
		{
			nimln(237, "parampatterns.nim");
			goto LA1;
		}
		break;
		case ((NU8) 2):
		{
			NI TMP3599;
			NIM_BOOL LOC4;
			NI TMP3600;
			NI TMP3601;
			nimln(239, "parampatterns.nim");
			nimln(239, "parampatterns.nim");
			TMP3599 = subInt(sp, 2);
			if ((NU)((NI32)(TMP3599)) > (NU)(64)) raiseIndexError();
			nimln(239, "parampatterns.nim");
			LOC4 = 0;
			nimln(239, "parampatterns.nim");
			TMP3600 = subInt(sp, 1);
			if ((NU)((NI32)(TMP3600)) > (NU)(64)) raiseIndexError();
			LOC4 = stack[((NI32)(TMP3600))- 0];
			if (LOC4) goto LA5;
			nimln(239, "parampatterns.nim");
			TMP3601 = subInt(sp, 2);
			if ((NU)((NI32)(TMP3601)) > (NU)(64)) raiseIndexError();
			LOC4 = stack[((NI32)(TMP3601))- 0];
			LA5: ;
			stack[((NI32)(TMP3599))- 0] = LOC4;
			nimln(240, "parampatterns.nim");
			sp = subInt(sp, 1);
		}
		break;
		case ((NU8) 3):
		{
			NI TMP3602;
			NIM_BOOL LOC7;
			NI TMP3603;
			NI TMP3604;
			nimln(242, "parampatterns.nim");
			nimln(242, "parampatterns.nim");
			TMP3602 = subInt(sp, 2);
			if ((NU)((NI32)(TMP3602)) > (NU)(64)) raiseIndexError();
			nimln(242, "parampatterns.nim");
			LOC7 = 0;
			nimln(242, "parampatterns.nim");
			TMP3603 = subInt(sp, 1);
			if ((NU)((NI32)(TMP3603)) > (NU)(64)) raiseIndexError();
			LOC7 = stack[((NI32)(TMP3603))- 0];
			if (!(LOC7)) goto LA8;
			nimln(242, "parampatterns.nim");
			TMP3604 = subInt(sp, 2);
			if ((NU)((NI32)(TMP3604)) > (NU)(64)) raiseIndexError();
			LOC7 = stack[((NI32)(TMP3604))- 0];
			LA8: ;
			stack[((NI32)(TMP3602))- 0] = LOC7;
			nimln(243, "parampatterns.nim");
			sp = subInt(sp, 1);
		}
		break;
		case ((NU8) 4):
		{
			NI TMP3605;
			NI TMP3606;
			nimln(244, "parampatterns.nim");
			nimln(244, "parampatterns.nim");
			TMP3605 = subInt(sp, 1);
			if ((NU)((NI32)(TMP3605)) > (NU)(64)) raiseIndexError();
			nimln(244, "parampatterns.nim");
			nimln(244, "parampatterns.nim");
			TMP3606 = subInt(sp, 1);
			if ((NU)((NI32)(TMP3606)) > (NU)(64)) raiseIndexError();
			stack[((NI32)(TMP3605))- 0] = !(stack[((NI32)(TMP3606))- 0]);
		}
		break;
		case ((NU8) 5):
		{
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(245, "parampatterns.nim");
			stack[(sp)- 0] = ((*n).Kind == ((NU8) 3));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 6):
		{
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			stack[(sp)- 0] = isatom_193186(n);
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 7):
		{
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(247, "parampatterns.nim");
			stack[(sp)- 0] = ((*n).Kind >= ((NU8) 5) && (*n).Kind <= ((NU8) 23));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 8):
		{
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(248, "parampatterns.nim");
			stack[(sp)- 0] = ((*n).Kind == ((NU8) 2));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 9):
		{
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(249, "parampatterns.nim");
			stack[(sp)- 0] = ((*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));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 10):
		{
			NU8 kind;
			NI TMP3607;
			NIM_BOOL LOC16;
			nimln(251, "parampatterns.nim");
			nimln(251, "parampatterns.nim");
			TMP3607 = addInt(pc, 1);
			if ((NU)((NI32)(TMP3607)) > (NU)(code->Sup.len)) raiseIndexError();
			kind = ((NU8)chckRange(((NU8)(code->data[(NI32)(TMP3607)])), ((NU8) 0), ((NU8) 24)));
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(252, "parampatterns.nim");
			LOC16 = 0;
			nimln(252, "parampatterns.nim");
			LOC16 = ((*n).Kind == ((NU8) 3));
			if (!(LOC16)) goto LA17;
			nimln(252, "parampatterns.nim");
			if (!(((TMP3597[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3598));
			LOC16 = ((*(*n).kindU.S4.Sym).Kind == kind);
			LA17: ;
			stack[(sp)- 0] = LOC16;
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
			nimln(253, "parampatterns.nim");
			pc = addInt(pc, 1);
		}
		break;
		case ((NU8) 11):
		{
			NU8 kind;
			NI TMP3608;
			nimln(255, "parampatterns.nim");
			nimln(255, "parampatterns.nim");
			TMP3608 = addInt(pc, 1);
			if ((NU)((NI32)(TMP3608)) > (NU)(code->Sup.len)) raiseIndexError();
			kind = ((NU8)chckRange(((NU8)(code->data[(NI32)(TMP3608)])), ((NU8) 0), ((NU8) 156)));
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(256, "parampatterns.nim");
			stack[(sp)- 0] = ((*n).Kind == kind);
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
			nimln(257, "parampatterns.nim");
			pc = addInt(pc, 1);
		}
		break;
		case ((NU8) 12):
		{
			NU8 LOC20;
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(258, "parampatterns.nim");
			nimln(258, "parampatterns.nim");
			LOC20 = 0;
			LOC20 = isassignable_275970(NIM_NIL, n);
			stack[(sp)- 0] = ((6 &(1<<((LOC20)&7)))!=0);
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 13):
		{
			NU8 LOC22;
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(259, "parampatterns.nim");
			nimln(259, "parampatterns.nim");
			LOC22 = 0;
			LOC22 = isassignable_275970(NIM_NIL, n);
			stack[(sp)- 0] = (LOC22 == ((NU8) 2));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 14):
		{
			NU8 LOC24;
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(260, "parampatterns.nim");
			nimln(260, "parampatterns.nim");
			LOC24 = 0;
			LOC24 = checkforsideeffects_275740(n);
			stack[(sp)- 0] = (LOC24 == ((NU8) 1));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		case ((NU8) 15):
		{
			NU8 LOC26;
			nimln(230, "parampatterns.nim");
			if ((NU)(sp) > (NU)(64)) raiseIndexError();
			nimln(261, "parampatterns.nim");
			nimln(261, "parampatterns.nim");
			nimln(261, "parampatterns.nim");
			LOC26 = 0;
			LOC26 = checkforsideeffects_275740(n);
			stack[(sp)- 0] = !((LOC26 == ((NU8) 1)));
			nimln(231, "parampatterns.nim");
			sp = addInt(sp, 1);
		}
		break;
		}
		nimln(262, "parampatterns.nim");
		pc = addInt(pc, 1);
	} LA1: ;
	nimln(263, "parampatterns.nim");
	nimln(263, "parampatterns.nim");
	TMP3609 = subInt(sp, 1);
	if ((NU)((NI32)(TMP3609)) > (NU)(64)) raiseIndexError();
	result = stack[((NI32)(TMP3609))- 0];
	popFrame();
	return result;
}
Ejemplo n.º 14
0
N_NIMCALL(NU8, checkforsideeffects_275740)(tnode186813* n) {
	NU8 result;
	nimfr("checkForSideEffects", "parampatterns.nim")
	result = 0;
	nimln(139, "parampatterns.nim");
	switch ((*n).Kind) {
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		tnode186813* op;
		NI i_275844;
		NI HEX3Atmp_275951;
		NI LOC16;
		NI res_275953;
		nimln(142, "parampatterns.nim");
		if (((TMP3574[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		op = (*n).kindU.S6.Sons->data[0];
		nimln(143, "parampatterns.nim");
		{
			NIM_BOOL LOC4;
			tsym186843* s;
			nimln(143, "parampatterns.nim");
			LOC4 = 0;
			nimln(143, "parampatterns.nim");
			LOC4 = ((*op).Kind == ((NU8) 3));
			if (!(LOC4)) goto LA5;
			nimln(143, "parampatterns.nim");
			if (!(((TMP3597[(*op).Kind/8] &(1<<((*op).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3598));
			LOC4 = isroutine_193040((*op).kindU.S4.Sym);
			LA5: ;
			if (!LOC4) goto LA6;
			nimln(144, "parampatterns.nim");
			if (!(((TMP3597[(*op).Kind/8] &(1<<((*op).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3598));
			s = (*op).kindU.S4.Sym;
			nimln(145, "parampatterns.nim");
			{
				nimln(145, "parampatterns.nim");
				if (!(((*s).Flags &(1<<((((NU8) 11))&31)))!=0)) goto LA10;
				nimln(146, "parampatterns.nim");
				nimln(146, "parampatterns.nim");
				result = ((NU8) 1);
				goto BeforeRet;
			}
			LA10: ;
			nimln(148, "parampatterns.nim");
			result = ((NU8) 2);
		}
		goto LA2;
		LA6: ;
		{
			nimln(149, "parampatterns.nim");
			if (!(((*(*op).Typ).Flags &(1<<((((NU8) 1))&31)))!=0)) goto LA13;
			nimln(151, "parampatterns.nim");
			result = ((NU8) 2);
		}
		goto LA2;
		LA13: ;
		{
			nimln(154, "parampatterns.nim");
			nimln(154, "parampatterns.nim");
			result = ((NU8) 1);
			goto BeforeRet;
		}
		LA2: ;
		i_275844 = 0;
		HEX3Atmp_275951 = 0;
		nimln(156, "parampatterns.nim");
		nimln(156, "parampatterns.nim");
		nimln(156, "parampatterns.nim");
		LOC16 = 0;
		LOC16 = len_187274(n);
		HEX3Atmp_275951 = subInt(LOC16, 1);
		nimln(1457, "system.nim");
		res_275953 = 0;
		nimln(1458, "system.nim");
		while (1) {
			NU8 ret;
			nimln(1458, "system.nim");
			if (!(res_275953 <= HEX3Atmp_275951)) goto LA17;
			nimln(1457, "system.nim");
			i_275844 = res_275953;
			nimln(157, "parampatterns.nim");
			if (((TMP3574[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(i_275844) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			ret = checkforsideeffects_275740((*n).kindU.S6.Sons->data[i_275844]);
			nimln(158, "parampatterns.nim");
			{
				nimln(158, "parampatterns.nim");
				if (!(ret == ((NU8) 1))) goto LA20;
				nimln(158, "parampatterns.nim");
				nimln(158, "parampatterns.nim");
				result = ret;
				goto BeforeRet;
			}
			goto LA18;
			LA20: ;
			{
				NIM_BOOL LOC23;
				nimln(159, "parampatterns.nim");
				LOC23 = 0;
				nimln(159, "parampatterns.nim");
				LOC23 = (ret == ((NU8) 0));
				if (!(LOC23)) goto LA24;
				nimln(159, "parampatterns.nim");
				LOC23 = (result == ((NU8) 2));
				LA24: ;
				if (!LOC23) goto LA25;
				nimln(160, "parampatterns.nim");
				result = ((NU8) 0);
			}
			goto LA18;
			LA25: ;
			LA18: ;
			nimln(1460, "system.nim");
			res_275953 = addInt(res_275953, 1);
		} LA17: ;
	}
	break;
	case ((NU8) 0) ... ((NU8) 23):
	{
		nimln(163, "parampatterns.nim");
		result = ((NU8) 2);
	}
	break;
	default:
	{
		NI i_275908;
		NI HEX3Atmp_275955;
		NI LOC29;
		NI res_275957;
		i_275908 = 0;
		HEX3Atmp_275955 = 0;
		nimln(165, "parampatterns.nim");
		nimln(165, "parampatterns.nim");
		nimln(165, "parampatterns.nim");
		LOC29 = 0;
		LOC29 = len_187274(n);
		HEX3Atmp_275955 = subInt(LOC29, 1);
		nimln(1457, "system.nim");
		res_275957 = 0;
		nimln(1458, "system.nim");
		while (1) {
			NU8 ret;
			nimln(1458, "system.nim");
			if (!(res_275957 <= HEX3Atmp_275955)) goto LA30;
			nimln(1457, "system.nim");
			i_275908 = res_275957;
			nimln(166, "parampatterns.nim");
			if (((TMP3574[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3575));
			if ((NU)(i_275908) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			ret = checkforsideeffects_275740((*n).kindU.S6.Sons->data[i_275908]);
			nimln(167, "parampatterns.nim");
			{
				nimln(167, "parampatterns.nim");
				if (!(ret == ((NU8) 1))) goto LA33;
				nimln(167, "parampatterns.nim");
				nimln(167, "parampatterns.nim");
				result = ret;
				goto BeforeRet;
			}
			goto LA31;
			LA33: ;
			{
				NIM_BOOL LOC36;
				nimln(168, "parampatterns.nim");
				LOC36 = 0;
				nimln(168, "parampatterns.nim");
				LOC36 = (ret == ((NU8) 0));
				if (!(LOC36)) goto LA37;
				nimln(168, "parampatterns.nim");
				LOC36 = (result == ((NU8) 2));
				LA37: ;
				if (!LOC36) goto LA38;
				nimln(169, "parampatterns.nim");
				result = ((NU8) 0);
			}
			goto LA31;
			LA38: ;
			LA31: ;
			nimln(1460, "system.nim");
			res_275957 = addInt(res_275957, 1);
		} LA30: ;
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 15
0
N_NIMCALL(void, fillbuffer_179097)(Tbaselexer179024* L) {
	NI charsread;
	NI tocopy;
	NI s;
	NI oldbuflen;
	NI TMP2124;
	NI TMP2125;
	NI TMP2129;
	NI TMP2130;
	NI LOC13;
	NI TMP2131;
	NI TMP2132;
	nimfr("fillBuffer", "nimlexbase.nim")
	charsread = 0;
	tocopy = 0;
	s = 0;
	oldbuflen = 0;
	nimln(82, "nimlexbase.nim");
	{
		if (!!(((*L).sentinel < (*L).buflen))) goto LA3;
		failedassertimpl_87217(((NimStringDesc*) &TMP2123));
	}
	LA3: ;
	nimln(83, "nimlexbase.nim");
	TMP2124 = subInt((*L).buflen, (*L).sentinel);
	TMP2125 = subInt((NI)(TMP2124), ((NI) 1));
	tocopy = (NI)(TMP2125);
	nimln(84, "nimlexbase.nim");
	{
		if (!!((((NI) 0) <= tocopy))) goto LA7;
		failedassertimpl_87217(((NimStringDesc*) &TMP2126));
	}
	LA7: ;
	nimln(85, "nimlexbase.nim");
	{
		NI TMP2127;
		NI TMP2128;
		if (!(((NI) 0) < tocopy)) goto LA11;
		nimln(86, "nimlexbase.nim");
		TMP2127 = addInt((*L).sentinel, ((NI) 1));
		TMP2128 = mulInt(tocopy, ((NI) 1));
		memmove(((void*) ((*L).buf)), ((void*) ((&(*L).buf[(NI)(TMP2127)]))), ((NI)chckRange((NI)(TMP2128), ((NI) 0), ((NI) 2147483647))));
	}
	LA11: ;
	nimln(88, "nimlexbase.nim");
	nimln(89, "nimlexbase.nim");
	nimln(88, "nimlexbase.nim");
	nimln(89, "nimlexbase.nim");
	TMP2129 = addInt((*L).sentinel, ((NI) 1));
	TMP2130 = mulInt((NI)(TMP2129), ((NI) 1));
	LOC13 = 0;
	LOC13 = llstreamread_178584((*L).stream, ((void*) ((&(*L).buf[tocopy]))), (NI)(TMP2130));
	TMP2131 = divInt(LOC13, ((NI) 1));
	charsread = (NI)(TMP2131);
	nimln(90, "nimlexbase.nim");
	TMP2132 = addInt(tocopy, charsread);
	s = (NI)(TMP2132);
	nimln(91, "nimlexbase.nim");
	{
		NI TMP2133;
		TMP2133 = addInt((*L).sentinel, ((NI) 1));
		if (!(charsread < (NI)(TMP2133))) goto LA16;
		nimln(92, "nimlexbase.nim");
		(*L).buf[s] = 0;
		nimln(93, "nimlexbase.nim");
		(*L).sentinel = s;
	}
	goto LA14;
	LA16: ;
	{
		NI TMP2134;
		nimln(96, "nimlexbase.nim");
		TMP2134 = subInt(s, ((NI) 1));
		s = (NI)(TMP2134);
		{
			nimln(97, "nimlexbase.nim");
			while (1) {
				nimln(98, "nimlexbase.nim");
				{
					if (!!((s < (*L).buflen))) goto LA23;
					failedassertimpl_87217(((NimStringDesc*) &TMP2135));
				}
				LA23: ;
				{
					nimln(99, "nimlexbase.nim");
					while (1) {
						NIM_BOOL LOC27;
						NI TMP2136;
						LOC27 = 0;
						LOC27 = (((NI) 0) <= s);
						if (!(LOC27)) goto LA28;
						LOC27 = !((((NU8)((*L).buf[s])) == ((NU8)(13)) || ((NU8)((*L).buf[s])) == ((NU8)(10))));
						LA28: ;
						if (!LOC27) goto LA26;
						TMP2136 = subInt(s, ((NI) 1));
						s = (NI)(TMP2136);
					} LA26: ;
				}
				nimln(100, "nimlexbase.nim");
				{
					if (!(((NI) 0) <= s)) goto LA31;
					nimln(102, "nimlexbase.nim");
					(*L).sentinel = s;
					nimln(103, "nimlexbase.nim");
					goto LA19;
				}
				goto LA29;
				LA31: ;
				{
					NI TMP2137;
					NI TMP2138;
					void* LOC34;
					NI TMP2141;
					NI LOC39;
					NI TMP2142;
					NI TMP2145;
					nimln(107, "nimlexbase.nim");
					oldbuflen = (*L).buflen;
					nimln(108, "nimlexbase.nim");
					TMP2137 = mulInt((*L).buflen, ((NI) 2));
					(*L).buflen = (NI)(TMP2137);
					nimln(109, "nimlexbase.nim");
					TMP2138 = mulInt((*L).buflen, ((NI) 1));
					LOC34 = 0;
					LOC34 = realloc_6033(((void*) ((*L).buf)), ((NI)chckRange((NI)(TMP2138), ((NI) 0), ((NI) 2147483647))));
					(*L).buf = ((NCSTRING) (LOC34));
					nimln(110, "nimlexbase.nim");
					{
						NI TMP2139;
						TMP2139 = subInt((*L).buflen, oldbuflen);
						if (!!(((NI)(TMP2139) == oldbuflen))) goto LA37;
						failedassertimpl_87217(((NimStringDesc*) &TMP2140));
					}
					LA37: ;
					nimln(111, "nimlexbase.nim");
					nimln(112, "nimlexbase.nim");
					nimln(111, "nimlexbase.nim");
					nimln(112, "nimlexbase.nim");
					TMP2141 = mulInt(oldbuflen, ((NI) 1));
					LOC39 = 0;
					LOC39 = llstreamread_178584((*L).stream, ((void*) ((&(*L).buf[oldbuflen]))), (NI)(TMP2141));
					TMP2142 = divInt(LOC39, ((NI) 1));
					charsread = (NI)(TMP2142);
					nimln(113, "nimlexbase.nim");
					{
						NI TMP2143;
						NI TMP2144;
						if (!(charsread < oldbuflen)) goto LA42;
						nimln(114, "nimlexbase.nim");
						TMP2143 = addInt(oldbuflen, charsread);
						(*L).buf[(NI)(TMP2143)] = 0;
						nimln(115, "nimlexbase.nim");
						TMP2144 = addInt(oldbuflen, charsread);
						(*L).sentinel = (NI)(TMP2144);
						nimln(116, "nimlexbase.nim");
						goto LA19;
					}
					LA42: ;
					nimln(117, "nimlexbase.nim");
					TMP2145 = subInt((*L).buflen, ((NI) 1));
					s = (NI)(TMP2145);
				}
				LA29: ;
			}
		} LA19: ;
	}
	LA14: ;
	popFrame();
}
Ejemplo n.º 16
0
N_NIMCALL(tnode191813*, evalimportexcept_260170)(tcontext254019* c, tnode191813* n) {
	tnode191813* result;
	tsym191843* m;
	nimfr("evalImportExcept", "importer.nim")
	result = 0;
	nimln(188, "importer.nim");
	result = n;
	nimln(189, "importer.nim");
	checkminsonslen_255222(n, 2);
	nimln(190, "importer.nim");
	if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
	if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
	m = myimportmodule_259982(c, (*n).kindU.S6.Sons->data[0]);
	nimln(191, "importer.nim");
	{
		tintset188047 exceptset;
		NI i_260234;
		NI HEX3Atmp_260251;
		NI LOC5;
		NI TMP3295;
		NI res_260253;
		nimln(191, "importer.nim");
		nimln(191, "importer.nim");
		if (!!((m == NIM_NIL))) goto LA3;
		nimln(192, "importer.nim");
		if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[0], newsymnode_192105(m));
		nimln(193, "importer.nim");
		adddecl_256550(c, m);
		nimln(194, "importer.nim");
		chckNil((void*)&exceptset);
		memset((void*)&exceptset, 0, sizeof(exceptset));
		initintset_188935(&exceptset);
		i_260234 = 0;
		HEX3Atmp_260251 = 0;
		nimln(195, "importer.nim");
		nimln(195, "importer.nim");
		nimln(195, "importer.nim");
		LOC5 = 0;
		LOC5 = sonslen_192191(n);
		TMP3295 = subInt(LOC5, 1);
		HEX3Atmp_260251 = (NI64)(TMP3295);
		nimln(1451, "system.nim");
		res_260253 = 1;
		nimln(1452, "system.nim");
		while (1) {
			tident170019* ident;
			nimln(1452, "system.nim");
			if (!(res_260253 <= HEX3Atmp_260251)) goto LA6;
			nimln(1451, "system.nim");
			i_260234 = res_260253;
			nimln(196, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(i_260234) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			ident = consideracc_256006((*n).kindU.S6.Sons->data[i_260234]);
			nimln(197, "importer.nim");
			incl_188866(&exceptset, (*ident).Sup.Id);
			nimln(1454, "system.nim");
			res_260253 = addInt(res_260253, 1);
		} LA6: ;
		nimln(198, "importer.nim");
		importallsymbolsexcept_259529(c, m, &exceptset);
		nimln(199, "importer.nim");
		importforwarded_259633(c, (*m).Ast, &exceptset);
	}
	LA3: ;
	popFrame();
	return result;
}
Ejemplo n.º 17
0
N_NIMCALL(void, processmodule_221049)(tsym170689* module, tllstream160204* stream, trodreader210023* rd) {
	tparsers196026 p;
	tpasscontextarray221155 a;
	tllstream160204* s;
	NI32 fileidx;
	nimfr("processModule", "passes.nim")
	memset((void*)&p, 0, sizeof(p));
	objectInit(&p, (&NTI196026));
	memset((void*)a, 0, sizeof(a));
	s = 0;
	nimln(167, "passes.nim");
	fileidx = ((NI32)chckRange((*module).Position, ((NI32) (-2147483647 -1)), ((NI32) 2147483647)));
	nimln(168, "passes.nim");
	{
		nimln(168, "passes.nim");
		if (!(rd == NIM_NIL)) goto LA3;
		nimln(169, "passes.nim");
		openpasses_221243(a, module);		nimln(170, "passes.nim");
		{
			NimStringDesc* filename;
			nimln(170, "passes.nim");
			if (!(stream == NIM_NIL)) goto LA7;
			nimln(171, "passes.nim");
			filename = tofullpath_136708(fileidx);
			nimln(172, "passes.nim");
			s = llstreamopen_160227(filename, ((NU8) 0));
			nimln(173, "passes.nim");
			{
				nimln(173, "passes.nim");
				if (!(s == NIM_NIL)) goto LA11;
				nimln(174, "passes.nim");
				rawmessage_137191(((NU16) 3), filename);				nimln(175, "passes.nim");
				goto BeforeRet;
			}			LA11: ;
		}		goto LA5;
		LA7: ;
		{
			nimln(177, "passes.nim");
			s = stream;
		}		LA5: ;
		nimln(178, "passes.nim");
		while (1) {
			nimln(179, "passes.nim");
			openparsers_196034(&p, fileidx, s);			nimln(181, "passes.nim");
			{
				nimln(731, "system.nim");
				nimln(731, "system.nim");
				if (!!((((*module).Flags &(1<<((((NU8) 13))&31)))!=0))) goto LA17;
				nimln(186, "passes.nim");
				processimplicits_221443(implicitimports_113242, ((NU8) 115), a);				nimln(187, "passes.nim");
				processimplicits_221443(implicitincludes_113261, ((NU8) 120), a);			}			LA17: ;
			nimln(189, "passes.nim");
			while (1) {
				tnode170659* n;
				nimln(190, "passes.nim");
				n = parsetoplevelstmt_196051(&p);
				nimln(191, "passes.nim");
				{
					nimln(191, "passes.nim");
					if (!((*n).Kind == ((NU8) 1))) goto LA22;
					nimln(191, "passes.nim");
					goto LA19;
				}				LA22: ;
				nimln(192, "passes.nim");
				{
					NIM_BOOL LOC26;
					nimln(192, "passes.nim");
					nimln(192, "passes.nim");
					LOC26 = 0;
					LOC26 = processtoplevelstmt_221341(n, a);
					if (!!(LOC26)) goto LA27;
					nimln(192, "passes.nim");
					goto LA19;
				}				LA27: ;
			} LA19: ;
			nimln(194, "passes.nim");
			closeparsers_196041(&p);			nimln(195, "passes.nim");
			{
				nimln(698, "system.nim");
				nimln(698, "system.nim");
				if (!!(((*s).Kind == ((NU8) 3)))) goto LA31;
				nimln(195, "passes.nim");
				goto LA14;
			}			LA31: ;
		} LA14: ;
		nimln(196, "passes.nim");
		closepasses_221312(a);		nimln(198, "passes.nim");
		idsynchronizationpoint_169440(1000);	}	goto LA1;
	LA3: ;
	{
		tnode170659* n;
		NI i_221560;
		NI HEX3Atmp_221577;
		NI LOC34;
		NI TMP3139;
		NI res_221579;
		nimln(200, "passes.nim");
		openpassescached_221271(a, module, rd);		nimln(201, "passes.nim");
		n = loadinitsection_210065(rd);
		i_221560 = 0;
		HEX3Atmp_221577 = 0;
		nimln(202, "passes.nim");
		nimln(202, "passes.nim");
		nimln(202, "passes.nim");
		LOC34 = 0;
		LOC34 = sonslen_171022(n);
		TMP3139 = subInt(LOC34, 1);
		HEX3Atmp_221577 = (NI64)(TMP3139);
		nimln(1301, "system.nim");
		res_221579 = 0;
		nimln(1302, "system.nim");
		while (1) {
			nimln(1302, "system.nim");
			if (!(res_221579 <= HEX3Atmp_221577)) goto LA35;
			nimln(1301, "system.nim");
			i_221560 = res_221579;
			nimln(202, "passes.nim");
			if (((TMP3131[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3132));
			if ((NU)(i_221560) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			processtoplevelstmtcached_221379((*n).kindU.S6.Sons->data[i_221560], a);			nimln(1304, "system.nim");
			res_221579 = addInt(res_221579, 1);
		} LA35: ;
		nimln(203, "passes.nim");
		closepassescached_221408(a);	}	LA1: ;
	BeforeRet: ;	popFrame();
}N_NOINLINE(void, compilerpassesInit)(void) {
Ejemplo n.º 18
0
N_NIMCALL(void, rawimportsymbol_259235)(tcontext254019* c, tsym191843* s) {
	tsym191843* check;
	nimfr("rawImportSymbol", "importer.nim")
	nimln(62, "importer.nim");
	check = strtableget_200084((*(*c).Importtable).Symbols, (*s).Name);
	nimln(63, "importer.nim");
	{
		NIM_BOOL LOC3;
		nimln(63, "importer.nim");
		LOC3 = 0;
		nimln(63, "importer.nim");
		nimln(63, "importer.nim");
		LOC3 = !((check == NIM_NIL));
		if (!(LOC3)) goto LA4;
		nimln(63, "importer.nim");
		nimln(63, "importer.nim");
		LOC3 = !(((*check).Sup.Id == (*s).Sup.Id));
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(64, "importer.nim");
		{
			nimln(64, "importer.nim");
			nimln(64, "importer.nim");
			if (!!(((520256 &(1<<(((*s).Kind)&31)))!=0))) goto LA9;
			nimln(66, "importer.nim");
			incl_188866(&(*c).Ambiguoussymbols, (*s).Sup.Id);
			nimln(67, "importer.nim");
			incl_188866(&(*c).Ambiguoussymbols, (*check).Sup.Id);
		}
		LA9: ;
	}
	LA5: ;
	nimln(70, "importer.nim");
	strtableadd_200078(&(*(*c).Importtable).Symbols, s);
	nimln(71, "importer.nim");
	{
		ttype191847* etyp;
		nimln(71, "importer.nim");
		if (!((*s).Kind == ((NU8) 7))) goto LA13;
		nimln(72, "importer.nim");
		etyp = (*s).Typ;
		nimln(73, "importer.nim");
		{
			NIM_BOOL LOC17;
			NI j_259322;
			NI HEX3Atmp_259408;
			NI LOC21;
			NI TMP3283;
			NI res_259410;
			nimln(73, "importer.nim");
			LOC17 = 0;
			nimln(73, "importer.nim");
			LOC17 = ((16386 &(IL64(1)<<(((*etyp).Kind)&IL64(63))))!=0);
			if (!(LOC17)) goto LA18;
			nimln(73, "importer.nim");
			nimln(73, "importer.nim");
			LOC17 = !((((*s).Flags &(1<<((((NU8) 9))&31)))!=0));
			LA18: ;
			if (!LOC17) goto LA19;
			j_259322 = 0;
			HEX3Atmp_259408 = 0;
			nimln(74, "importer.nim");
			nimln(74, "importer.nim");
			nimln(74, "importer.nim");
			LOC21 = 0;
			LOC21 = sonslen_192191((*etyp).N);
			TMP3283 = subInt(LOC21, 1);
			HEX3Atmp_259408 = (NI64)(TMP3283);
			nimln(1451, "system.nim");
			res_259410 = 0;
			nimln(1452, "system.nim");
			while (1) {
				tsym191843* e;
				tidentiter200106 it;
				nimln(1452, "system.nim");
				if (!(res_259410 <= HEX3Atmp_259408)) goto LA22;
				nimln(1451, "system.nim");
				j_259322 = res_259410;
				nimln(75, "importer.nim");
				if (((TMP3276[(*(*etyp).N).Kind/8] &(1<<((*(*etyp).N).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
				if ((NU)(j_259322) >= (NU)((*(*etyp).N).kindU.S6.Sons->Sup.len)) raiseIndexError();
				if (!(((TMP3274[(*(*(*etyp).N).kindU.S6.Sons->data[j_259322]).Kind/8] &(1<<((*(*(*etyp).N).kindU.S6.Sons->data[j_259322]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3275));
				e = (*(*(*etyp).N).kindU.S6.Sons->data[j_259322]).kindU.S4.Sym;
				nimln(76, "importer.nim");
				{
					nimln(76, "importer.nim");
					nimln(76, "importer.nim");
					if (!!(((*e).Kind == ((NU8) 20)))) goto LA25;
					nimln(77, "importer.nim");
					internalerror_168591((*s).Info, ((NimStringDesc*) &TMP3284));
				}
				LA25: ;
				memset((void*)&it, 0, sizeof(it));
				nimln(82, "importer.nim");
				check = initidentiter_200110(&it, (*(*c).Importtable).Symbols, (*e).Name);
				nimln(83, "importer.nim");
				while (1) {
					nimln(83, "importer.nim");
					nimln(83, "importer.nim");
					if (!!((check == NIM_NIL))) goto LA27;
					nimln(84, "importer.nim");
					{
						nimln(84, "importer.nim");
						if (!((*check).Sup.Id == (*e).Sup.Id)) goto LA30;
						nimln(85, "importer.nim");
						e = NIM_NIL;
						nimln(86, "importer.nim");
						goto LA27;
					}
					LA30: ;
					nimln(87, "importer.nim");
					check = nextidentiter_200117(&it, (*(*c).Importtable).Symbols);
				} LA27: ;
				nimln(88, "importer.nim");
				{
					nimln(88, "importer.nim");
					nimln(88, "importer.nim");
					if (!!((e == NIM_NIL))) goto LA34;
					nimln(89, "importer.nim");
					rawimportsymbol_259235(c, e);
				}
				LA34: ;
				nimln(1454, "system.nim");
				res_259410 = addInt(res_259410, 1);
			} LA22: ;
		}
		LA19: ;
	}
	goto LA11;
	LA13: ;
	{
		nimln(92, "importer.nim");
		{
			nimln(92, "importer.nim");
			if (!((*s).Kind == ((NU8) 16))) goto LA39;
			nimln(92, "importer.nim");
			addconverter_254530(c, s);
		}
		LA39: ;
		nimln(93, "importer.nim");
		{
			NIM_BOOL LOC43;
			nimln(93, "importer.nim");
			LOC43 = 0;
			LOC43 = haspattern_198060(s);
			if (!LOC43) goto LA44;
			nimln(93, "importer.nim");
			addpattern_254537(c, s);
		}
		LA44: ;
	}
	LA11: ;
	popFrame();
}
Ejemplo n.º 19
0
N_NIMCALL(tnode191813*, evaltemplateargs_395174)(tnode191813* n, tsym191843* s) {
	tnode191813* result;
	NI a;
	NI f;
	NI i_395194;
	NI HEX3Atmp_395266;
	NI TMP5467;
	NI res_395268;
	nimfr("evalTemplateArgs", "evaltempl.nim")
	result = 0;
	a = 0;
	nimln(60, "evaltempl.nim");
	switch ((*n).Kind) {
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		nimln(62, "evaltempl.nim");
		a = sonslen_192191(n);
	}
	break;
	default:
	{
		nimln(63, "evaltempl.nim");
		a = 0;
	}
	break;
	}
	nimln(64, "evaltempl.nim");
	f = sonslen_192195((*s).Typ);
	nimln(65, "evaltempl.nim");
	{
		nimln(65, "evaltempl.nim");
		if (!(f < a)) goto LA5;
		nimln(65, "evaltempl.nim");
		globalerror_168558((*n).Info, ((NU16) 133), ((NimStringDesc*) &TMP5466));
	}
	LA5: ;
	nimln(67, "evaltempl.nim");
	result = newnodei_192109(((NU8) 150), (*n).Info);
	i_395194 = 0;
	HEX3Atmp_395266 = 0;
	nimln(68, "evaltempl.nim");
	nimln(68, "evaltempl.nim");
	TMP5467 = subInt(f, 1);
	HEX3Atmp_395266 = (NI64)(TMP5467);
	nimln(1451, "system.nim");
	res_395268 = 1;
	nimln(1452, "system.nim");
	while (1) {
		tnode191813* arg;
		nimln(1452, "system.nim");
		if (!(res_395268 <= HEX3Atmp_395266)) goto LA7;
		nimln(1451, "system.nim");
		i_395194 = res_395268;
		nimln(69, "evaltempl.nim");
		nimln(69, "evaltempl.nim");
		{
			nimln(69, "evaltempl.nim");
			if (!(i_395194 < a)) goto LA10;
			if (((TMP5461[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395194) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			arg = (*n).kindU.S6.Sons->data[i_395194];
		}
		goto LA8;
		LA10: ;
		{
			nimln(69, "evaltempl.nim");
			if (((TMP5461[(*(*(*s).Typ).N).Kind/8] &(1<<((*(*(*s).Typ).N).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395194) >= (NU)((*(*(*s).Typ).N).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!(((TMP5459[(*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).Kind/8] &(1<<((*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5460));
			arg = copytree_192247((*(*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).kindU.S4.Sym).Ast);
		}
		LA8: ;
		nimln(70, "evaltempl.nim");
		{
			NIM_BOOL LOC15;
			nimln(70, "evaltempl.nim");
			LOC15 = 0;
			nimln(70, "evaltempl.nim");
			LOC15 = (arg == NIM_NIL);
			if (LOC15) goto LA16;
			nimln(70, "evaltempl.nim");
			LOC15 = ((*arg).Kind == ((NU8) 1));
			LA16: ;
			if (!LOC15) goto LA17;
			nimln(71, "evaltempl.nim");
			localerror_168571((*n).Info, ((NU16) 133), ((NimStringDesc*) &TMP5466));
		}
		LA17: ;
		nimln(72, "evaltempl.nim");
		addson_192217(result, arg);
		nimln(1454, "system.nim");
		res_395268 = addInt(res_395268, 1);
	} LA7: ;
	popFrame();
	return result;
}
Ejemplo n.º 20
0
N_NIMCALL(NI, rawparseint_92914)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	result = 0;
	sign = IL64(-1);
	i = start;
	{
		NI TMP1131;
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		TMP1131 = addInt(i, ((NI) 1));
		i = (NI)(TMP1131);
	}
	goto LA1;
	LA3: ;
	{
		NI TMP1132;
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		TMP1132 = addInt(i, ((NI) 1));
		i = (NI)(TMP1132);
		sign = IL64(1);
	}
	goto LA1;
	LA6: ;
	LA1: ;
	{
		NI64 TMP1138;
		NI TMP1139;
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		(*b) = IL64(0);
		{
			while (1) {
				NI64 TMP1133;
				NI TMP1134;
				NI64 TMP1135;
				NI TMP1136;
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				TMP1133 = mulInt64((*b), IL64(10));
				TMP1134 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TMP1135 = subInt64((NI64)(TMP1133), ((NI64) ((NI)(TMP1134))));
				(*b) = (NI64)(TMP1135);
				TMP1136 = addInt(i, ((NI) 1));
				i = (NI)(TMP1136);
				{
					while (1) {
						NI TMP1137;
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TMP1137 = addInt(i, ((NI) 1));
						i = (NI)(TMP1137);
					} LA15: ;
				}
			} LA13: ;
		}
		TMP1138 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP1138);
		TMP1139 = subInt(i, start);
		result = (NI)(TMP1139);
	}
	LA10: ;
	return result;
}
Ejemplo n.º 21
0
N_NIMCALL(void, fillbuffer_249102)(Baselexer249024* L) {
	NI charsread;
	NI tocopy;
	NI s;
	NI oldbuflen;
	NI TMP4210;
	NI TMP4211;
	NI TMP4215;
	NI TMP4216;
	NI LOC13;
	NI TMP4217;
	NI TMP4218;
	nimfr("fillBuffer", "lexbase.nim")
	charsread = 0;
	tocopy = 0;
	s = 0;
	oldbuflen = 0;
	nimln(79, "lexbase.nim");
	{
		if (!!(((*L).sentinel < (*L).buflen))) goto LA3;
		failedassertimpl_88817(((NimStringDesc*) &TMP4209));
	}
	LA3: ;
	nimln(80, "lexbase.nim");
	TMP4210 = subInt((*L).buflen, (*L).sentinel);
	TMP4211 = subInt((NI)(TMP4210), ((NI) 1));
	tocopy = (NI)(TMP4211);
	nimln(81, "lexbase.nim");
	{
		if (!!((((NI) 0) <= tocopy))) goto LA7;
		failedassertimpl_88817(((NimStringDesc*) &TMP4212));
	}
	LA7: ;
	nimln(82, "lexbase.nim");
	{
		NI TMP4213;
		NI TMP4214;
		if (!(((NI) 0) < tocopy)) goto LA11;
		nimln(83, "lexbase.nim");
		TMP4213 = addInt((*L).sentinel, ((NI) 1));
		TMP4214 = mulInt(tocopy, ((NI) 1));
		memmove(((void*) ((*L).buf)), ((void*) ((&(*L).buf[(NI)(TMP4213)]))), ((NI)chckRange((NI)(TMP4214), ((NI) 0), ((NI) 2147483647))));
	}
	LA11: ;
	nimln(85, "lexbase.nim");
	nimln(86, "lexbase.nim");
	nimln(85, "lexbase.nim");
	nimln(86, "lexbase.nim");
	TMP4215 = addInt((*L).sentinel, ((NI) 1));
	TMP4216 = mulInt((NI)(TMP4215), ((NI) 1));
	LOC13 = 0;
	LOC13 = readdata_141174((*L).input, ((void*) ((&(*L).buf[tocopy]))), (NI)(TMP4216));
	TMP4217 = divInt(LOC13, ((NI) 1));
	charsread = (NI)(TMP4217);
	nimln(87, "lexbase.nim");
	TMP4218 = addInt(tocopy, charsread);
	s = (NI)(TMP4218);
	nimln(88, "lexbase.nim");
	{
		NI TMP4219;
		TMP4219 = addInt((*L).sentinel, ((NI) 1));
		if (!(charsread < (NI)(TMP4219))) goto LA16;
		nimln(89, "lexbase.nim");
		(*L).buf[s] = 0;
		nimln(90, "lexbase.nim");
		(*L).sentinel = s;
	}
	goto LA14;
	LA16: ;
	{
		NI TMP4220;
		nimln(93, "lexbase.nim");
		TMP4220 = subInt(s, ((NI) 1));
		s = (NI)(TMP4220);
		{
			nimln(94, "lexbase.nim");
			while (1) {
				nimln(95, "lexbase.nim");
				{
					if (!!((s < (*L).buflen))) goto LA23;
					failedassertimpl_88817(((NimStringDesc*) &TMP4221));
				}
				LA23: ;
				{
					nimln(96, "lexbase.nim");
					while (1) {
						NIM_BOOL LOC27;
						NI TMP4222;
						LOC27 = 0;
						LOC27 = (((NI) 0) <= s);
						if (!(LOC27)) goto LA28;
						LOC27 = !((((NU8)((*L).buf[s])) == ((NU8)(13)) || ((NU8)((*L).buf[s])) == ((NU8)(10))));
						LA28: ;
						if (!LOC27) goto LA26;
						TMP4222 = subInt(s, ((NI) 1));
						s = (NI)(TMP4222);
					} LA26: ;
				}
				nimln(97, "lexbase.nim");
				{
					if (!(((NI) 0) <= s)) goto LA31;
					nimln(99, "lexbase.nim");
					(*L).sentinel = s;
					nimln(100, "lexbase.nim");
					goto LA19;
				}
				goto LA29;
				LA31: ;
				{
					NI TMP4223;
					NI TMP4224;
					void* LOC34;
					NI TMP4227;
					NI LOC39;
					NI TMP4228;
					NI TMP4231;
					nimln(104, "lexbase.nim");
					oldbuflen = (*L).buflen;
					nimln(105, "lexbase.nim");
					TMP4223 = mulInt((*L).buflen, ((NI) 2));
					(*L).buflen = (NI)(TMP4223);
					nimln(106, "lexbase.nim");
					TMP4224 = mulInt((*L).buflen, ((NI) 1));
					LOC34 = 0;
					LOC34 = realloc_6033(((void*) ((*L).buf)), ((NI)chckRange((NI)(TMP4224), ((NI) 0), ((NI) 2147483647))));
					(*L).buf = ((NCSTRING) (LOC34));
					nimln(107, "lexbase.nim");
					{
						NI TMP4225;
						TMP4225 = subInt((*L).buflen, oldbuflen);
						if (!!(((NI)(TMP4225) == oldbuflen))) goto LA37;
						failedassertimpl_88817(((NimStringDesc*) &TMP4226));
					}
					LA37: ;
					nimln(108, "lexbase.nim");
					nimln(109, "lexbase.nim");
					nimln(108, "lexbase.nim");
					nimln(109, "lexbase.nim");
					TMP4227 = mulInt(oldbuflen, ((NI) 1));
					LOC39 = 0;
					LOC39 = readdata_141174((*L).input, ((void*) ((&(*L).buf[oldbuflen]))), (NI)(TMP4227));
					TMP4228 = divInt(LOC39, ((NI) 1));
					charsread = (NI)(TMP4228);
					nimln(110, "lexbase.nim");
					{
						NI TMP4229;
						NI TMP4230;
						if (!(charsread < oldbuflen)) goto LA42;
						nimln(111, "lexbase.nim");
						TMP4229 = addInt(oldbuflen, charsread);
						(*L).buf[(NI)(TMP4229)] = 0;
						nimln(112, "lexbase.nim");
						TMP4230 = addInt(oldbuflen, charsread);
						(*L).sentinel = (NI)(TMP4230);
						nimln(113, "lexbase.nim");
						goto LA19;
					}
					LA42: ;
					nimln(114, "lexbase.nim");
					TMP4231 = subInt((*L).buflen, ((NI) 1));
					s = (NI)(TMP4231);
				}
				LA29: ;
			}
		} LA19: ;
	}
	LA14: ;
	popFrame();
}
Ejemplo n.º 22
0
N_NIMCALL(NI, cmpignorestyle_288418)(NCSTRING a, NCSTRING b) {
	NI result;
	NI i;
	NI j;
	nimfr("cmpIgnoreStyle", "macros.nim")
	result = 0;
	nimln(793, "macros.nim");
	i = ((NI) 0);
	nimln(794, "macros.nim");
	j = ((NI) 0);
	{
		nimln(795, "macros.nim");
		while (1) {
			NIM_CHAR aa;
			NIM_CHAR bb;
			NI TMP4826;
			NI TMP4827;
			NI TMP4828;
			{
				nimln(796, "macros.nim");
				while (1) {
					NI TMP4823;
					if (!((NU8)(a[i]) == (NU8)(95))) goto LA4;
					TMP4823 = addInt(i, ((NI) 1));
					i = (NI)(TMP4823);
				} LA4: ;
			}
			{
				nimln(797, "macros.nim");
				while (1) {
					NI TMP4824;
					if (!((NU8)(b[j]) == (NU8)(95))) goto LA6;
					TMP4824 = addInt(j, ((NI) 1));
					j = (NI)(TMP4824);
				} LA6: ;
			}
			nimln(798, "macros.nim");
			aa = tolower_288423(a[i]);
			nimln(799, "macros.nim");
			bb = tolower_288423(b[j]);
			nimln(800, "macros.nim");
			TMP4826 = subInt(((NI) (((NU8)(aa)))), ((NI) (((NU8)(bb)))));
			result = (NI)(TMP4826);
			nimln(801, "macros.nim");
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = !((result == ((NI) 0)));
				if (LOC9) goto LA10;
				LOC9 = ((NU8)(aa) == (NU8)(0));
				LA10: ;
				if (!LOC9) goto LA11;
				goto LA1;
			}
			LA11: ;
			nimln(802, "macros.nim");
			TMP4827 = addInt(i, ((NI) 1));
			i = (NI)(TMP4827);
			nimln(803, "macros.nim");
			TMP4828 = addInt(j, ((NI) 1));
			j = (NI)(TMP4828);
		}
	} LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 23
0
N_NIMCALL(NU8, ispartofaux_416020)(tnode191813* n, ttype191847* b, tintset188047* marker) {
	NU8 result;
	nimfr("isPartOfAux", "aliases.nim")
	result = 0;
	nimln(22, "aliases.nim");
	result = ((NU8) 0);
	nimln(23, "aliases.nim");
	switch ((*n).Kind) {
	case ((NU8) 136):
	{
		NI i_416039;
		NI HEX3Atmp_416311;
		NI LOC2;
		NI TMP5621;
		NI res_416313;
		i_416039 = 0;
		HEX3Atmp_416311 = 0;
		nimln(25, "aliases.nim");
		nimln(25, "aliases.nim");
		nimln(25, "aliases.nim");
		LOC2 = 0;
		LOC2 = sonslen_192191(n);
		TMP5621 = subInt(LOC2, 1);
		HEX3Atmp_416311 = (NI64)(TMP5621);
		nimln(1451, "system.nim");
		res_416313 = 0;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_416313 <= HEX3Atmp_416311)) goto LA3;
			nimln(1451, "system.nim");
			i_416039 = res_416313;
			nimln(26, "aliases.nim");
			if (((TMP5619[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5620));
			if ((NU)(i_416039) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			result = ispartofaux_416020((*n).kindU.S6.Sons->data[i_416039], b, marker);
			nimln(27, "aliases.nim");
			{
				nimln(27, "aliases.nim");
				if (!(result == ((NU8) 2))) goto LA6;
				nimln(27, "aliases.nim");
				goto BeforeRet;
			}
			LA6: ;
			nimln(1454, "system.nim");
			res_416313 = addInt(res_416313, 1);
		} LA3: ;
	}
	break;
	case ((NU8) 137):
	{
		NI i_416259;
		NI HEX3Atmp_416315;
		NI LOC17;
		NI TMP5623;
		NI res_416317;
		nimln(29, "aliases.nim");
		{
			nimln(29, "aliases.nim");
			nimln(29, "aliases.nim");
			if (((TMP5619[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5620));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA11;
			nimln(29, "aliases.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP5622));
		}
		LA11: ;
		nimln(30, "aliases.nim");
		if (((TMP5619[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5620));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		result = ispartofaux_416020((*n).kindU.S6.Sons->data[0], b, marker);
		nimln(31, "aliases.nim");
		{
			nimln(31, "aliases.nim");
			if (!(result == ((NU8) 2))) goto LA15;
			nimln(31, "aliases.nim");
			goto BeforeRet;
		}
		LA15: ;
		i_416259 = 0;
		HEX3Atmp_416315 = 0;
		nimln(32, "aliases.nim");
		nimln(32, "aliases.nim");
		nimln(32, "aliases.nim");
		LOC17 = 0;
		LOC17 = sonslen_192191(n);
		TMP5623 = subInt(LOC17, 1);
		HEX3Atmp_416315 = (NI64)(TMP5623);
		nimln(1451, "system.nim");
		res_416317 = 1;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_416317 <= HEX3Atmp_416315)) goto LA18;
			nimln(1451, "system.nim");
			i_416259 = res_416317;
			nimln(33, "aliases.nim");
			if (((TMP5619[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5620));
			if ((NU)(i_416259) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			switch ((*(*n).kindU.S6.Sons->data[i_416259]).Kind) {
			case ((NU8) 85):
			case ((NU8) 88):
			{
				tnode191813* LOC20;
				nimln(35, "aliases.nim");
				nimln(35, "aliases.nim");
				if (((TMP5619[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5620));
				if ((NU)(i_416259) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC20 = 0;
				LOC20 = lastson_192199((*n).kindU.S6.Sons->data[i_416259]);
				result = ispartofaux_416020(LOC20, b, marker);
				nimln(36, "aliases.nim");
				{
					nimln(36, "aliases.nim");
					if (!(result == ((NU8) 2))) goto LA23;
					nimln(36, "aliases.nim");
					goto BeforeRet;
				}
				LA23: ;
			}
			break;
			default:
			{
				nimln(37, "aliases.nim");
				internalerror_168606(((NimStringDesc*) &TMP5625));
			}
			break;
			}
			nimln(1454, "system.nim");
			res_416317 = addInt(res_416317, 1);
		} LA18: ;
	}
	break;
	case ((NU8) 3):
	{
		nimln(39, "aliases.nim");
		if (!(((TMP5626[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5627));
		result = ispartofaux_416013((*(*n).kindU.S4.Sym).Typ, b, marker);
	}
	break;
	default:
	{
		nimln(40, "aliases.nim");
		internalerror_168591((*n).Info, ((NimStringDesc*) &TMP5628));
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 24
0
N_NIMCALL(Tnode190813*, adddotdependency_506041)(Tpasscontext241005* c, Tnode190813* n) {
	Tnode190813* result;
	Tgen506016* g;
	nimfr("addDotDependency", "depends.nim")
	result = 0;
	nimln(29, "depends.nim");
	result = n;
	nimln(30, "depends.nim");
	if (c) chckObj((*c).Sup.m_type, (&NTI506016));
	g = ((Tgen506016*) (c));
	nimln(31, "depends.nim");
	switch ((*n).kind) {
	case ((NU8) 116):
	{
		{
			NI i_506059;
			NI HEX3Atmp_506081;
			NI LOC3;
			NI TMP10582;
			NI res_506084;
			i_506059 = 0;
			HEX3Atmp_506081 = 0;
			nimln(33, "depends.nim");
			LOC3 = 0;
			LOC3 = sonslen_193403(n);
			TMP10582 = subInt(LOC3, ((NI) 1));
			HEX3Atmp_506081 = (NI)(TMP10582);
			nimln(1598, "system.nim");
			res_506084 = ((NI) 0);
			{
				nimln(1599, "system.nim");
				while (1) {
					NimStringDesc* imported;
					NI TMP10585;
					if (!(res_506084 <= HEX3Atmp_506081)) goto LA5;
					nimln(1600, "system.nim");
					i_506059 = res_506084;
					nimln(34, "depends.nim");
					if (((TMP10583[(*n).kind/8] &(1<<((*n).kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP10584));
					if ((NU)(i_506059) >= (NU)((*n).kindU.S6.sons->Sup.len)) raiseIndexError();
					imported = getmodulename_251018((*n).kindU.S6.sons->data[i_506059]);
					nimln(35, "depends.nim");
					adddependencyaux_506028((*(*(*g).module).name).s, imported);
					nimln(1614, "system.nim");
					TMP10585 = addInt(res_506084, ((NI) 1));
					res_506084 = (NI)(TMP10585);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 120):
	case ((NU8) 117):
	{
		NimStringDesc* imported;
		nimln(37, "depends.nim");
		if (((TMP10583[(*n).kind/8] &(1<<((*n).kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP10584));
		if ((NU)(((NI) 0)) >= (NU)((*n).kindU.S6.sons->Sup.len)) raiseIndexError();
		imported = getmodulename_251018((*n).kindU.S6.sons->data[((NI) 0)]);
		nimln(38, "depends.nim");
		adddependencyaux_506028((*(*(*g).module).name).s, imported);
	}
	break;
	case ((NU8) 115):
	case ((NU8) 112):
	case ((NU8) 126):
	case ((NU8) 127):
	{
		{
			NI i_506078;
			NI HEX3Atmp_506089;
			NI LOC9;
			NI TMP10586;
			NI res_506092;
			i_506078 = 0;
			HEX3Atmp_506089 = 0;
			nimln(40, "depends.nim");
			LOC9 = 0;
			LOC9 = sonslen_193403(n);
			TMP10586 = subInt(LOC9, ((NI) 1));
			HEX3Atmp_506089 = (NI)(TMP10586);
			nimln(1598, "system.nim");
			res_506092 = ((NI) 0);
			{
				nimln(1599, "system.nim");
				while (1) {
					Tnode190813* LOC12;
					NI TMP10587;
					if (!(res_506092 <= HEX3Atmp_506089)) goto LA11;
					nimln(1600, "system.nim");
					i_506078 = res_506092;
					nimln(40, "depends.nim");
					if (((TMP10583[(*n).kind/8] &(1<<((*n).kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP10584));
					if ((NU)(i_506078) >= (NU)((*n).kindU.S6.sons->Sup.len)) raiseIndexError();
					LOC12 = 0;
					LOC12 = adddotdependency_506041(c, (*n).kindU.S6.sons->data[i_506078]);
					nimln(1614, "system.nim");
					TMP10587 = addInt(res_506092, ((NI) 1));
					res_506092 = (NI)(TMP10587);
				} LA11: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
	popFrame();
	return result;
}
Ejemplo n.º 25
0
N_NIMCALL(NI, rawparseint_96114)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	nimfr("rawParseInt", "parseutils.nim")
	result = 0;
	nimln(194, "parseutils.nim");
	sign = IL64(-1);
	nimln(195, "parseutils.nim");
	i = start;
	nimln(196, "parseutils.nim");
	{
		NI TMP285;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		TMP285 = addInt(i, ((NI) 1));
		i = (NI)(TMP285);
	}
	goto LA1;
	LA3: ;
	{
		NI TMP286;
		nimln(197, "parseutils.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		nimln(198, "parseutils.nim");
		TMP286 = addInt(i, ((NI) 1));
		i = (NI)(TMP286);
		nimln(199, "parseutils.nim");
		sign = IL64(1);
	}
	goto LA1;
	LA6: ;
	LA1: ;
	nimln(200, "parseutils.nim");
	{
		NI64 TMP292;
		NI TMP293;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		nimln(201, "parseutils.nim");
		(*b) = IL64(0);
		{
			nimln(202, "parseutils.nim");
			while (1) {
				NI64 TMP287;
				NI TMP288;
				NI64 TMP289;
				NI TMP290;
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				nimln(203, "parseutils.nim");
				TMP287 = mulInt64((*b), IL64(10));
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				TMP288 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TMP289 = subInt64((NI64)(TMP287), ((NI64) ((NI)(TMP288))));
				(*b) = (NI64)(TMP289);
				nimln(204, "parseutils.nim");
				TMP290 = addInt(i, ((NI) 1));
				i = (NI)(TMP290);
				{
					nimln(205, "parseutils.nim");
					while (1) {
						NI TMP291;
						if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TMP291 = addInt(i, ((NI) 1));
						i = (NI)(TMP291);
					} LA15: ;
				}
			} LA13: ;
		}
		nimln(206, "parseutils.nim");
		TMP292 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP292);
		nimln(207, "parseutils.nim");
		TMP293 = subInt(i, start);
		result = (NI)(TMP293);
	}
	LA10: ;
	popFrame();
	return result;
}
Ejemplo n.º 26
0
N_NIMCALL(void, scanpar_218047)(ttmplparser218017* p, NI d) {
	NI i;
	nimfr("scanPar", "filter_tmpl.nim")
	nimln(48, "filter_tmpl.nim");
	i = d;
	nimln(49, "filter_tmpl.nim");
	while (1) {
		nimln(50, "filter_tmpl.nim");
		if ((NU)(i) > (NU)((*p).X->Sup.len)) raiseIndexError();
		switch (((NU8)((*p).X->data[i]))) {
		case 0:
		{
			nimln(51, "filter_tmpl.nim");
			goto LA1;
		}
		break;
		case 40:
		{
			nimln(52, "filter_tmpl.nim");
			(*p).Par = addInt((*p).Par, 1);
		}
		break;
		case 41:
		{
			nimln(53, "filter_tmpl.nim");
			(*p).Par = subInt((*p).Par, 1);
		}
		break;
		case 91:
		{
			nimln(54, "filter_tmpl.nim");
			(*p).Bracket = addInt((*p).Bracket, 1);
		}
		break;
		case 93:
		{
			nimln(55, "filter_tmpl.nim");
			(*p).Bracket = subInt((*p).Bracket, 1);
		}
		break;
		case 123:
		{
			nimln(56, "filter_tmpl.nim");
			(*p).Curly = addInt((*p).Curly, 1);
		}
		break;
		case 125:
		{
			nimln(57, "filter_tmpl.nim");
			(*p).Curly = subInt((*p).Curly, 1);
		}
		break;
		default:
		{
		}
		break;
		}
		nimln(59, "filter_tmpl.nim");
		i = addInt(i, 1);
	} LA1: ;
	popFrame();
}
Ejemplo n.º 27
0
N_NIMCALL(NimStringDesc*, nstDollar)(tstringtable112610* t) {
	NimStringDesc* result;
	nimfr("$", "strtabs.nim")
	result = 0;
	nimln(221, "strtabs.nim");
	{
		NI LOC3;
		nimln(221, "strtabs.nim");
		nimln(221, "strtabs.nim");
		LOC3 = 0;
		LOC3 = nstlen(t);
		if (!(LOC3 == 0)) goto LA4;
		nimln(222, "strtabs.nim");
		result = copyString(((NimStringDesc*) &TMP308));
	}	goto LA1;
	LA4: ;
	{
		NimStringDesc* key_113194;
		NimStringDesc* val_113195;
		NI h_113198;
		NI HEX3Atmp_113200;
		NI res_113202;
		nimln(224, "strtabs.nim");
		result = copyString(((NimStringDesc*) &TMP309));
		key_113194 = 0;
		val_113195 = 0;
		h_113198 = 0;
		HEX3Atmp_113200 = 0;
		nimln(40, "strtabs.nim");
		nimln(40, "strtabs.nim");
		HEX3Atmp_113200 = ((*t).Data->Sup.len-1);
		nimln(1308, "system.nim");
		res_113202 = 0;
		nimln(1309, "system.nim");
		while (1) {
			nimln(1309, "system.nim");
			if (!(res_113202 <= HEX3Atmp_113200)) goto LA7;
			nimln(1308, "system.nim");
			h_113198 = res_113202;
			nimln(41, "strtabs.nim");
			{
				nimln(41, "strtabs.nim");
				nimln(41, "strtabs.nim");
				if ((NU)(h_113198) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
				if (!!((*t).Data->data[h_113198].Field0 == 0)) goto LA10;
				nimln(42, "strtabs.nim");
				if ((NU)(h_113198) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
				key_113194 = (*t).Data->data[h_113198].Field0;
				nimln(42, "strtabs.nim");
				if ((NU)(h_113198) >= (NU)((*t).Data->Sup.len)) raiseIndexError();
				val_113195 = (*t).Data->data[h_113198].Field1;
				nimln(226, "strtabs.nim");
				{
					nimln(706, "system.nim");
					nimln(226, "strtabs.nim");
					if (!(1 < result->Sup.len)) goto LA14;
					nimln(226, "strtabs.nim");
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP310));
				}				LA14: ;
				nimln(227, "strtabs.nim");
				result = resizeString(result, key_113194->Sup.len + 0);
appendString(result, key_113194);
				nimln(228, "strtabs.nim");
				result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP311));
				nimln(229, "strtabs.nim");
				result = resizeString(result, val_113195->Sup.len + 0);
appendString(result, val_113195);
			}			LA10: ;
			nimln(1311, "system.nim");
			res_113202 = addInt(res_113202, 1);
		} LA7: ;
		nimln(230, "strtabs.nim");
		result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP312));
	}	LA1: ;
	popFrame();
	return result;
}N_NOINLINE(void, purestrtabsInit)(void) {
Ejemplo n.º 28
0
N_NIMCALL(void, parseline_218177)(ttmplparser218017* p) {
	NI d;
	NI j;
	NI curly;
	NimStringDesc* keyw;
	nimfr("parseLine", "filter_tmpl.nim")
	d = 0;
	j = 0;
	curly = 0;
	keyw = 0;
	nimln(68, "filter_tmpl.nim");
	j = 0;
	nimln(69, "filter_tmpl.nim");
	while (1) {
		nimln(69, "filter_tmpl.nim");
		if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
		if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA1;
		nimln(69, "filter_tmpl.nim");
		j = addInt(j, 1);
	} LA1: ;
	nimln(70, "filter_tmpl.nim");
	{
		NIM_BOOL LOC4;
		nimln(70, "filter_tmpl.nim");
		LOC4 = 0;
		nimln(70, "filter_tmpl.nim");
		if ((NU)(0) > (NU)((*p).X->Sup.len)) raiseIndexError();
		LOC4 = ((NU8)((*p).X->data[0]) == (NU8)((*p).Nimdirective));
		if (!(LOC4)) goto LA5;
		nimln(70, "filter_tmpl.nim");
		if ((NU)(1) > (NU)((*p).X->Sup.len)) raiseIndexError();
		LOC4 = ((NU8)((*p).X->data[1]) == (NU8)(33));
		LA5: ;
		if (!LOC4) goto LA6;
		nimln(71, "filter_tmpl.nim");
		newline_218040(p);
	}
	goto LA2;
	LA6: ;
	{
		NIM_BOOL LOC13;
		NU8 LOC15;
		nimln(72, "filter_tmpl.nim");
		if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
		if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Nimdirective))) goto LA9;
		nimln(73, "filter_tmpl.nim");
		newline_218040(p);
		nimln(74, "filter_tmpl.nim");
		j = addInt(j, 1);
		nimln(75, "filter_tmpl.nim");
		while (1) {
			nimln(75, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA11;
			nimln(75, "filter_tmpl.nim");
			j = addInt(j, 1);
		} LA11: ;
		nimln(76, "filter_tmpl.nim");
		d = j;
		nimln(77, "filter_tmpl.nim");
		keyw = copyString(((NimStringDesc*) &TMP2660));
		nimln(78, "filter_tmpl.nim");
		while (1) {
			nimln(78, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA12;
			nimln(79, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			keyw = addChar(keyw, (*p).X->data[j]);
			nimln(80, "filter_tmpl.nim");
			j = addInt(j, 1);
		} LA12: ;
		nimln(82, "filter_tmpl.nim");
		scanpar_218047(p, j);
		nimln(83, "filter_tmpl.nim");
		nimln(83, "filter_tmpl.nim");
		LOC13 = 0;
		nimln(83, "filter_tmpl.nim");
		LOC13 = withinexpr_218168(&(*p));
		if (LOC13) goto LA14;
		nimln(83, "filter_tmpl.nim");
		LOC13 = endswithopr_174646((*p).X);
		LA14: ;
		(*p).Pendingexprline = LOC13;
		nimln(84, "filter_tmpl.nim");
		nimln(84, "filter_tmpl.nim");
		LOC15 = 0;
		LOC15 = whichkeyword_170367(keyw);
		switch (LOC15) {
		case ((NU8) 20):
		{
			NimStringDesc* LOC22;
			nimln(86, "filter_tmpl.nim");
			{
				nimln(86, "filter_tmpl.nim");
				if (!(2 <= (*p).Indent)) goto LA19;
				nimln(87, "filter_tmpl.nim");
				(*p).Indent = subInt((*p).Indent, 2);
			}
			goto LA17;
			LA19: ;
			{
				nimln(89, "filter_tmpl.nim");
				(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
				nimln(90, "filter_tmpl.nim");
				localerror_164571((*p).Info, ((NU16) 163), ((NimStringDesc*) &TMP2661));
			}
			LA17: ;
			nimln(91, "filter_tmpl.nim");
			nimln(91, "filter_tmpl.nim");
			LOC22 = 0;
			LOC22 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_174258((*p).Outp, LOC22);
			nimln(92, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2662));
		}
		break;
		case ((NU8) 28):
		case ((NU8) 63):
		case ((NU8) 58):
		case ((NU8) 64):
		case ((NU8) 25):
		case ((NU8) 7):
		case ((NU8) 9):
		case ((NU8) 49):
		case ((NU8) 35):
		case ((NU8) 13):
		case ((NU8) 38):
		case ((NU8) 57):
		case ((NU8) 39):
		{
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			nimln(95, "filter_tmpl.nim");
			nimln(95, "filter_tmpl.nim");
			LOC24 = 0;
			LOC24 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_174258((*p).Outp, LOC24);
			nimln(96, "filter_tmpl.nim");
			nimln(96, "filter_tmpl.nim");
			LOC25 = 0;
			LOC25 = copyStr((*p).X, d);
			llstreamwrite_174258((*p).Outp, LOC25);
			nimln(97, "filter_tmpl.nim");
			(*p).Indent = addInt((*p).Indent, 2);
		}
		break;
		case ((NU8) 18):
		case ((NU8) 46):
		case ((NU8) 19):
		case ((NU8) 22):
		case ((NU8) 24):
		{
			NI TMP2663;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			TMP2663 = subInt((*p).Indent, 2);
			LOC27 = 0;
			LOC27 = nsuRepeatChar((NI64)(TMP2663), 32);
			llstreamwrite_174258((*p).Outp, LOC27);
			nimln(100, "filter_tmpl.nim");
			nimln(100, "filter_tmpl.nim");
			LOC28 = 0;
			LOC28 = copyStr((*p).X, d);
			llstreamwrite_174258((*p).Outp, LOC28);
		}
		break;
		case ((NU8) 37):
		case ((NU8) 62):
		case ((NU8) 11):
		case ((NU8) 60):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			nimln(102, "filter_tmpl.nim");
			nimln(102, "filter_tmpl.nim");
			LOC30 = 0;
			LOC30 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_174258((*p).Outp, LOC30);
			nimln(103, "filter_tmpl.nim");
			nimln(103, "filter_tmpl.nim");
			LOC31 = 0;
			LOC31 = copyStr((*p).X, d);
			llstreamwrite_174258((*p).Outp, LOC31);
			nimln(104, "filter_tmpl.nim");
			{
				NIM_BOOL LOC34;
				nimln(104, "filter_tmpl.nim");
				nimln(104, "filter_tmpl.nim");
				LOC34 = 0;
				LOC34 = contains_91258((*p).X, TMP2664);
				if (!!(LOC34)) goto LA35;
				nimln(106, "filter_tmpl.nim");
				(*p).Indent = addInt((*p).Indent, 2);
			}
			LA35: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC38;
			NimStringDesc* LOC39;
			nimln(108, "filter_tmpl.nim");
			nimln(108, "filter_tmpl.nim");
			LOC38 = 0;
			LOC38 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_174258((*p).Outp, LOC38);
			nimln(109, "filter_tmpl.nim");
			nimln(109, "filter_tmpl.nim");
			LOC39 = 0;
			LOC39 = copyStr((*p).X, d);
			llstreamwrite_174258((*p).Outp, LOC39);
		}
		break;
		}
		nimln(110, "filter_tmpl.nim");
		(*p).State = ((NU8) 0);
	}
	goto LA2;
	LA9: ;
	{
		nimln(114, "filter_tmpl.nim");
		(*p).Par = 0;
		nimln(115, "filter_tmpl.nim");
		(*p).Curly = 0;
		nimln(116, "filter_tmpl.nim");
		(*p).Bracket = 0;
		nimln(117, "filter_tmpl.nim");
		j = 0;
		nimln(118, "filter_tmpl.nim");
		switch ((*p).State) {
		case ((NU8) 1):
		{
			NI TMP2665;
			NimStringDesc* LOC42;
			nimln(121, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, (*p).Conc);
			nimln(122, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2659));
			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			TMP2665 = addInt((*p).Indent, 2);
			LOC42 = 0;
			LOC42 = nsuRepeatChar((NI64)(TMP2665), 32);
			llstreamwrite_174258((*p).Outp, LOC42);
			nimln(124, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2666));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC44;
			nimln(126, "filter_tmpl.nim");
			newline_218040(p);
			nimln(127, "filter_tmpl.nim");
			nimln(127, "filter_tmpl.nim");
			LOC44 = 0;
			LOC44 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_174258((*p).Outp, LOC44);
			nimln(128, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, (*p).Emit);
			nimln(129, "filter_tmpl.nim");
			llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2667));
			nimln(130, "filter_tmpl.nim");
			(*p).Emitpar = addInt((*p).Emitpar, 1);
		}
		break;
		}
		nimln(131, "filter_tmpl.nim");
		(*p).State = ((NU8) 1);
		nimln(132, "filter_tmpl.nim");
		while (1) {
			nimln(133, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			switch (((NU8)((*p).X->data[j]))) {
			case 0:
			{
				nimln(135, "filter_tmpl.nim");
				goto LA45;
			}
			break;
			case 1 ... 31:
			case 128 ... 255:
			{
				NimStringDesc* LOC48;
				nimln(137, "filter_tmpl.nim");
				llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2668));
				nimln(138, "filter_tmpl.nim");
				nimln(138, "filter_tmpl.nim");
				nimln(138, "filter_tmpl.nim");
				if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
				LOC48 = 0;
				LOC48 = nsuToHex(((NI64) (((NU8)((*p).X->data[j])))), 2);
				llstreamwrite_174258((*p).Outp, LOC48);
				nimln(139, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 92:
			{
				nimln(141, "filter_tmpl.nim");
				llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2669));
				nimln(142, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 39:
			{
				nimln(144, "filter_tmpl.nim");
				llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2670));
				nimln(145, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 34:
			{
				nimln(147, "filter_tmpl.nim");
				llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2671));
				nimln(148, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			default:
			{
				nimln(150, "filter_tmpl.nim");
				{
					nimln(150, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA55;
					nimln(152, "filter_tmpl.nim");
					j = addInt(j, 1);
					nimln(153, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					switch (((NU8)((*p).X->data[j]))) {
					case 123:
					{
						nimln(155, "filter_tmpl.nim");
						(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
						nimln(156, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 34);
						nimln(157, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Conc);
						nimln(158, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Tostr);
						nimln(159, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 40);
						nimln(160, "filter_tmpl.nim");
						j = addInt(j, 1);
						nimln(161, "filter_tmpl.nim");
						curly = 0;
						nimln(162, "filter_tmpl.nim");
						while (1) {
							nimln(163, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							switch (((NU8)((*p).X->data[j]))) {
							case 0:
							{
								nimln(165, "filter_tmpl.nim");
								localerror_164571((*p).Info, ((NU16) 188), ((NimStringDesc*) &TMP2672));
								nimln(166, "filter_tmpl.nim");
								goto LA58;
							}
							break;
							case 123:
							{
								nimln(168, "filter_tmpl.nim");
								j = addInt(j, 1);
								nimln(169, "filter_tmpl.nim");
								curly = addInt(curly, 1);
								nimln(170, "filter_tmpl.nim");
								llstreamwrite_174263((*p).Outp, 123);
							}
							break;
							case 125:
							{
								nimln(172, "filter_tmpl.nim");
								j = addInt(j, 1);
								nimln(173, "filter_tmpl.nim");
								{
									nimln(173, "filter_tmpl.nim");
									if (!(curly == 0)) goto LA64;
									nimln(173, "filter_tmpl.nim");
									goto LA58;
								}
								LA64: ;
								nimln(174, "filter_tmpl.nim");
								{
									nimln(174, "filter_tmpl.nim");
									if (!(0 < curly)) goto LA68;
									nimln(174, "filter_tmpl.nim");
									curly = subInt(curly, 1);
								}
								LA68: ;
								nimln(175, "filter_tmpl.nim");
								llstreamwrite_174263((*p).Outp, 125);
							}
							break;
							default:
							{
								nimln(177, "filter_tmpl.nim");
								if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
								llstreamwrite_174263((*p).Outp, (*p).X->data[j]);
								nimln(178, "filter_tmpl.nim");
								j = addInt(j, 1);
							}
							break;
							}
						} LA58: ;
						nimln(179, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 41);
						nimln(180, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Conc);
						nimln(181, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 34);
					}
					break;
					case 97 ... 122:
					case 65 ... 90:
					case 128 ... 255:
					{
						nimln(183, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 34);
						nimln(184, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Conc);
						nimln(185, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Tostr);
						nimln(186, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 40);
						nimln(187, "filter_tmpl.nim");
						while (1) {
							nimln(187, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA72;
							nimln(188, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							llstreamwrite_174263((*p).Outp, (*p).X->data[j]);
							nimln(189, "filter_tmpl.nim");
							j = addInt(j, 1);
						} LA72: ;
						nimln(190, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 41);
						nimln(191, "filter_tmpl.nim");
						llstreamwrite_174258((*p).Outp, (*p).Conc);
						nimln(192, "filter_tmpl.nim");
						llstreamwrite_174263((*p).Outp, 34);
					}
					break;
					default:
					{
						nimln(194, "filter_tmpl.nim");
						{
							nimln(194, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA76;
							nimln(195, "filter_tmpl.nim");
							llstreamwrite_174263((*p).Outp, (*p).Subschar);
							nimln(196, "filter_tmpl.nim");
							j = addInt(j, 1);
						}
						goto LA74;
						LA76: ;
						{
							nimln(198, "filter_tmpl.nim");
							(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
							nimln(199, "filter_tmpl.nim");
							localerror_164571((*p).Info, ((NU16) 167), ((NimStringDesc*) &TMP2673));
						}
						LA74: ;
					}
					break;
					}
				}
				goto LA53;
				LA55: ;
				{
					nimln(201, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					llstreamwrite_174263((*p).Outp, (*p).X->data[j]);
					nimln(202, "filter_tmpl.nim");
					j = addInt(j, 1);
				}
				LA53: ;
			}
			break;
			}
		} LA45: ;
		nimln(203, "filter_tmpl.nim");
		llstreamwrite_174258((*p).Outp, ((NimStringDesc*) &TMP2674));
	}
	LA2: ;
	popFrame();
}
Ejemplo n.º 29
0
N_NIMCALL(void, libcandidates_137321)(NimStringDesc* s, TY10665** dest) {
	NI le;
	NI ri;
	NI TMP435;
	nimfr("libCandidates", "options.nim")
	nimln(345, "options.nim");
	le = nsuFindChar(s, 40, 0);
	nimln(346, "options.nim");
	nimln(346, "options.nim");
	TMP435 = addInt(le, 1);
	ri = nsuFindChar(s, 41, (NI32)(TMP435));
	nimln(347, "options.nim");
	{
		NIM_BOOL LOC3;
		NimStringDesc* prefix;
		NI TMP436;
		NimStringDesc* suffix;
		NI TMP437;
		NimStringDesc* middle_137332;
		NimStringDesc* HEX3Atmp_137351;
		NI TMP438;
		NI TMP439;
		NI last_137353;
		nimln(347, "options.nim");
		LOC3 = 0;
		nimln(347, "options.nim");
		LOC3 = (0 <= le);
		if (!(LOC3)) goto LA4;
		nimln(347, "options.nim");
		LOC3 = (le < ri);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(348, "options.nim");
		nimln(348, "options.nim");
		nimln(348, "options.nim");
		TMP436 = subInt(le, 1);
		prefix = copyStrLast(s, 0, (NI32)(TMP436));
		nimln(349, "options.nim");
		nimln(349, "options.nim");
		nimln(349, "options.nim");
		TMP437 = addInt(ri, 1);
		suffix = copyStr(s, (NI32)(TMP437));
		middle_137332 = 0;
		HEX3Atmp_137351 = 0;
		nimln(350, "options.nim");
		nimln(350, "options.nim");
		nimln(350, "options.nim");
		TMP438 = addInt(le, 1);
		nimln(350, "options.nim");
		TMP439 = subInt(ri, 1);
		HEX3Atmp_137351 = copyStrLast(s, (NI32)(TMP438), (NI32)(TMP439));
		nimln(257, "strutils.nim");
		last_137353 = 0;
		nimln(258, "strutils.nim");
		{
			if (!NIM_FALSE) goto LA9;
			nimln(258, "strutils.nim");
			failedassertimpl_79821(((NimStringDesc*) &TMP440));
		}
		LA9: ;
		nimln(259, "strutils.nim");
		{
			nimln(259, "strutils.nim");
			nimln(259, "strutils.nim");
			if (!(0 < HEX3Atmp_137351->Sup.len)) goto LA13;
			nimln(261, "strutils.nim");
			while (1) {
				NI first_137355;
				NI TMP441;
				NimStringDesc* LOC19;
				nimln(261, "strutils.nim");
				nimln(261, "strutils.nim");
				if (!(last_137353 <= HEX3Atmp_137351->Sup.len)) goto LA15;
				nimln(262, "strutils.nim");
				first_137355 = last_137353;
				nimln(263, "strutils.nim");
				while (1) {
					NIM_BOOL LOC17;
					nimln(263, "strutils.nim");
					LOC17 = 0;
					nimln(263, "strutils.nim");
					nimln(263, "strutils.nim");
					LOC17 = (last_137353 < HEX3Atmp_137351->Sup.len);
					if (!(LOC17)) goto LA18;
					nimln(263, "strutils.nim");
					nimln(263, "strutils.nim");
					if ((NU)(last_137353) > (NU)(HEX3Atmp_137351->Sup.len)) raiseIndexError();
					LOC17 = !(((NU8)(HEX3Atmp_137351->data[last_137353]) == (NU8)(124)));
					LA18: ;
					if (!LOC17) goto LA16;
					nimln(263, "strutils.nim");
					last_137353 = addInt(last_137353, 1);
				} LA16: ;
				nimln(264, "strutils.nim");
				nimln(264, "strutils.nim");
				nimln(264, "strutils.nim");
				TMP441 = subInt(last_137353, 1);
				middle_137332 = copyStrLast(HEX3Atmp_137351, first_137355, (NI32)(TMP441));
				nimln(351, "options.nim");
				nimln(351, "options.nim");
				LOC19 = 0;
				LOC19 = rawNewString(prefix->Sup.len + middle_137332->Sup.len + suffix->Sup.len + 0);
appendString(LOC19, prefix);
appendString(LOC19, middle_137332);
appendString(LOC19, suffix);
				libcandidates_137321(LOC19, dest);
				nimln(265, "strutils.nim");
				last_137353 = addInt(last_137353, 1);
			} LA15: ;
		}
		LA13: ;
	}
	goto LA1;
	LA5: ;
	{
		NimStringDesc* LOC21;
		nimln(353, "options.nim");
		(*dest) = (TY10665*) incrSeq(&((*dest))->Sup, sizeof(NimStringDesc*));
		LOC21 = 0;
		LOC21 = (*dest)->data[(*dest)->Sup.len-1]; (*dest)->data[(*dest)->Sup.len-1] = copyStringRC1(s);
		if (LOC21) nimGCunrefNoCycle(LOC21);
	}
	LA1: ;
	popFrame();
}
Ejemplo n.º 30
0
N_NIMCALL(tllstream161204*, evalpipe_197391)(tparsers197026* p, tnode171659* n, NimStringDesc* filename, tllstream161204* start) {
	tllstream161204* result;
	nimfr("evalPipe", "syntaxes.nim")
	result = 0;
	nimln(150, "syntaxes.nim");
	result = start;
	nimln(151, "syntaxes.nim");
	{
		nimln(151, "syntaxes.nim");
		if (!((*n).Kind == ((NU8) 1))) goto LA3;
		nimln(151, "syntaxes.nim");
		goto BeforeRet;
	}	LA3: ;
	nimln(152, "syntaxes.nim");
	{
		NIM_BOOL LOC7;
		NIM_BOOL LOC8;
		NI i_197465;
		NI res_197527;
		nimln(152, "syntaxes.nim");
		LOC7 = 0;
		nimln(152, "syntaxes.nim");
		LOC8 = 0;
		nimln(152, "syntaxes.nim");
		LOC8 = ((*n).Kind == ((NU8) 29));
		if (!(LOC8)) goto LA9;
		nimln(152, "syntaxes.nim");
		if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		LOC8 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
		LA9: ;
		LOC7 = LOC8;
		if (!(LOC7)) goto LA10;
		nimln(153, "syntaxes.nim");
		if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		if (!(((TMP2635[(*(*n).kindU.S6.Sons->data[0]).Kind/8] &(1<<((*(*n).kindU.S6.Sons->data[0]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP2636));
		LOC7 = identeq_140456((*(*n).kindU.S6.Sons->data[0]).kindU.S5.Ident, ((NimStringDesc*) &TMP2637));
		LA10: ;
		if (!LOC7) goto LA11;
		i_197465 = 0;
		nimln(1301, "system.nim");
		res_197527 = 1;
		nimln(1302, "system.nim");
		while (1) {
			nimln(1302, "system.nim");
			if (!(res_197527 <= 2)) goto LA13;
			nimln(1301, "system.nim");
			i_197465 = res_197527;
			nimln(155, "syntaxes.nim");
			{
				nimln(155, "syntaxes.nim");
				if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
				if ((NU)(i_197465) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				if (!((*(*n).kindU.S6.Sons->data[i_197465]).Kind == ((NU8) 29))) goto LA16;
				nimln(156, "syntaxes.nim");
				if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
				if ((NU)(i_197465) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				result = evalpipe_197391(p, (*n).kindU.S6.Sons->data[i_197465], filename, result);
			}			goto LA14;
			LA16: ;
			{
				nimln(158, "syntaxes.nim");
				if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
				if ((NU)(i_197465) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				result = applyfilter_197357(p, (*n).kindU.S6.Sons->data[i_197465], filename, result);
			}			LA14: ;
			nimln(1304, "system.nim");
			res_197527 = addInt(res_197527, 1);
		} LA13: ;
	}	goto LA5;
	LA11: ;
	{
		nimln(159, "syntaxes.nim");
		if (!((*n).Kind == ((NU8) 114))) goto LA20;
		nimln(160, "syntaxes.nim");
		if (((TMP2633[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2634));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		result = evalpipe_197391(p, (*n).kindU.S6.Sons->data[0], filename, result);
	}	goto LA5;
	LA20: ;
	{
		nimln(162, "syntaxes.nim");
		result = applyfilter_197357(p, n, filename, result);
	}	LA5: ;
	BeforeRet: ;	popFrame();
	return result;
}