N_NIMCALL(void, fieldsaux_206402_1760177012)(void* p0, TNimNode* n0, TY207201** ret0) {
	switch ((*n0).kind) {
	case ((Tnimnodekind203005) 0):
	{
	}
	break;
	case ((Tnimnodekind203005) 1):
	{
		TY207202 LOC3;
		LOC3.Field0 = (*n0).name;
		LOC3.Field1 = newany_203836_1760177012(((void*) ((NI)(((NI) (p0)) + (*n0).offset))), (*n0).typ);
		(*ret0) = (TY207201*) incrSeqV2(&((*ret0))->Sup, sizeof(TY207202));
		(*ret0)->data[(*ret0)->Sup.len] = LOC3;
		++(*ret0)->Sup.len;
	}
	break;
	case ((Tnimnodekind203005) 2):
	{
		{
			NI i_206810_1760177012;
			NI HEX3Atmp_206838_1760177012;
			NI res_206841_1760177012;
			i_206810_1760177012 = (NI)0;
			HEX3Atmp_206838_1760177012 = (NI)0;
			HEX3Atmp_206838_1760177012 = (NI)((*n0).len - ((NI) 1));
			res_206841_1760177012 = ((NI) 0);
			{
				while (1) {
					if (!(res_206841_1760177012 <= HEX3Atmp_206838_1760177012)) goto LA7;
					i_206810_1760177012 = res_206841_1760177012;
					fieldsaux_206402_1760177012(p0, (*n0).sons[(i_206810_1760177012)- 0], ret0);
					res_206841_1760177012 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	break;
	case ((Tnimnodekind203005) 3):
	{
		TNimNode* m0;
		TY207202 LOC9;
		m0 = selectbranch_203807_1760177012(p0, n0);
		LOC9.Field0 = (*n0).name;
		LOC9.Field1 = newany_203836_1760177012(((void*) ((NI)(((NI) (p0)) + (*n0).offset))), (*n0).typ);
		(*ret0) = (TY207201*) incrSeqV2(&((*ret0))->Sup, sizeof(TY207202));
		(*ret0)->data[(*ret0)->Sup.len] = LOC9;
		++(*ret0)->Sup.len;
		{
			if (!!((m0 == NIM_NIL))) goto LA12;
			fieldsaux_206402_1760177012(p0, m0, ret0);
		}
		LA12: ;
	}
	break;
	}
}
Beispiel #2
0
N_NIMCALL(void, writerope_172822)(FILE* f, Ropeobj172006* r) {
	{
		NimStringDesc* s_172826;
		s_172826 = 0;
		{
			TY184350* stack_172833;
			TY172507 LOC6;
			if (!!((r == NIM_NIL))) goto LA4;
			stack_172833 = (TY184350*) newSeq((&NTI184350), 1);
			memset((void*)LOC6, 0, sizeof(LOC6));
			LOC6[0] = r;
			asgnRefNoCycle((void**) (&stack_172833->data[0]), LOC6[0]);
			{
				while (1) {
					Ropeobj172006* it_172835;
					if (!(((NI) 0) < (stack_172833 ? stack_172833->Sup.len : 0))) goto LA8;
					it_172835 = pop_172530((&stack_172833));
					{
						while (1) {
							if (!(*it_172835).data == 0) goto LA10;
							stack_172833 = (TY184350*) incrSeqV2(&(stack_172833)->Sup, sizeof(Ropeobj172006*));
							asgnRefNoCycle((void**) (&stack_172833->data[stack_172833->Sup.len]), (*it_172835).right);
							++stack_172833->Sup.len;
							it_172835 = (*it_172835).left;
						} LA10: ;
					}
					s_172826 = (*it_172835).data;
					write_15489(f, s_172826);
				} LA8: ;
			}
		}
		LA4: ;
	}
}
N_NIMCALL(void, addsonskipintlit_340678_3937434831)(Ttype294840* father0, Ttype294840* son0) {
	Ttype294840* s0;
	{
		if (!(*father0).sons == 0) goto LA3;
		if ((*father0).sons) nimGCunrefNoCycle((*father0).sons);
		(*father0).sons = (Ttypeseq294836*) newSeqRC1((&NTI294836), 0);
	}
	LA3: ;
	s0 = skipintlit_340651_3937434831(son0);
	(*father0).sons = (Ttypeseq294836*) incrSeqV2(&((*father0).sons)->Sup, sizeof(Ttype294840*));
	asgnRefNoCycle((void**) (&(*father0).sons->data[(*father0).sons->Sup.len]), s0);
	++(*father0).sons->Sup.len;
	propagatetoowner_298176_850551059(father0, s0);
}
Beispiel #4
0
N_NIMCALL(void, registercallback_263374)(Tctx263036* c, NimStringDesc* name, Vmcallback263032 callback) {
	TY263262 LOC1;
	NimStringDesc* LOC2;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	LOC1.Field0 = copyString(name);
	LOC1.Field1.ClEnv = callback.ClEnv;
	LOC1.Field1.ClPrc = callback.ClPrc;
	(*c).callbacks = (TY263261*) incrSeqV2(&((*c).callbacks)->Sup, sizeof(TY263262));
	LOC2 = 0;
	LOC2 = (*c).callbacks->data[(*c).callbacks->Sup.len].Field0; (*c).callbacks->data[(*c).callbacks->Sup.len].Field0 = copyStringRC1(LOC1.Field0);
	if (LOC2) nimGCunrefNoCycle(LOC2);
	asgnRef((void**) (&(*c).callbacks->data[(*c).callbacks->Sup.len].Field1.ClEnv), LOC1.Field1.ClEnv);
	(*c).callbacks->data[(*c).callbacks->Sup.len].Field1.ClPrc = LOC1.Field1.ClPrc;
	++(*c).callbacks->Sup.len;
}
Beispiel #5
0
N_NIMCALL(void, registercallback_LfvUcZy9aLHJCPEwxJ71uYw)(Tctx_hJGtOysUvnnuB9cLutWG9a2w* c0, NimStringDesc* name0, TY_S09bPfanQx9bEvdh4862x8zw callback0) {
	TY_UCrBsiykDha2x4hr9aWPwKA LOC1;
	NimStringDesc* LOC2;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	LOC1.Field0 = copyString(name0);
	LOC1.Field1.ClEnv = callback0.ClEnv;
	LOC1.Field1.ClPrc = callback0.ClPrc;
	(*c0).callbacks = (TY_RsxI3z4wK8jTuZiO0576gQ*) incrSeqV2(&((*c0).callbacks)->Sup, sizeof(TY_UCrBsiykDha2x4hr9aWPwKA));
	LOC2 = (NimStringDesc*)0;
	LOC2 = (*c0).callbacks->data[(*c0).callbacks->Sup.len].Field0; (*c0).callbacks->data[(*c0).callbacks->Sup.len].Field0 = copyStringRC1(LOC1.Field0);
	if (LOC2) nimGCunrefNoCycle(LOC2);
	asgnRef((void**) (&(*c0).callbacks->data[(*c0).callbacks->Sup.len].Field1.ClEnv), LOC1.Field1.ClEnv);
	(*c0).callbacks->data[(*c0).callbacks->Sup.len].Field1.ClPrc = LOC1.Field1.ClPrc;
	++(*c0).callbacks->Sup.len;
}
N_NIMCALL(void, registercallback_345393_984354655)(Tctx345035* c0, NimStringDesc* name0, Vmcallback345031 callback0) {
	TY345261 LOC1;
	NimStringDesc* LOC2;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	LOC1.Field0 = copyString(name0);
	LOC1.Field1.ClEnv = callback0.ClEnv;
	LOC1.Field1.ClPrc = callback0.ClPrc;
	(*c0).callbacks = (TY345260*) incrSeqV2(&((*c0).callbacks)->Sup, sizeof(TY345261));
	LOC2 = (NimStringDesc*)0;
	LOC2 = (*c0).callbacks->data[(*c0).callbacks->Sup.len].Field0; (*c0).callbacks->data[(*c0).callbacks->Sup.len].Field0 = copyStringRC1(LOC1.Field0);
	if (LOC2) nimGCunrefNoCycle(LOC2);
	asgnRef((void**) (&(*c0).callbacks->data[(*c0).callbacks->Sup.len].Field1.ClEnv), LOC1.Field1.ClEnv);
	(*c0).callbacks->data[(*c0).callbacks->Sup.len].Field1.ClPrc = LOC1.Field1.ClPrc;
	++(*c0).callbacks->Sup.len;
}
Beispiel #7
0
N_NIMCALL(NimStringDesc*, HEX24_172856)(Ropeobj172006* r) {
	NimStringDesc* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_172025(r);
	result = mnewString(((NI) (LOC1)));
	result = setLengthStr(result, ((NI) 0));
	{
		NimStringDesc* s_172860;
		s_172860 = 0;
		{
			TY184350* stack_172865;
			TY172507 LOC7;
			if (!!((r == NIM_NIL))) goto LA5;
			stack_172865 = (TY184350*) newSeq((&NTI184350), 1);
			memset((void*)LOC7, 0, sizeof(LOC7));
			LOC7[0] = r;
			asgnRefNoCycle((void**) (&stack_172865->data[0]), LOC7[0]);
			{
				while (1) {
					Ropeobj172006* it_172867;
					if (!(((NI) 0) < (stack_172865 ? stack_172865->Sup.len : 0))) goto LA9;
					it_172867 = pop_172530((&stack_172865));
					{
						while (1) {
							if (!(*it_172867).data == 0) goto LA11;
							stack_172865 = (TY184350*) incrSeqV2(&(stack_172865)->Sup, sizeof(Ropeobj172006*));
							asgnRefNoCycle((void**) (&stack_172865->data[stack_172865->Sup.len]), (*it_172867).right);
							++stack_172865->Sup.len;
							it_172867 = (*it_172867).left;
						} LA11: ;
					}
					s_172860 = (*it_172867).data;
					result = resizeString(result, s_172860->Sup.len + 0);
appendString(result, s_172860);
				} LA9: ;
			}
		}
		LA5: ;
	}
	return result;
}
N_NIMCALL(NIM_BOOL, cyclictreeaux_318004_2616423590)(Tnode292802* n0, Tnodeseq292796** visited0) {
	NIM_BOOL result0;
{	result0 = (NIM_BOOL)0;
	{
		if (!(n0 == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		Tnode292802* v_318202_2616423590;
		Tnodeseq292796* HEX3Atmp_318274_2616423590;
		NI i_318277_2616423590;
		NI L_318279_2616423590;
		v_318202_2616423590 = (Tnode292802*)0;
		HEX3Atmp_318274_2616423590 = (Tnodeseq292796*)0;
		HEX3Atmp_318274_2616423590 = (*visited0);
		i_318277_2616423590 = ((NI) 0);
		L_318279_2616423590 = (HEX3Atmp_318274_2616423590 ? HEX3Atmp_318274_2616423590->Sup.len : 0);
		{
			while (1) {
				if (!(i_318277_2616423590 < L_318279_2616423590)) goto LA7;
				v_318202_2616423590 = HEX3Atmp_318274_2616423590->data[i_318277_2616423590];
				{
					if (!(v_318202_2616423590 == n0)) goto LA10;
					result0 = NIM_TRUE;
					goto BeforeRet;
				}
				LA10: ;
				i_318277_2616423590 += ((NI) 1);
			} LA7: ;
		}
	}
	{
		Tnode292802* LOC24;
		if (!!(((*n0).kind >= ((Tnodekind292020) 1) && (*n0).kind <= ((Tnodekind292020) 23)))) goto LA14;
		(*visited0) = (Tnodeseq292796*) incrSeqV2(&((*visited0))->Sup, sizeof(Tnode292802*));
		asgnRefNoCycle((void**) (&(*visited0)->data[(*visited0)->Sup.len]), n0);
		++(*visited0)->Sup.len;
		{
			Tnode292802* nson_318244_2616423590;
			Tnodeseq292796* HEX3Atmp_318281_2616423590;
			NI i_318284_2616423590;
			NI L_318286_2616423590;
			nson_318244_2616423590 = (Tnode292802*)0;
			HEX3Atmp_318281_2616423590 = (Tnodeseq292796*)0;
			HEX3Atmp_318281_2616423590 = (*n0).kindU.S6.sons;
			i_318284_2616423590 = ((NI) 0);
			L_318286_2616423590 = (HEX3Atmp_318281_2616423590 ? HEX3Atmp_318281_2616423590->Sup.len : 0);
			{
				while (1) {
					if (!(i_318284_2616423590 < L_318286_2616423590)) goto LA18;
					nson_318244_2616423590 = HEX3Atmp_318281_2616423590->data[i_318284_2616423590];
					{
						NIM_BOOL LOC21;
						LOC21 = (NIM_BOOL)0;
						LOC21 = cyclictreeaux_318004_2616423590(nson_318244_2616423590, visited0);
						if (!LOC21) goto LA22;
						result0 = NIM_TRUE;
						goto BeforeRet;
					}
					LA22: ;
					i_318284_2616423590 += ((NI) 1);
				} LA18: ;
			}
		}
		LOC24 = (Tnode292802*)0;
		LOC24 = pop_318246_1689653243(visited0);
	}
	LA14: ;
	}BeforeRet: ;
	return result0;
}
N_NIMCALL(void, renderparamtypes_416233_117375469)(TY136002** found0, Tnode294802* n0) {
{	switch ((*n0).kind) {
	case ((Tnodekind294020) 76):
	{
		{
			NI i_416256_117375469;
			NI HEX3Atmp_416456_117375469;
			NI LOC3;
			NI res_416459_117375469;
			i_416256_117375469 = (NI)0;
			HEX3Atmp_416456_117375469 = (NI)0;
			LOC3 = (NI)0;
			LOC3 = len_295081_850551059(n0);
			HEX3Atmp_416456_117375469 = (LOC3 - 1);
			res_416459_117375469 = ((NI) 1);
			{
				while (1) {
					Tnode294802* LOC6;
					if (!(res_416459_117375469 <= HEX3Atmp_416456_117375469)) goto LA5;
					i_416256_117375469 = res_416459_117375469;
					LOC6 = (Tnode294802*)0;
					LOC6 = HEX5BHEX5D_295238_850551059(n0, i_416256_117375469);
					renderparamtypes_416233_117375469(found0, LOC6);
					res_416459_117375469 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((Tnodekind294020) 35):
	{
		NI typepos0;
		NI LOC8;
		NimStringDesc* typestr0;
		Tnode294802* LOC9;
		LOC8 = (NI)0;
		LOC8 = len_295081_850551059(n0);
		typepos0 = (NI)(LOC8 - ((NI) 2));
		LOC9 = (Tnode294802*)0;
		LOC9 = HEX5BHEX5D_295238_850551059(n0, typepos0);
		typestr0 = rendertype_414201_117375469(LOC9);
		{
			NIM_BOOL LOC12;
			Tnode294802* LOC14;
			Ttype294840* typ0;
			Tnode294802* LOC17;
			LOC12 = (NIM_BOOL)0;
			LOC12 = ((typestr0 ? typestr0->Sup.len : 0) < ((NI) 1));
			if (!(LOC12)) goto LA13;
			LOC14 = (Tnode294802*)0;
			LOC14 = HEX5BHEX5D_295238_850551059(n0, (NI)(typepos0 + ((NI) 1)));
			LOC12 = !(((*LOC14).kind == ((Tnodekind294020) 1)));
			LA13: ;
			if (!LOC12) goto LA15;
			LOC17 = (Tnode294802*)0;
			LOC17 = HEX5BHEX5D_295238_850551059(n0, (NI)(typepos0 + ((NI) 1)));
			typ0 = (*LOC17).typ;
			{
				if (!!(typ0 == 0)) goto LA20;
				typestr0 = typetostring_322017_3876443242(typ0, ((Tprefereddesc322011) 2));
			}
			LA20: ;
			{
				if (!((typestr0 ? typestr0->Sup.len : 0) < ((NI) 1))) goto LA24;
				goto BeforeRet;
			}
			LA24: ;
		}
		LA15: ;
		{
			NI i_416437_117375469;
			NI HEX3Atmp_416464_117375469;
			NI res_416467_117375469;
			i_416437_117375469 = (NI)0;
			HEX3Atmp_416464_117375469 = (NI)0;
			HEX3Atmp_416464_117375469 = (typepos0 - 1);
			res_416467_117375469 = ((NI) 0);
			{
				while (1) {
					NimStringDesc* LOC29;
					if (!(res_416467_117375469 <= HEX3Atmp_416464_117375469)) goto LA28;
					i_416437_117375469 = res_416467_117375469;
					(*found0) = (TY136002*) incrSeqV2(&((*found0))->Sup, sizeof(NimStringDesc*));
					LOC29 = (NimStringDesc*)0;
					LOC29 = (*found0)->data[(*found0)->Sup.len]; (*found0)->data[(*found0)->Sup.len] = copyStringRC1(typestr0);
					if (LOC29) nimGCunrefNoCycle(LOC29);
					++(*found0)->Sup.len;
					res_416467_117375469 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* LOC31;
		LOC31 = (NimStringDesc*)0;
		LOC31 = rawNewString(reprEnum((NI)(*n0).kind, (&NTI294020))->Sup.len + 31);
appendString(LOC31, ((NimStringDesc*) &T117375469_8));
appendString(LOC31, reprEnum((NI)(*n0).kind, (&NTI294020)));
		internalerror_198100_155036129((*n0).info, LOC31);
	}
	break;
	}
	}BeforeRet: ;
}
Beispiel #10
0
N_NIMCALL(NIM_BOOL, cyclictreeaux_fJtdv7gqXOKIakDjzod6NA)(Tnode_bROa11lyF5vxEN9aYNbHmhw* n0, TY_ehmV9bTklH2Gt9cXHV9c0HLeQ** visited0) {
	NIM_BOOL result0;
{	result0 = (NIM_BOOL)0;
	{
		if (!(n0 == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		Tnode_bROa11lyF5vxEN9aYNbHmhw* v_Lau3B9cje7ycRHzx0Y2E0Ww;
		TY_ehmV9bTklH2Gt9cXHV9c0HLeQ* HEX3Atmp_HVXC6c9cvKovQA62Co9ausew;
		NI i_uRWCHBHBX2vWV2WUgwQd8w;
		NI L_a0aKtqYl6snTT6FGNw0Pig;
		v_Lau3B9cje7ycRHzx0Y2E0Ww = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
		HEX3Atmp_HVXC6c9cvKovQA62Co9ausew = (TY_ehmV9bTklH2Gt9cXHV9c0HLeQ*)0;
		HEX3Atmp_HVXC6c9cvKovQA62Co9ausew = (*visited0);
		i_uRWCHBHBX2vWV2WUgwQd8w = ((NI) 0);
		L_a0aKtqYl6snTT6FGNw0Pig = (HEX3Atmp_HVXC6c9cvKovQA62Co9ausew ? HEX3Atmp_HVXC6c9cvKovQA62Co9ausew->Sup.len : 0);
		{
			while (1) {
				if (!(i_uRWCHBHBX2vWV2WUgwQd8w < L_a0aKtqYl6snTT6FGNw0Pig)) goto LA7;
				v_Lau3B9cje7ycRHzx0Y2E0Ww = HEX3Atmp_HVXC6c9cvKovQA62Co9ausew->data[i_uRWCHBHBX2vWV2WUgwQd8w];
				{
					if (!(v_Lau3B9cje7ycRHzx0Y2E0Ww == n0)) goto LA10;
					result0 = NIM_TRUE;
					goto BeforeRet;
				}
				LA10: ;
				i_uRWCHBHBX2vWV2WUgwQd8w += ((NI) 1);
			} LA7: ;
		}
	}
	{
		Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC24;
		if (!!(((*n0).kind >= ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 1) && (*n0).kind <= ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 23)))) goto LA14;
		(*visited0) = (TY_ehmV9bTklH2Gt9cXHV9c0HLeQ*) incrSeqV2(&((*visited0))->Sup, sizeof(Tnode_bROa11lyF5vxEN9aYNbHmhw*));
		asgnRefNoCycle((void**) (&(*visited0)->data[(*visited0)->Sup.len]), n0);
		++(*visited0)->Sup.len;
		{
			Tnode_bROa11lyF5vxEN9aYNbHmhw* nson_0W2njh1LyzRjEelINn6bvw;
			TY_ehmV9bTklH2Gt9cXHV9c0HLeQ* HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2;
			NI i_uRWCHBHBX2vWV2WUgwQd8w_2;
			NI L_a0aKtqYl6snTT6FGNw0Pig_2;
			nson_0W2njh1LyzRjEelINn6bvw = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
			HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2 = (TY_ehmV9bTklH2Gt9cXHV9c0HLeQ*)0;
			HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2 = (*n0).kindU.S6.sons;
			i_uRWCHBHBX2vWV2WUgwQd8w_2 = ((NI) 0);
			L_a0aKtqYl6snTT6FGNw0Pig_2 = (HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2 ? HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2->Sup.len : 0);
			{
				while (1) {
					if (!(i_uRWCHBHBX2vWV2WUgwQd8w_2 < L_a0aKtqYl6snTT6FGNw0Pig_2)) goto LA18;
					nson_0W2njh1LyzRjEelINn6bvw = HEX3Atmp_HVXC6c9cvKovQA62Co9ausew_2->data[i_uRWCHBHBX2vWV2WUgwQd8w_2];
					{
						NIM_BOOL LOC21;
						LOC21 = (NIM_BOOL)0;
						LOC21 = cyclictreeaux_fJtdv7gqXOKIakDjzod6NA(nson_0W2njh1LyzRjEelINn6bvw, visited0);
						if (!LOC21) goto LA22;
						result0 = NIM_TRUE;
						goto BeforeRet;
					}
					LA22: ;
					i_uRWCHBHBX2vWV2WUgwQd8w_2 += ((NI) 1);
				} LA18: ;
			}
		}
		LOC24 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
		LOC24 = pop_d29cpXTitwhGntYusVkzaCgtrees(visited0);
	}
	LA14: ;
	}BeforeRet: ;
	return result0;
}
N_NIMCALL(void, renderparamtypes_359233)(TY125202** found, Tnode215790* n) {
{	switch ((*n).kind) {
	case ((NU8) 76):
	{
		{
			NI i_359256;
			NI HEX3Atmp_359619;
			NI LOC3;
			NI res_359622;
			i_359256 = 0;
			HEX3Atmp_359619 = 0;
			LOC3 = 0;
			LOC3 = len_216059(n);
			HEX3Atmp_359619 = (LOC3 - 1);
			res_359622 = ((NI) 1);
			{
				while (1) {
					Tnode215790* LOC6;
					if (!(res_359622 <= HEX3Atmp_359619)) goto LA5;
					i_359256 = res_359622;
					LOC6 = 0;
					LOC6 = HEX5BHEX5D_216238(n, i_359256);
					renderparamtypes_359233(found, LOC6);
					res_359622 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC8;
		NimStringDesc* typestr;
		Tnode215790* LOC9;
		LOC8 = 0;
		LOC8 = len_216059(n);
		typepos = (NI)(LOC8 - ((NI) 2));
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_216238(n, typepos);
		typestr = rendertype_357209(LOC9);
		{
			NIM_BOOL LOC12;
			Tnode215790* LOC14;
			Ttype215828* typ;
			Tnode215790* LOC17;
			LOC12 = 0;
			LOC12 = ((typestr ? typestr->Sup.len : 0) < ((NI) 1));
			if (!(LOC12)) goto LA13;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_216238(n, (NI)(typepos + ((NI) 1)));
			LOC12 = !(((*LOC14).kind == ((NU8) 1)));
			LA13: ;
			if (!LOC12) goto LA15;
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_216238(n, (NI)(typepos + ((NI) 1)));
			typ = (*LOC17).typ;
			{
				if (!!(typ == 0)) goto LA20;
				typestr = typetostring_241017(typ, ((NU8) 2));
			}
			LA20: ;
			{
				if (!((typestr ? typestr->Sup.len : 0) < ((NI) 1))) goto LA24;
				goto BeforeRet;
			}
			LA24: ;
		}
		LA15: ;
		{
			NI i_359437;
			NI HEX3Atmp_359627;
			NI res_359630;
			i_359437 = 0;
			HEX3Atmp_359627 = 0;
			HEX3Atmp_359627 = (typepos - 1);
			res_359630 = ((NI) 0);
			{
				while (1) {
					NimStringDesc* LOC29;
					if (!(res_359630 <= HEX3Atmp_359627)) goto LA28;
					i_359437 = res_359630;
					(*found) = (TY125202*) incrSeqV2(&((*found))->Sup, sizeof(NimStringDesc*));
					LOC29 = 0;
					LOC29 = (*found)->data[(*found)->Sup.len]; (*found)->data[(*found)->Sup.len] = copyStringRC1(typestr);
					if (LOC29) nimGCunrefNoCycle(LOC29);
					++(*found)->Sup.len;
					res_359630 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* LOC31;
		LOC31 = 0;
		LOC31 = rawNewString(reprEnum((*n).kind, (&NTI215020))->Sup.len + 31);
appendString(LOC31, ((NimStringDesc*) &TMP5089));
appendString(LOC31, reprEnum((*n).kind, (&NTI215020)));
		internalerror_188100((*n).info, LOC31);
	}
	break;
	}
	}BeforeRet: ;
}
N_NIMCALL(void, methoddef_433628_3853300031)(Tsym294834* s0, NIM_BOOL fromcache0) {
	NI L0;
	Tsym294834* witness0;
	TY433227 LOC19;
	TY346318 LOC20;
{	L0 = (gmethods_433246_3853300031 ? gmethods_433246_3853300031->Sup.len : 0);
	witness0 = (Tsym294834*)0;
	{
		NI i_433653_3853300031;
		NI HEX3Atmp_433889_3853300031;
		NI res_433892_3853300031;
		i_433653_3853300031 = (NI)0;
		HEX3Atmp_433889_3853300031 = (NI)0;
		HEX3Atmp_433889_3853300031 = (NI)(L0 - ((NI) 1));
		res_433892_3853300031 = ((NI) 0);
		{
			while (1) {
				Tsym294834* disp0;
				Methodresult433249 LOC4;
				if (!(res_433892_3853300031 <= HEX3Atmp_433889_3853300031)) goto LA3;
				i_433653_3853300031 = res_433892_3853300031;
				disp0 = gmethods_433246_3853300031->data[i_433653_3853300031].Field1;
				LOC4 = (Methodresult433249)0;
				LOC4 = samemethodbucket_433253_3853300031(disp0, s0);
				switch (LOC4) {
				case ((Methodresult433249) 2):
				{
					Tnode294802* LOC6;
					gmethods_433246_3853300031->data[i_433653_3853300031].Field0 = (Tsymseq294804*) incrSeqV2(&(gmethods_433246_3853300031->data[i_433653_3853300031].Field0)->Sup, sizeof(Tsym294834*));
					asgnRefNoCycle((void**) (&gmethods_433246_3853300031->data[i_433653_3853300031].Field0->data[gmethods_433246_3853300031->data[i_433653_3853300031].Field0->Sup.len]), s0);
					++gmethods_433246_3853300031->data[i_433653_3853300031].Field0->Sup.len;
					LOC6 = (Tnode294802*)0;
					LOC6 = lastson_297364_850551059((*disp0).ast);
					attachdispatcher_433362_3853300031(s0, LOC6);
					fixupdispatcher_433466_3853300031(s0, disp0);
					checkmethodeffects_405033_422813333(disp0, s0);
					{
						NIM_BOOL LOC9;
						LOC9 = (NIM_BOOL)0;
						LOC9 = (((*s0).flags &(1U<<((NU)(((Tsymflag294184) 18))&31U)))!=0);
						if (!(LOC9)) goto LA10;
						LOC9 = !((gmethods_433246_3853300031->data[i_433653_3853300031].Field0->data[((NI) 0)] == s0));
						LA10: ;
						if (!LOC9) goto LA11;
						localerror_198085_155036129((*s0).info, ((NimStringDesc*) &T3853300031_6));
					}
					LA11: ;
					goto BeforeRet;
				}
				break;
				case ((Methodresult433249) 0):
				{
				}
				break;
				case ((Methodresult433249) 1):
				{
					{
						if (!witness0 == 0) goto LA17;
						witness0 = gmethods_433246_3853300031->data[i_433653_3853300031].Field0->data[((NI) 0)];
					}
					LA17: ;
				}
				break;
				}
				res_433892_3853300031 += ((NI) 1);
			} LA3: ;
		}
	}
	memset((void*)(&LOC19), 0, sizeof(LOC19));
	LOC19.Field0 = (Tsymseq294804*) newSeq((&NTI294804), 1);
	memset((void*)LOC20, 0, sizeof(LOC20));
	LOC20[0] = s0;
	asgnRefNoCycle((void**) (&LOC19.Field0->data[0]), LOC20[0]);
	LOC19.Field1 = createdispatcher_433397_3853300031(s0);
	gmethods_433246_3853300031 = (TY433226*) incrSeqV2(&(gmethods_433246_3853300031)->Sup, sizeof(TY433227));
	genericSeqAssign((&gmethods_433246_3853300031->data[gmethods_433246_3853300031->Sup.len].Field0), LOC19.Field0, (&NTI294804));
	asgnRefNoCycle((void**) (&gmethods_433246_3853300031->data[gmethods_433246_3853300031->Sup.len].Field1), LOC19.Field1);
	++gmethods_433246_3853300031->Sup.len;
	{
		if (!fromcache0) goto LA23;
		internalerror_198100_155036129((*s0).info, ((NimStringDesc*) &T3853300031_7));
	}
	LA23: ;
	{
		NimStringDesc* LOC29;
		NimStringDesc* LOC30;
		if (!!((witness0 == NIM_NIL))) goto LA27;
		LOC29 = (NimStringDesc*)0;
		LOC30 = (NimStringDesc*)0;
		LOC30 = HEX24_194431_155036129((*witness0).info);
		LOC29 = rawNewString((*(*s0).name).s->Sup.len + LOC30->Sup.len + 68);
appendString(LOC29, ((NimStringDesc*) &T3853300031_8));
appendString(LOC29, (*(*s0).name).s);
appendString(LOC29, ((NimStringDesc*) &T3853300031_9));
appendString(LOC29, LOC30);
		localerror_198085_155036129((*s0).info, LOC29);
	}
	goto LA25;
	LA27: ;
	{
		if (!!((((*s0).flags &(1U<<((NU)(((Tsymflag294184) 18))&31U)))!=0))) goto LA32;
		message_198095_155036129((*s0).info, ((Tmsgkind193002) 252), ((NimStringDesc*) &T3853300031_10));
	}
	goto LA25;
	LA32: ;
	LA25: ;
	}BeforeRet: ;
}
Beispiel #13
0
N_NIMCALL(void, add_313138)(Rstnode313008* father, Rstnode313008* son) {
	(*father).sons = (Rstnodeseq313006*) incrSeqV2(&((*father).sons)->Sup, sizeof(Rstnode313008*));
	asgnRefNoCycle((void**) (&(*father).sons->data[(*father).sons->Sup.len]), son);
	++(*father).sons->Sup.len;
}
Beispiel #14
0
N_NIMCALL(NIM_BOOL, equalsfile_173403)(Ropeobj172006* r, FILE* f) {
	NIM_BOOL result;
	TY173409 buf;
	NI bpos;
	NI blen;
	NI LOC26;
{	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	bpos = ((NI) 1024);
	blen = ((NI) 1024);
	{
		NimStringDesc* s_173431;
		s_173431 = 0;
		{
			TY184350* stack_173480;
			TY172507 LOC6;
			if (!!((r == NIM_NIL))) goto LA4;
			stack_173480 = (TY184350*) newSeq((&NTI184350), 1);
			memset((void*)LOC6, 0, sizeof(LOC6));
			LOC6[0] = r;
			asgnRefNoCycle((void**) (&stack_173480->data[0]), LOC6[0]);
			{
				while (1) {
					Ropeobj172006* it_173482;
					NI spos;
					NI slen;
					if (!(((NI) 0) < (stack_173480 ? stack_173480->Sup.len : 0))) goto LA8;
					it_173482 = pop_172530((&stack_173480));
					{
						while (1) {
							if (!(*it_173482).data == 0) goto LA10;
							stack_173480 = (TY184350*) incrSeqV2(&(stack_173480)->Sup, sizeof(Ropeobj172006*));
							asgnRefNoCycle((void**) (&stack_173480->data[stack_173480->Sup.len]), (*it_173482).right);
							++stack_173480->Sup.len;
							it_173482 = (*it_173482).left;
						} LA10: ;
					}
					s_173431 = (*it_173482).data;
					spos = ((NI) 0);
					slen = (s_173431 ? s_173431->Sup.len : 0);
					{
						while (1) {
							NI n;
							if (!(spos < slen)) goto LA12;
							{
								if (!(bpos == blen)) goto LA15;
								bpos = ((NI) 0);
								blen = readbuffer_15554(f, ((void*) ((&buf[(((NI) 0))- 0]))), ((NI) 1024));
								{
									if (!(blen == ((NI) 0))) goto LA19;
									result = NIM_FALSE;
									goto BeforeRet;
								}
								LA19: ;
							}
							LA15: ;
							n = (((NI)(blen - bpos) <= (NI)(slen - spos)) ? (NI)(blen - bpos) : (NI)(slen - spos));
							{
								NIM_BOOL LOC23;
								LOC23 = 0;
								LOC23 = equalMem(((void*) ((&buf[(bpos)- 0]))), ((void*) ((NI)(((NI) (s_173431->data)) + spos))), ((NI) (n)));
								if (!!(LOC23)) goto LA24;
								result = NIM_FALSE;
								goto BeforeRet;
							}
							LA24: ;
							spos += n;
							bpos += n;
						} LA12: ;
					}
				} LA8: ;
			}
		}
		LA4: ;
	}
	LOC26 = 0;
	LOC26 = readbuffer_15554(f, ((void*) ((&buf[(((NI) 0))- 0]))), ((NI) 1));
	result = (LOC26 == ((NI) 0));
	}BeforeRet: ;
	return result;
}
N_NIMCALL(void, loadfile_343030_3901077974)(Tlineinfo189336 info0) {
	NI32 i0;
	i0 = info0.fileindex;
	{
		if (!((gsourcefiles_343028_3901077974 ? gsourcefiles_343028_3901077974->Sup.len : 0) <= ((NI) (i0)))) goto LA3;
		gsourcefiles_343028_3901077974 = (TY343011*) setLengthSeq(&(gsourcefiles_343028_3901077974)->Sup, sizeof(Tsourcefile343003), ((NI) ((NI32)(i0 + ((NI32) 1)))));
	}
	LA3: ;
	{
		NimStringDesc* path0;
		NimStringDesc* LOC9;
		TY124315 LOC10;
		Baselexer216007 lex0;
		Filestreamobj157877* LOC19;
		Streamobj156818* LOC20;
		NI pos0;
		if (!gsourcefiles_343028_3901077974->data[i0].lines == 0) goto LA7;
		gsourcefiles_343028_3901077974->data[i0].fileidx = info0.fileindex;
		if (gsourcefiles_343028_3901077974->data[i0].lines) nimGCunrefNoCycle(gsourcefiles_343028_3901077974->data[i0].lines);
		gsourcefiles_343028_3901077974->data[i0].lines = (TY134602*) newSeqRC1((&NTI134602), 0);
		path0 = tofullpath_190264_155036129(info0.fileindex);
		LOC9 = (NimStringDesc*)0;
		LOC9 = gsourcefiles_343028_3901077974->data[i0].fullpath; gsourcefiles_343028_3901077974->data[i0].fullpath = copyStringRC1(path0);
		if (LOC9) nimGCunrefNoCycle(LOC9);
		memset((void*)(&LOC10), 0, sizeof(LOC10));
		nossplitFile(path0, (&LOC10));
		gsourcefiles_343028_3901077974->data[i0].isnimfixfile = eqStrings(LOC10.Field2, ((NimStringDesc*) &T3901077974_5));
		{
			NimStringDesc* line_343077_3901077974;
			FILE* f_343104_3901077974;
			TSafePoint T3901077974_6;
			line_343077_3901077974 = (NimStringDesc*)0;
			f_343104_3901077974 = open_14817_1689653243(path0, ((Filemode13009) 0), ((NI) 8000));
			pushSafePoint(&T3901077974_6);
			T3901077974_6.status = setjmp(T3901077974_6.context);
			if (T3901077974_6.status == 0) {
				NimStringDesc* res_343106_3901077974;
				res_343106_3901077974 = rawNewString(((NI) 80));
				{
					while (1) {
						NIM_BOOL LOC15;
						NimStringDesc* LOC16;
						LOC15 = (NIM_BOOL)0;
						LOC15 = readline_14915_1689653243(f_343104_3901077974, (&res_343106_3901077974));
						if (!LOC15) goto LA14;
						line_343077_3901077974 = res_343106_3901077974;
						gsourcefiles_343028_3901077974->data[i0].lines = (TY134602*) incrSeqV2(&(gsourcefiles_343028_3901077974->data[i0].lines)->Sup, sizeof(NimStringDesc*));
						LOC16 = (NimStringDesc*)0;
						LOC16 = gsourcefiles_343028_3901077974->data[i0].lines->data[gsourcefiles_343028_3901077974->data[i0].lines->Sup.len]; gsourcefiles_343028_3901077974->data[i0].lines->data[gsourcefiles_343028_3901077974->data[i0].lines->Sup.len] = copyStringRC1(line_343077_3901077974);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						++gsourcefiles_343028_3901077974->data[i0].lines->Sup.len;
					} LA14: ;
				}
				popSafePoint();
			}
			else {
				popSafePoint();
			}
			{
				close_14853_1689653243(f_343104_3901077974);
			}
			if (T3901077974_6.status != 0) reraiseException();
		}
		memset((void*)(&lex0), 0, sizeof(lex0));
		lex0.Sup.m_type = (&NTI216007);
		LOC19 = (Filestreamobj157877*)0;
		LOC19 = newfilestream_157942_1780494535(path0, ((Filemode13009) 0));
		LOC20 = (Streamobj156818*)0;
		LOC20 = &LOC19->Sup;
		open_218223_1314243012((&lex0), LOC20, ((NI) 8192), T3901077974_7);
		pos0 = lex0.bufpos;
		{
			while (1) {
				switch (((NU8)(lex0.buf[pos0]))) {
				case 13:
				{
					NimStringDesc* LOC24;
					LOC24 = (NimStringDesc*)0;
					LOC24 = gsourcefiles_343028_3901077974->data[i0].newline; gsourcefiles_343028_3901077974->data[i0].newline = copyStringRC1(((NimStringDesc*) &T3901077974_8));
					if (LOC24) nimGCunrefNoCycle(LOC24);
					goto LA21;
				}
				break;
				case 10:
				case 0:
				{
					NimStringDesc* LOC26;
					LOC26 = (NimStringDesc*)0;
					LOC26 = gsourcefiles_343028_3901077974->data[i0].newline; gsourcefiles_343028_3901077974->data[i0].newline = copyStringRC1(((NimStringDesc*) &T3901077974_9));
					if (LOC26) nimGCunrefNoCycle(LOC26);
					goto LA21;
				}
				break;
				default:
				{
				}
				break;
				}
				pos0 += ((NI) 1);
			}
		} LA21: ;
		close_216021_1314243012((&lex0));
	}
	LA7: ;
}
Beispiel #16
0
N_NIMCALL(void, add_ZvlV89auQrVc4pTJdjhNQiQ)(Rstnode_CjRS2xrmuD58kdGedE3yyg* father0, Rstnode_CjRS2xrmuD58kdGedE3yyg* son0) {
	(*father0).sons = (TY_sawZST1Esj3o7EY9ayWwGPw*) incrSeqV2(&((*father0).sons)->Sup, sizeof(Rstnode_CjRS2xrmuD58kdGedE3yyg*));
	asgnRefNoCycle((void**) (&(*father0).sons->data[(*father0).sons->Sup.len]), son0);
	++(*father0).sons->Sup.len;
}
Beispiel #17
0
N_NIMCALL(void, renderparamtypes_nsr8uxcmlhx5QS6xeTtlLA)(TY_sM4lkSb7zS6F7OVMvW9cffQ** found0, Tnode_bROa11lyF5vxEN9aYNbHmhw* n0) {
{	switch ((*n0).kind) {
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 76):
	{
		{
			NI i_0rMGonPChOwGyGaqScGiOg;
			NI HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ;
			NI LOC3;
			NI res_cPxH9ccENVRiMXrscMrDyAw;
			i_0rMGonPChOwGyGaqScGiOg = (NI)0;
			HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ = (NI)0;
			LOC3 = (NI)0;
			LOC3 = len_CdME9baJhvveuPEDZE9bXoxAlambdalifting(n0);
			HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ = (LOC3 - 1);
			res_cPxH9ccENVRiMXrscMrDyAw = ((NI) 1);
			{
				while (1) {
					Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC6;
					if (!(res_cPxH9ccENVRiMXrscMrDyAw <= HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ)) goto LA5;
					i_0rMGonPChOwGyGaqScGiOg = res_cPxH9ccENVRiMXrscMrDyAw;
					LOC6 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
					LOC6 = HEX5BHEX5D_4mGh5VHoHoaSkXDYdG6pyAitersgen(n0, i_0rMGonPChOwGyGaqScGiOg);
					renderparamtypes_nsr8uxcmlhx5QS6xeTtlLA(found0, LOC6);
					res_cPxH9ccENVRiMXrscMrDyAw += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 35):
	{
		NI typepos0;
		NI LOC8;
		NimStringDesc* typestr0;
		Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC9;
		LOC8 = (NI)0;
		LOC8 = len_CdME9baJhvveuPEDZE9bXoxAlambdalifting(n0);
		typepos0 = (NI)(LOC8 - ((NI) 2));
		LOC9 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
		LOC9 = HEX5BHEX5D_4mGh5VHoHoaSkXDYdG6pyAitersgen(n0, typepos0);
		typestr0 = rendertype_0mm4u02iK86TVZPOApjzQA_2(LOC9);
		{
			NIM_BOOL LOC12;
			Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC14;
			Ttype_LTUWCZolpovw9cWE3JBWSUw* typ0;
			Tnode_bROa11lyF5vxEN9aYNbHmhw* LOC17;
			LOC12 = (NIM_BOOL)0;
			LOC12 = ((typestr0 ? typestr0->Sup.len : 0) < ((NI) 1));
			if (!(LOC12)) goto LA13;
			LOC14 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
			LOC14 = HEX5BHEX5D_4mGh5VHoHoaSkXDYdG6pyAitersgen(n0, (NI)(typepos0 + ((NI) 1)));
			LOC12 = !(((*LOC14).kind == ((Tnodekind_G4E4Gxe7oI2Cm03rkiOzQw) 1)));
			LA13: ;
			if (!LOC12) goto LA15;
			LOC17 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
			LOC17 = HEX5BHEX5D_4mGh5VHoHoaSkXDYdG6pyAitersgen(n0, (NI)(typepos0 + ((NI) 1)));
			typ0 = (*LOC17).typ;
			{
				if (!!((typ0 == 0))) goto LA20;
				typestr0 = typetostring_iUZlBdvGqNPVN17wd9aVBNw(typ0, ((Tprefereddesc_tnd4qt9c4xddV8oKV5zyusw) 2));
			}
			LA20: ;
			{
				if (!((typestr0 ? typestr0->Sup.len : 0) < ((NI) 1))) goto LA24;
				goto BeforeRet;
			}
			LA24: ;
		}
		LA15: ;
		{
			NI i_0rMGonPChOwGyGaqScGiOg_2;
			NI HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ_2;
			NI res_cPxH9ccENVRiMXrscMrDyAw_2;
			i_0rMGonPChOwGyGaqScGiOg_2 = (NI)0;
			HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ_2 = (NI)0;
			HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ_2 = (typepos0 - 1);
			res_cPxH9ccENVRiMXrscMrDyAw_2 = ((NI) 0);
			{
				while (1) {
					NimStringDesc* LOC29;
					if (!(res_cPxH9ccENVRiMXrscMrDyAw_2 <= HEX3Atmp_8b0gUyUsj3vT9aTxmyLN5TQ_2)) goto LA28;
					i_0rMGonPChOwGyGaqScGiOg_2 = res_cPxH9ccENVRiMXrscMrDyAw_2;
					(*found0) = (TY_sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV2(&((*found0))->Sup, sizeof(NimStringDesc*));
					LOC29 = (NimStringDesc*)0;
					LOC29 = (*found0)->data[(*found0)->Sup.len]; (*found0)->data[(*found0)->Sup.len] = copyStringRC1(typestr0);
					if (LOC29) nimGCunrefNoCycle(LOC29);
					++(*found0)->Sup.len;
					res_cPxH9ccENVRiMXrscMrDyAw_2 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* LOC31;
		LOC31 = (NimStringDesc*)0;
		LOC31 = rawNewString(reprEnum((NI)(*n0).kind, (&NTI_G4E4Gxe7oI2Cm03rkiOzQw))->Sup.len + 31);
appendString(LOC31, ((NimStringDesc*) &T_SgHDIVcSir4dkKoe0Xsi0A_11));
appendString(LOC31, reprEnum((NI)(*n0).kind, (&NTI_G4E4Gxe7oI2Cm03rkiOzQw)));
		internalerror_MXmtqrCmYwtOPkDCFgUWKQ((*n0).info, LOC31);
	}
	break;
	}
	}BeforeRet: ;
}
N_NIMCALL(void, add_369146_4150536388)(Rstnode369011* father0, Rstnode369011* son0) {
	(*father0).sons = (Rstnodeseq369009*) incrSeqV2(&((*father0).sons)->Sup, sizeof(Rstnode369011*));
	asgnRefNoCycle((void**) (&(*father0).sons->data[(*father0).sons->Sup.len]), son0);
	++(*father0).sons->Sup.len;
}