Beispiel #1
0
N_NIMCALL(tnode191813*, evalimport_259002)(tcontext254019* c, tnode191813* n) {
	tnode191813* result;
	tintset188047 emptyset;
	NI i_260021;
	NI HEX3Atmp_260055;
	NI LOC1;
	NI TMP3293;
	NI res_260057;
	nimfr("evalImport", "importer.nim")
	result = 0;
	nimln(166, "importer.nim");
	result = n;
	memset((void*)&emptyset, 0, sizeof(emptyset));
	i_260021 = 0;
	HEX3Atmp_260055 = 0;
	nimln(168, "importer.nim");
	nimln(168, "importer.nim");
	nimln(168, "importer.nim");
	LOC1 = 0;
	LOC1 = sonslen_192191(n);
	TMP3293 = subInt(LOC1, 1);
	HEX3Atmp_260055 = (NI64)(TMP3293);
	nimln(1451, "system.nim");
	res_260057 = 0;
	nimln(1452, "system.nim");
	while (1) {
		tsym191843* m;
		nimln(1452, "system.nim");
		if (!(res_260057 <= HEX3Atmp_260055)) goto LA2;
		nimln(1451, "system.nim");
		i_260021 = res_260057;
		nimln(169, "importer.nim");
		if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
		if ((NU)(i_260021) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		m = myimportmodule_259982(c, (*n).kindU.S6.Sons->data[i_260021]);
		nimln(170, "importer.nim");
		{
			nimln(170, "importer.nim");
			nimln(170, "importer.nim");
			if (!!((m == NIM_NIL))) goto LA5;
			nimln(172, "importer.nim");
			adddecl_256550(c, m);
			nimln(173, "importer.nim");
			importallsymbolsexcept_259529(c, m, &emptyset);
			nimln(174, "importer.nim");
			importforwarded_259633(c, (*m).Ast, &emptyset);
		}
		LA5: ;
		nimln(1454, "system.nim");
		res_260057 = addInt(res_260057, 1);
	} LA2: ;
	popFrame();
	return result;
}
Beispiel #2
0
static N_INLINE(tnode191813*, lastson_192199)(tnode191813* n) {
	tnode191813* result;
	NI LOC1;
	NI TMP5686;
	nimfr("lastSon", "ast.nim")
	result = 0;
	nimln(1420, "ast.nim");
	if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
	nimln(1420, "ast.nim");
	nimln(1420, "ast.nim");
	LOC1 = 0;
	LOC1 = sonslen_192191(n);
	TMP5686 = subInt(LOC1, 1);
	if ((NU)((NI32)(TMP5686)) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
	result = (*n).kindU.S6.Sons->data[(NI32)(TMP5686)];
	popFrame();
	return result;
}
Beispiel #3
0
N_NIMCALL(tsym191843*, ithfield_420007)(tnode191813* n, NI field) {
	tsym191843* 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_420024;
		NI HEX3Atmp_420182;
		NI LOC2;
		NI TMP5681;
		NI res_420184;
		i_420024 = 0;
		HEX3Atmp_420182 = 0;
		nimln(19, "semmacrosanity.nim");
		nimln(19, "semmacrosanity.nim");
		nimln(19, "semmacrosanity.nim");
		LOC2 = 0;
		LOC2 = sonslen_192191(n);
		TMP5681 = subInt(LOC2, 1);
		HEX3Atmp_420182 = (NI32)(TMP5681);
		nimln(1451, "system.nim");
		res_420184 = 0;
		nimln(1452, "system.nim");
		while (1) {
			NI TMP5682;
			nimln(1452, "system.nim");
			if (!(res_420184 <= HEX3Atmp_420182)) goto LA3;
			nimln(1451, "system.nim");
			i_420024 = res_420184;
			nimln(20, "semmacrosanity.nim");
			if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
			if ((NU)(i_420024) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			nimln(20, "semmacrosanity.nim");
			TMP5682 = subInt(field, i_420024);
			result = ithfield_420007((*n).kindU.S6.Sons->data[i_420024], (NI32)(TMP5682));
			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(1454, "system.nim");
			res_420184 = addInt(res_420184, 1);
		} LA3: ;
	}
	break;
	case ((NU8) 137):
	{
		NI TMP5684;
		NI i_420122;
		NI HEX3Atmp_420186;
		NI LOC17;
		NI TMP5685;
		NI res_420188;
		nimln(23, "semmacrosanity.nim");
		{
			nimln(23, "semmacrosanity.nim");
			nimln(23, "semmacrosanity.nim");
			if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
			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_168591((*n).Info, ((NimStringDesc*) &TMP5683));
		}
		LA11: ;
		nimln(24, "semmacrosanity.nim");
		if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		nimln(24, "semmacrosanity.nim");
		TMP5684 = subInt(field, 1);
		result = ithfield_420007((*n).kindU.S6.Sons->data[0], (NI32)(TMP5684));
		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_420122 = 0;
		HEX3Atmp_420186 = 0;
		nimln(26, "semmacrosanity.nim");
		nimln(26, "semmacrosanity.nim");
		nimln(26, "semmacrosanity.nim");
		LOC17 = 0;
		LOC17 = sonslen_192191(n);
		TMP5685 = subInt(LOC17, 1);
		HEX3Atmp_420186 = (NI32)(TMP5685);
		nimln(1451, "system.nim");
		res_420188 = 1;
		nimln(1452, "system.nim");
		while (1) {
			nimln(1452, "system.nim");
			if (!(res_420188 <= HEX3Atmp_420186)) goto LA18;
			nimln(1451, "system.nim");
			i_420122 = res_420188;
			nimln(27, "semmacrosanity.nim");
			if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
			if ((NU)(i_420122) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			switch ((*(*n).kindU.S6.Sons->data[i_420122]).Kind) {
			case ((NU8) 85):
			case ((NU8) 88):
			{
				tnode191813* LOC20;
				NI TMP5687;
				nimln(29, "semmacrosanity.nim");
				nimln(29, "semmacrosanity.nim");
				if (((TMP5679[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5680));
				if ((NU)(i_420122) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC20 = 0;
				LOC20 = lastson_192199((*n).kindU.S6.Sons->data[i_420122]);
				nimln(29, "semmacrosanity.nim");
				TMP5687 = subInt(field, 1);
				result = ithfield_420007(LOC20, (NI32)(TMP5687));
				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_168591((*n).Info, ((NimStringDesc*) &TMP5688));
			}
			break;
			}
			nimln(1454, "system.nim");
			res_420188 = addInt(res_420188, 1);
		} LA18: ;
	}
	break;
	case ((NU8) 3):
	{
		nimln(33, "semmacrosanity.nim");
		{
			nimln(33, "semmacrosanity.nim");
			if (!(field == 0)) goto LA29;
			nimln(33, "semmacrosanity.nim");
			if (!(((TMP5689[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5690));
			result = (*n).kindU.S4.Sym;
		}
		LA29: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Beispiel #4
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;
}
Beispiel #5
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;
}
Beispiel #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();
}
Beispiel #7
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();
}
Beispiel #8
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;
}
Beispiel #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;
}
Beispiel #10
0
N_NIMCALL(tnode191813*, adddotdependency_525031)(tpasscontext250003* c, tnode191813* n) {
	tnode191813* result;
	tgen525012* g;
	nimfr("addDotDependency", "depends.nim")
	result = 0;
	nimln(29, "depends.nim");
	result = n;
	nimln(30, "depends.nim");
	if (c) chckObj((*c).Sup.m_type, (&NTI525012));
	g = ((tgen525012*) (c));
	nimln(31, "depends.nim");
	switch ((*n).Kind) {
	case ((NU8) 115):
	{
		NI i_525049;
		NI HEX3Atmp_525107;
		NI LOC2;
		NI TMP7606;
		NI res_525109;
		i_525049 = 0;
		HEX3Atmp_525107 = 0;
		nimln(33, "depends.nim");
		nimln(33, "depends.nim");
		nimln(33, "depends.nim");
		LOC2 = 0;
		LOC2 = sonslen_192191(n);
		TMP7606 = subInt(LOC2, 1);
		HEX3Atmp_525107 = (NI64)(TMP7606);
		nimln(1451, "system.nim");
		res_525109 = 0;
		nimln(1452, "system.nim");
		while (1) {
			NimStringDesc* imported;
			nimln(1452, "system.nim");
			if (!(res_525109 <= HEX3Atmp_525107)) goto LA3;
			nimln(1451, "system.nim");
			i_525049 = res_525109;
			nimln(34, "depends.nim");
			if (((TMP7604[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP7605));
			if ((NU)(i_525049) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			imported = getmodulename_259012((*n).kindU.S6.Sons->data[i_525049]);
			nimln(35, "depends.nim");
			adddependencyaux_525020((*(*(*g).Module).Name).S, imported);
			nimln(1454, "system.nim");
			res_525109 = addInt(res_525109, 1);
		} LA3: ;
	}
	break;
	case ((NU8) 119):
	case ((NU8) 116):
	{
		NimStringDesc* imported;
		nimln(37, "depends.nim");
		if (((TMP7604[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP7605));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		imported = getmodulename_259012((*n).kindU.S6.Sons->data[0]);
		nimln(38, "depends.nim");
		adddependencyaux_525020((*(*(*g).Module).Name).S, imported);
	}
	break;
	case ((NU8) 114):
	case ((NU8) 111):
	case ((NU8) 125):
	case ((NU8) 126):
	{
		NI i_525092;
		NI HEX3Atmp_525111;
		NI LOC6;
		NI TMP7607;
		NI res_525113;
		i_525092 = 0;
		HEX3Atmp_525111 = 0;
		nimln(40, "depends.nim");
		nimln(40, "depends.nim");
		nimln(40, "depends.nim");
		LOC6 = 0;
		LOC6 = sonslen_192191(n);
		TMP7607 = subInt(LOC6, 1);
		HEX3Atmp_525111 = (NI64)(TMP7607);
		nimln(1451, "system.nim");
		res_525113 = 0;
		nimln(1452, "system.nim");
		while (1) {
			tnode191813* LOC8;
			nimln(1452, "system.nim");
			if (!(res_525113 <= HEX3Atmp_525111)) goto LA7;
			nimln(1451, "system.nim");
			i_525092 = res_525113;
			nimln(40, "depends.nim");
			nimln(40, "depends.nim");
			if (((TMP7604[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP7605));
			if ((NU)(i_525092) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC8 = 0;
			LOC8 = adddotdependency_525031(c, (*n).kindU.S6.Sons->data[i_525092]);
			nimln(1454, "system.nim");
			res_525113 = addInt(res_525113, 1);
		} LA7: ;
	}
	break;
	default:
	{
	}
	break;
	}
	popFrame();
	return result;
}