Пример #1
0
N_NIMCALL(Tnode_bROa11lyF5vxEN9aYNbHmhw*, evaltemplateargs_dw0jfqH3BrkE5IDOxRZp9cw)(Tnode_bROa11lyF5vxEN9aYNbHmhw* n0, Tsym_AXG7xcvKqaxY6koRX1xkCw* s0, NIM_BOOL fromhlo0) {
	Tnode_bROa11lyF5vxEN9aYNbHmhw* result0;
	NI totalparams0;
	NI genericparams0;
	NI expectedregularparams0;
	NI LOC12;
	NI givenregularparams0;
	result0 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
	switch ((*n0).kind) {
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 27):
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 29):
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 30):
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 31):
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 26):
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 28):
	{
		NI LOC2;
		LOC2 = (NI)0;
		LOC2 = len_CdME9baJhvveuPEDZE9bXoxAlambdalifting(n0);
		totalparams0 = (NI)(LOC2 - ((NI) 1));
	}
	break;
	default:
	{
		totalparams0 = ((NI) 0);
	}
	break;
	}
	{
		NIM_BOOL LOC6;
		LOC6 = (NIM_BOOL)0;
		LOC6 = (((*s0).flags &(1U<<((NU)(((Tsymflag_K9ay6LWMat9bUiT9bIbMxpDHw) 25))&31U)))!=0);
		if (LOC6) goto LA7;
		LOC6 = fromhlo0;
		LA7: ;
		if (!LOC6) goto LA8;
		genericparams0 = ((NI) 0);
	}
	goto LA4;
	LA8: ;
	{
		Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC11;
		LOC11 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
		LOC11 = HEX5BHEX5D_4mGh5VHoHoaSkXDYdG6pyAitersgen((*s0).ast, ((NI) 2));
		genericparams0 = len_CdME9baJhvveuPEDZE9bXoxAlambdalifting(LOC11);
	}
	LA4: ;
	LOC12 = (NI)0;
	LOC12 = len_gG7hUAX9cA629ahMLVL3xN4w_2((*s0).typ);
	expectedregularparams0 = (LOC12 - 1);
	givenregularparams0 = (NI)(totalparams0 - genericparams0);
	{
		if (!(givenregularparams0 < ((NI) 0))) goto LA15;
		givenregularparams0 = ((NI) 0);
	}
	LA15: ;
	{
		if (!((NI)(expectedregularparams0 + genericparams0) < totalparams0)) goto LA19;
		globalerror_VpilfPWbplGz6ny7O9cfr2g_3((*n0).info, ((Tmsgkind_IGAWgv9aR2KqPKJfPZPEWaw) 136), ((NimStringDesc*) &T_N0xGjswvcjwwH43PvVNJAg_2));
	}
	LA19: ;
	result0 = newnodei_PIqgSH9b0m7nFpOyXf9cpz5w(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 152), (*n0).info);
	{
		NI i_PYl9cv9bQnghKQXyXdxMDYzg;
		NI res_TrLd5q7GRjzsRNmujZ5Kog;
		i_PYl9cv9bQnghKQXyXdxMDYzg = (NI)0;
		res_TrLd5q7GRjzsRNmujZ5Kog = ((NI) 1);
		{
			while (1) {
				if (!(res_TrLd5q7GRjzsRNmujZ5Kog <= givenregularparams0)) goto LA23;
				i_PYl9cv9bQnghKQXyXdxMDYzg = res_TrLd5q7GRjzsRNmujZ5Kog;
				addson_gCCf68XrWL79bKes6htzFjQ(result0, (*n0).kindU.S6.sons->data[i_PYl9cv9bQnghKQXyXdxMDYzg]);
				res_TrLd5q7GRjzsRNmujZ5Kog += ((NI) 1);
			} LA23: ;
		}
	}
	{
		NI i_PYl9cv9bQnghKQXyXdxMDYzg_2;
		NI HEX3Atmp_TikpdK7Q4mtvBGSlduHjng;
		NI res_TrLd5q7GRjzsRNmujZ5Kog_2;
		i_PYl9cv9bQnghKQXyXdxMDYzg_2 = (NI)0;
		HEX3Atmp_TikpdK7Q4mtvBGSlduHjng = (NI)0;
		HEX3Atmp_TikpdK7Q4mtvBGSlduHjng = (NI)(givenregularparams0 + ((NI) 1));
		res_TrLd5q7GRjzsRNmujZ5Kog_2 = HEX3Atmp_TikpdK7Q4mtvBGSlduHjng;
		{
			while (1) {
				Tnode_bROa11lyF5vxEN9aYNbHmhw* default_BdXr9c9bxIvQs559cCj7oBmLQ;
				if (!(res_TrLd5q7GRjzsRNmujZ5Kog_2 <= expectedregularparams0)) goto LA26;
				i_PYl9cv9bQnghKQXyXdxMDYzg_2 = res_TrLd5q7GRjzsRNmujZ5Kog_2;
				default_BdXr9c9bxIvQs559cCj7oBmLQ = (*(*(*(*(*s0).typ).n).kindU.S6.sons->data[i_PYl9cv9bQnghKQXyXdxMDYzg_2]).kindU.S4.sym).ast;
				{
					NIM_BOOL LOC29;
					LOC29 = (NIM_BOOL)0;
					LOC29 = (default_BdXr9c9bxIvQs559cCj7oBmLQ == 0);
					if (LOC29) goto LA30;
					LOC29 = ((*default_BdXr9c9bxIvQs559cCj7oBmLQ).kind == ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 1));
					LA30: ;
					if (!LOC29) goto LA31;
					localerror_VpilfPWbplGz6ny7O9cfr2g((*n0).info, ((Tmsgkind_IGAWgv9aR2KqPKJfPZPEWaw) 136), ((NimStringDesc*) &T_N0xGjswvcjwwH43PvVNJAg_2));
					addson_gCCf68XrWL79bKes6htzFjQ(result0, emptynode_69ccLGuQ2mITw7zylZYtWcA);
				}
				goto LA27;
				LA31: ;
				{
					Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC34;
					LOC34 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
					LOC34 = copytree_lz8T1F9c0YwEOpUnrAUYgjg_2(default_BdXr9c9bxIvQs559cCj7oBmLQ);
					addson_gCCf68XrWL79bKes6htzFjQ(result0, LOC34);
				}
				LA27: ;
				res_TrLd5q7GRjzsRNmujZ5Kog_2 += ((NI) 1);
			} LA26: ;
		}
	}
	{
		NI i_PYl9cv9bQnghKQXyXdxMDYzg_3;
		NI res_TrLd5q7GRjzsRNmujZ5Kog_3;
		i_PYl9cv9bQnghKQXyXdxMDYzg_3 = (NI)0;
		res_TrLd5q7GRjzsRNmujZ5Kog_3 = ((NI) 1);
		{
			while (1) {
				if (!(res_TrLd5q7GRjzsRNmujZ5Kog_3 <= genericparams0)) goto LA37;
				i_PYl9cv9bQnghKQXyXdxMDYzg_3 = res_TrLd5q7GRjzsRNmujZ5Kog_3;
				addson_gCCf68XrWL79bKes6htzFjQ(result0, (*n0).kindU.S6.sons->data[(NI)(givenregularparams0 + i_PYl9cv9bQnghKQXyXdxMDYzg_3)]);
				res_TrLd5q7GRjzsRNmujZ5Kog_3 += ((NI) 1);
			} LA37: ;
		}
	}
	return result0;
}
Пример #2
0
N_NIMCALL(Tnode_bROa11lyF5vxEN9aYNbHmhw*, totreeset_T7faK845phyHxY50P3qxIQ)(TY_pxbIse2JUQkJU0n9blV9bY5g* s0, Ttype_LTUWCZolpovw9cWE3JBWSUw* settype0, Tlineinfo_T9c3PM9bs7WZ4LIQfEici9cZw info0) {
	Tnode_bROa11lyF5vxEN9aYNbHmhw* result0;
	NI64 a0;
	NI64 b0;
	NI64 e0;
	NI64 first0;
	Ttype_LTUWCZolpovw9cWE3JBWSUw* elemtype0;
	Tnode_bROa11lyF5vxEN9aYNbHmhw* n0;
	result0 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
	a0 = (NI64)0;
	b0 = (NI64)0;
	e0 = (NI64)0;
	first0 = (NI64)0;
	elemtype0 = (Ttype_LTUWCZolpovw9cWE3JBWSUw*)0;
	n0 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
	elemtype0 = (*settype0).sons->data[((NI) 0)];
	first0 = firstord_HUiBYxvKiECXCv8BzQNheg(elemtype0);
	result0 = newnodei_PIqgSH9b0m7nFpOyXf9cpz5w(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 39), info0);
	asgnRefNoCycle((void**) (&(*result0).typ), settype0);
	(*result0).info = info0;
	e0 = IL64(0);
	{
		while (1) {
			if (!(e0 < ((NI64) ((NI)((s0 ? s0->Sup.len : 0) * ((NI) 8)))))) goto LA2;
			{
				NIM_BOOL LOC5;
				Tnode_bROa11lyF5vxEN9aYNbHmhw* aa0;
				LOC5 = (NIM_BOOL)0;
				LOC5 = bitsetin_Z5HI0xhB5Wx2mWRfrJc2NQ(s0, e0);
				if (!LOC5) goto LA6;
				a0 = e0;
				b0 = e0;
				{
					while (1) {
						b0 += ((NI) 1);
						{
							NIM_BOOL LOC12;
							NIM_BOOL LOC14;
							LOC12 = (NIM_BOOL)0;
							LOC12 = (((NI64) ((NI)((s0 ? s0->Sup.len : 0) * ((NI) 8)))) <= b0);
							if (LOC12) goto LA13;
							LOC14 = (NIM_BOOL)0;
							LOC14 = bitsetin_Z5HI0xhB5Wx2mWRfrJc2NQ(s0, b0);
							LOC12 = !(LOC14);
							LA13: ;
							if (!LOC12) goto LA15;
							goto LA8;
						}
						LA15: ;
					}
				} LA8: ;
				b0 -= ((NI) 1);
				aa0 = newinttypenode_v0NY9cuqixP6ToMm9avHw5ig(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 6), (NI64)(a0 + first0), elemtype0);
				(*aa0).info = info0;
				{
					if (!(a0 == b0)) goto LA19;
					addson_gCCf68XrWL79bKes6htzFjQ(result0, aa0);
				}
				goto LA17;
				LA19: ;
				{
					Tnode_bROa11lyF5vxEN9aYNbHmhw* bb0;
					n0 = newnodei_PIqgSH9b0m7nFpOyXf9cpz5w(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 44), info0);
					asgnRefNoCycle((void**) (&(*n0).typ), elemtype0);
					addson_gCCf68XrWL79bKes6htzFjQ(n0, aa0);
					bb0 = newinttypenode_v0NY9cuqixP6ToMm9avHw5ig(((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 6), (NI64)(b0 + first0), elemtype0);
					(*bb0).info = info0;
					addson_gCCf68XrWL79bKes6htzFjQ(n0, bb0);
					addson_gCCf68XrWL79bKes6htzFjQ(result0, n0);
				}
				LA17: ;
				e0 = b0;
			}
			LA6: ;
			e0 += ((NI) 1);
		} LA2: ;
	}
	return result0;
}