コード例 #1
0
ファイル: compiler_trees.c プロジェクト: jlp765/csources
N_NIMCALL(NIM_BOOL, cyclictree_220138)(Tnode191813* n) {
	NIM_BOOL result;
	Tnode191813* s;
	result = 0;
	s = newnodei_193351(((NU8) 1), (*n).info);
	result = cyclictreeaux_220072(n, s);
	return result;
}
コード例 #2
0
ファイル: compiler_trees.c プロジェクト: jlp765/csources
N_NIMCALL(NIM_BOOL, cyclictreeaux_220072)(Tnode191813* n, Tnode191813* s) {
	NIM_BOOL result;
	NI m;
{	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = hasson_220019(s, n);
		if (!LOC7) goto LA8;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA8: ;
	m = sonslen_194403(s);
	addson_193819(s, n);
	{
		if (!!(((*n).kind >= ((NU8) 1) && (*n).kind <= ((NU8) 23)))) goto LA12;
		{
			NI i_220113;
			NI HEX3Atmp_220116;
			NI LOC15;
			NI res_220119;
			i_220113 = 0;
			HEX3Atmp_220116 = 0;
			LOC15 = 0;
			LOC15 = sonslen_194403(n);
			HEX3Atmp_220116 = (NI)(LOC15 - ((NI) 1));
			res_220119 = ((NI) 0);
			{
				while (1) {
					if (!(res_220119 <= HEX3Atmp_220116)) goto LA17;
					i_220113 = res_220119;
					{
						NIM_BOOL LOC20;
						LOC20 = 0;
						LOC20 = cyclictreeaux_220072((*n).kindU.S6.sons->data[i_220113], s);
						if (!LOC20) goto LA21;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA21: ;
					res_220119 += ((NI) 1);
				} LA17: ;
			}
		}
	}
	LA12: ;
	result = NIM_FALSE;
	delson_195581(s, m);
	}BeforeRet: ;
	return result;
}
コード例 #3
0
ファイル: trees.c プロジェクト: reactormonk/csources
N_NIMCALL(NIM_BOOL, cyclictree_220143)(tnode186813* n) {
	NIM_BOOL result;
	tnode186813* s;
	nimfr("cyclicTree", "trees.nim")
	result = 0;
	nimln(36, "trees.nim");
	s = newnodei_187109(((NU8) 1), (*n).Info);
	nimln(37, "trees.nim");
	result = cyclictreeaux_220072(n, s);
	popFrame();
	return result;
}
コード例 #4
0
ファイル: trees.c プロジェクト: reactormonk/csources
N_NIMCALL(NIM_BOOL, cyclictreeaux_220072)(tnode186813* n, tnode186813* s) {
	NIM_BOOL result;
	NI m;
	nimfr("cyclicTreeAux", "trees.nim")
	result = 0;
	nimln(22, "trees.nim");
	{
		nimln(22, "trees.nim");
		if (!(n == NIM_NIL)) goto LA3;
		nimln(23, "trees.nim");
		nimln(23, "trees.nim");
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	nimln(24, "trees.nim");
	{
		NIM_BOOL LOC7;
		nimln(24, "trees.nim");
		LOC7 = 0;
		LOC7 = hasson_220017(s, n);
		if (!LOC7) goto LA8;
		nimln(25, "trees.nim");
		nimln(25, "trees.nim");
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA8: ;
	nimln(26, "trees.nim");
	m = sonslen_187191(s);
	nimln(27, "trees.nim");
	addson_187217(s, n);
	nimln(28, "trees.nim");
	{
		NI i_220121;
		NI HEX3Atmp_220136;
		NI LOC14;
		NI TMP2713;
		NI res_220138;
		nimln(28, "trees.nim");
		nimln(28, "trees.nim");
		if (!!(((*n).Kind >= ((NU8) 1) && (*n).Kind <= ((NU8) 23)))) goto LA12;
		i_220121 = 0;
		HEX3Atmp_220136 = 0;
		nimln(29, "trees.nim");
		nimln(29, "trees.nim");
		nimln(29, "trees.nim");
		LOC14 = 0;
		LOC14 = sonslen_187191(n);
		TMP2713 = subInt(LOC14, 1);
		HEX3Atmp_220136 = (NI32)(TMP2713);
		nimln(1450, "system.nim");
		res_220138 = 0;
		nimln(1451, "system.nim");
		while (1) {
			nimln(1451, "system.nim");
			if (!(res_220138 <= HEX3Atmp_220136)) goto LA15;
			nimln(1450, "system.nim");
			i_220121 = res_220138;
			nimln(30, "trees.nim");
			{
				NIM_BOOL LOC18;
				nimln(30, "trees.nim");
				if (((TMP2710[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP2711));
				if ((NU)(i_220121) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC18 = 0;
				LOC18 = cyclictreeaux_220072((*n).kindU.S6.Sons->data[i_220121], s);
				if (!LOC18) goto LA19;
				nimln(31, "trees.nim");
				nimln(31, "trees.nim");
				result = NIM_TRUE;
				goto BeforeRet;
			}
			LA19: ;
			nimln(1453, "system.nim");
			res_220138 = addInt(res_220138, 1);
		} LA15: ;
	}
	LA12: ;
	nimln(32, "trees.nim");
	result = NIM_FALSE;
	nimln(33, "trees.nim");
	delson_187222(s, m);
	BeforeRet: ;
	popFrame();
	return result;
}