Ejemplo n.º 1
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* S_23051, NI* Number_23053, NI Start_23054) {
NI Result_23055;
NI64 Res_23056;
NIM_BOOL LOC2;
NIM_BOOL LOC4;
EOverflow* E_23069;
Result_23055 = 0;
Res_23056 = 0;
Result_23055 = npuParseBiggestInt(S_23051, &Res_23056, Start_23054);
LOC2 = NIM_TRUE;
if (!(LOC2)) goto LA3;
LOC4 = (Res_23056 < (-2147483647 -1));
if (LOC4) goto LA5;
LOC4 = (2147483647 < Res_23056);
LA5: ;
LOC2 = LOC4;
LA3: ;
if (!LOC2) goto LA6;
E_23069 = 0;
E_23069 = (EOverflow*) newObj(NTI6051, sizeof(EOverflow));
(*E_23069).Sup.Sup.Sup.Sup.m_type = NTI432;
asgnRefNoCycle((void**) &(*E_23069).Sup.Sup.Sup.message, copyString(((NimStringDesc*) &TMP195656)));
raiseException((E_Base*)E_23069, "EOverflow");
goto LA1;
LA6: ;
(*Number_23053) = ((NI) (Res_23056));
LA1: ;
return Result_23055;
}
Ejemplo n.º 2
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	nimfr("parseInt", "parseutils.nim")
	result = 0;
	res = 0;
	nimln(227, "parseutils.nim");
	result = npuParseBiggestInt(s, (&res), start);
	nimln(228, "parseutils.nim");
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		Overflowerror3443* e_94055;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC3 = NIM_TRUE;
		if (!(LOC3)) goto LA4;
		nimln(229, "parseutils.nim");
		LOC5 = 0;
		LOC5 = (res < IL64(-2147483648));
		if (LOC5) goto LA6;
		LOC5 = (IL64(2147483647) < res);
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		e_94055 = 0;
		nimln(2265, "system.nim");
		e_94055 = (Overflowerror3443*) newObj((&NTI23401), sizeof(Overflowerror3443));
		(*e_94055).Sup.Sup.Sup.m_type = (&NTI3443);
		nimln(2266, "system.nim");
		LOC9 = 0;
		LOC9 = (*e_94055).Sup.Sup.message; (*e_94055).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP283));
		if (LOC9) nimGCunrefNoCycle(LOC9);
		nimln(230, "parseutils.nim");
		raiseException((Exception*)e_94055, "OverflowError");
	}
	goto LA1;
	LA7: ;
	{
		nimln(231, "parseutils.nim");
		if (!!((result == ((NI) 0)))) goto LA11;
		nimln(232, "parseutils.nim");
		(*number) = ((NI)chckRange64(res, ((NI) (-2147483647 -1)), ((NI) 2147483647)));
	}
	goto LA1;
	LA11: ;
	LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 3
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	nimfr("parseInt", "parseutils.nim")
	result = 0;
	res = 0;
	nimln(227, "parseutils.nim");
	result = npuParseBiggestInt(s, &res, start);
	nimln(228, "parseutils.nim");
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		EOverflow* e_86686;
		NimStringDesc* LOC9;
		nimln(228, "parseutils.nim");
		LOC3 = 0;
		LOC3 = NIM_TRUE;
		if (!(LOC3)) goto LA4;
		nimln(229, "parseutils.nim");
		LOC5 = 0;
		nimln(229, "parseutils.nim");
		LOC5 = (res < (-2147483647 -1));
		if (LOC5) goto LA6;
		nimln(229, "parseutils.nim");
		LOC5 = (2147483647 < res);
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		e_86686 = 0;
		nimln(1992, "system.nim");
		e_86686 = (EOverflow*) newObj((&NTI19201), sizeof(EOverflow));
		(*e_86686).Sup.Sup.Sup.Sup.m_type = (&NTI2445);
		nimln(1993, "system.nim");
		LOC9 = 0;
		LOC9 = (*e_86686).Sup.Sup.Sup.message; (*e_86686).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP1140));
		if (LOC9) nimGCunrefNoCycle(LOC9);
		nimln(230, "parseutils.nim");
		raiseException((E_Base*)e_86686, "EOverflow");
	}
	goto LA1;
	LA7: ;
	{
		nimln(232, "parseutils.nim");
		(*number) = ((NI)chckRange64(res, (-2147483647 -1), 2147483647));
	}
	LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 4
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	nimfr("parseInt", "parseutils.nim")
	result = 0;
	res = 0;
	nimln(227, "parseutils.nim");
	result = npuParseBiggestInt(s, &res, start);
	nimln(228, "parseutils.nim");
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		EOverflow* e_85686;
		NimStringDesc* LOC9;
		nimln(228, "parseutils.nim");
		LOC3 = 0;
		LOC3 = NIM_FALSE;
		if (!(LOC3)) goto LA4;
		nimln(229, "parseutils.nim");
		LOC5 = 0;
		nimln(229, "parseutils.nim");
		LOC5 = (res < (IL64(-9223372036854775807) - IL64(1)));
		if (LOC5) goto LA6;
		nimln(229, "parseutils.nim");
		LOC5 = (IL64(9223372036854775807) < res);
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		e_85686 = 0;
		nimln(1991, "system.nim");
		e_85686 = (EOverflow*) newObj((&NTI18601), sizeof(EOverflow));
		(*e_85686).Sup.Sup.Sup.Sup.m_type = (&NTI2445);
		nimln(1992, "system.nim");
		LOC9 = 0;
		LOC9 = (*e_85686).Sup.Sup.Sup.message; (*e_85686).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP1135));
		if (LOC9) nimGCunrefNoCycle(LOC9);
		nimln(230, "parseutils.nim");
		raiseException((E_Base*)e_85686, "EOverflow");
	}
	goto LA1;
	LA7: ;
	{
		nimln(232, "parseutils.nim");
		(*number) = ((NI) (res));
	}
	LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 5
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	result = 0;
	res = 0;
	result = npuParseBiggestInt(s, (&res), start);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		Overflowerror3443* e_93055;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC3 = NIM_FALSE;
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = (res < (IL64(-9223372036854775807) - IL64(1)));
		if (LOC5) goto LA6;
		LOC5 = (IL64(9223372036854775807) < res);
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		e_93055 = 0;
		e_93055 = (Overflowerror3443*) newObj((&NTI22801), sizeof(Overflowerror3443));
		(*e_93055).Sup.Sup.Sup.m_type = (&NTI3443);
		LOC9 = 0;
		LOC9 = (*e_93055).Sup.Sup.message; (*e_93055).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP1442));
		if (LOC9) nimGCunrefNoCycle(LOC9);
		raiseException((Exception*)e_93055, "OverflowError");
	}
	goto LA1;
	LA7: ;
	{
		if (!!((result == ((NI) 0)))) goto LA11;
		(*number) = ((NI) (res));
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}
Ejemplo n.º 6
0
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	result = 0;
	res = 0;
	result = npuParseBiggestInt(s, &res, start);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		EOverflow* e_88772;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC3 = NIM_FALSE;
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = (res < (IL64(-9223372036854775807) - IL64(1)));
		if (LOC5) goto LA6;
		LOC5 = (IL64(9223372036854775807) < res);
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		e_88772 = 0;
		e_88772 = (EOverflow*) newObj((&NTI21401), sizeof(EOverflow));
		(*e_88772).Sup.Sup.Sup.Sup.m_type = (&NTI2849);
		LOC9 = 0;
		LOC9 = (*e_88772).Sup.Sup.Sup.message; (*e_88772).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP175));
		if (LOC9) nimGCunrefNoCycle(LOC9);
		raiseException((E_Base*)e_88772, "EOverflow");
	}
	goto LA1;
	LA7: ;
	{
		(*number) = ((NI) (res));
	}
	LA1: ;
	return result;
}