Exemplo n.º 1
0
N_NIMCALL(void, handlecmdline_529603)(void) {
	nimfr("handleCmdLine", "nimrod.nim")
	nimln(35, "nimrod.nim");
	{
		NI LOC3;
		nimln(35, "nimrod.nim");
		nimln(35, "nimrod.nim");
		LOC3 = 0;
		LOC3 = paramcount_114233();
		if (!(LOC3 == 0)) goto LA4;
		nimln(36, "nimrod.nim");
		writecommandlineusage_171002();
	}
	goto LA1;
	LA4: ;
	{
		nimln(39, "nimrod.nim");
		processcmdline_523207(((NU8) 0), ((NimStringDesc*) &TMP7787));
		nimln(40, "nimrod.nim");
		{
			TSafePoint TMP7788;
			TY108700 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			nimln(40, "nimrod.nim");
			nimln(40, "nimrod.nim");
			if (!!(((gprojectname_135206) && (gprojectname_135206)->Sup.len == 0))) goto LA9;
			nimln(41, "nimrod.nim");
			pushSafePoint(&TMP7788);
			TMP7788.status = setjmp(TMP7788.context);
			if (TMP7788.status == 0) {
				nimln(42, "nimrod.nim");
				asgnRefNoCycle((void**) &gprojectfull_135208, canonicalizepath_135335(gprojectname_135206));
				popSafePoint();
			}
			else {
				popSafePoint();
				setFrame((TFrame*)&F);
				if (isObj(getCurrentException()->Sup.m_type, (&NTI2435))) {
					NimStringDesc* LOC14;
					TMP7788.status = 0;
					nimln(44, "nimrod.nim");
					LOC14 = 0;
					LOC14 = gprojectfull_135208; gprojectfull_135208 = copyStringRC1(gprojectname_135206);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}
			}
			if (TMP7788.status != 0) reraiseException();
			nimln(45, "nimrod.nim");
			chckNil((void*)&p);
			memset((void*)&p, 0, sizeof(p));
			nossplitFile(gprojectfull_135208, &p);
			nimln(46, "nimrod.nim");
			LOC15 = 0;
			LOC15 = gprojectpath_135207; gprojectpath_135207 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			nimln(47, "nimrod.nim");
			LOC16 = 0;
			LOC16 = gprojectname_135206; gprojectname_135206 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}
		goto LA7;
		LA9: ;
		{
			nimln(49, "nimrod.nim");
			asgnRefNoCycle((void**) &gprojectpath_135207, nosgetCurrentDir());
		}
		LA7: ;
		nimln(50, "nimrod.nim");
		loadconfigs_181607(((NimStringDesc*) &TMP7789));
		nimln(53, "nimrod.nim");
		initvars_167714();
		nimln(54, "nimrod.nim");
		processcmdline_523207(((NU8) 1), ((NimStringDesc*) &TMP7787));
		nimln(55, "nimrod.nim");
		maincommand_527011();
		nimln(56, "nimrod.nim");
		{
			NimStringDesc* LOC22;
			nimln(56, "nimrod.nim");
			if (!(2 <= gverbosity_135120)) goto LA20;
			nimln(56, "nimrod.nim");
			nimln(56, "nimrod.nim");
			LOC22 = 0;
			LOC22 = gcgetstatistics_6621();
			printf("%s\012", (LOC22)->data);
		}
		LA20: ;
		nimln(58, "nimrod.nim");
		{
			nimln(58, "nimrod.nim");
			if (!(gerrorcounter_162182 == 0)) goto LA25;
			nimln(62, "nimrod.nim");
			{
				nimln(62, "nimrod.nim");
				if (!((gglobaloptions_135111 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				nimln(63, "nimrod.nim");
				{
					NimStringDesc* ex;
					NimStringDesc* LOC44;
					nimln(63, "nimrod.nim");
					if (!(gcmd_135113 == ((NU8) 4))) goto LA33;
					ex = 0;
					nimln(65, "nimrod.nim");
					{
						NimStringDesc* LOC39;
						nimln(65, "nimrod.nim");
						nimln(65, "nimrod.nim");
						if (!(0 < outfile_135117->Sup.len)) goto LA37;
						nimln(66, "nimrod.nim");
						nimln(66, "nimrod.nim");
						LOC39 = 0;
						LOC39 = prependcurdir_529401(outfile_135117);
						ex = nospquoteShell(LOC39);
					}
					goto LA35;
					LA37: ;
					{
						NimStringDesc* LOC41;
						NimStringDesc* LOC42;
						NimStringDesc* LOC43;
						nimln(68, "nimrod.nim");
						nimln(69, "nimrod.nim");
						nimln(69, "nimrod.nim");
						nimln(69, "nimrod.nim");
						LOC41 = 0;
						LOC41 = noschangeFileExt(gprojectfull_135208, ((NimStringDesc*) &TMP7790));
						LOC42 = 0;
						LOC42 = prependcurdir_529401(LOC41);
						LOC43 = 0;
						LOC43 = completecfilepath_167753(LOC42, NIM_TRUE);
						ex = nospquoteShell(LOC43);
					}
					LA35: ;
					nimln(70, "nimrod.nim");
					nimln(70, "nimrod.nim");
					LOC44 = 0;
					LOC44 = rawNewString(ex->Sup.len + arguments_523205->Sup.len + 6);
appendString(LOC44, ((NimStringDesc*) &TMP7791));
appendString(LOC44, ex);
appendChar(LOC44, 32);
appendString(LOC44, arguments_523205);
					execexternalprogram_167785(LOC44);
				}
				goto LA31;
				LA33: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC52;
					binpath = 0;
					nimln(73, "nimrod.nim");
					{
						nimln(73, "nimrod.nim");
						nimln(73, "nimrod.nim");
						if (!(0 < outfile_135117->Sup.len)) goto LA48;
						nimln(75, "nimrod.nim");
						binpath = prependcurdir_529401(outfile_135117);
					}
					goto LA46;
					LA48: ;
					{
						NimStringDesc* LOC51;
						nimln(78, "nimrod.nim");
						nimln(78, "nimrod.nim");
						LOC51 = 0;
						LOC51 = noschangeFileExt(gprojectfull_135208, ((NimStringDesc*) &TMP7787));
						binpath = prependcurdir_529401(LOC51);
					}
					LA46: ;
					nimln(79, "nimrod.nim");
					ex = nospquoteShell(binpath);
					nimln(80, "nimrod.nim");
					nimln(80, "nimrod.nim");
					LOC52 = 0;
					LOC52 = rawNewString(ex->Sup.len + arguments_523205->Sup.len + 1);
appendString(LOC52, ex);
appendChar(LOC52, 32);
appendString(LOC52, arguments_523205);
					execexternalprogram_167785(LOC52);
				}
				LA31: ;
			}
			LA29: ;
		}
		LA25: ;
	}
	LA1: ;
	popFrame();
}
Exemplo n.º 2
0
N_NIMCALL(void, handlecmdline_535601)(void) {
{	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = paramcount_131626();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_199005();
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* scriptfile;
		processcmdline_529203(((NU8) 0), ((NimStringDesc*) &TMP2024));
		{
			NimStringDesc* LOC11;
			NimStringDesc* LOC12;
			if (!eqStrings(gprojectname_159199, ((NimStringDesc*) &TMP2025))) goto LA9;
			LOC11 = 0;
			LOC11 = gprojectname_159199; gprojectname_159199 = copyStringRC1(((NimStringDesc*) &TMP2026));
			if (LOC11) nimGCunrefNoCycle(LOC11);
			LOC12 = 0;
			LOC12 = gprojectfull_159201; gprojectfull_159201 = copyStringRC1(((NimStringDesc*) &TMP2026));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			asgnRefNoCycle((void**) (&gprojectpath_159200), nosgetCurrentDir());
			gprojectisstdin_159202 = NIM_TRUE;
		}
		goto LA7;
		LA9: ;
		{
			TSafePoint TMP2027;
			TY118906 p;
			NimStringDesc* LOC20;
			NimStringDesc* LOC21;
			if (!!(((gprojectname_159199) && (gprojectname_159199)->Sup.len == 0))) goto LA14;
			pushSafePoint(&TMP2027);
			TMP2027.status = _setjmp(TMP2027.context);
			if (TMP2027.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_159201), canonicalizepath_159405(gprojectname_159199));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3630))) {
					NimStringDesc* LOC19;
					TMP2027.status = 0;
					LOC19 = 0;
					LOC19 = gprojectfull_159201; gprojectfull_159201 = copyStringRC1(gprojectname_159199);
					if (LOC19) nimGCunrefNoCycle(LOC19);
					popCurrentException();
				}
			}
			if (TMP2027.status != 0) reraiseException();
			memset((void*)(&p), 0, sizeof(p));
			chckNil((void*)(&p));
			memset((void*)(&p), 0, sizeof(p));
			nossplitFile(gprojectfull_159201, (&p));
			LOC20 = 0;
			LOC20 = gprojectpath_159200; gprojectpath_159200 = copyStringRC1(p.Field0);
			if (LOC20) nimGCunrefNoCycle(LOC20);
			LOC21 = 0;
			LOC21 = gprojectname_159199; gprojectname_159199 = copyStringRC1(p.Field1);
			if (LOC21) nimGCunrefNoCycle(LOC21);
		}
		goto LA7;
		LA14: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_159200), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_209603(((NimStringDesc*) &TMP2056));
		scriptfile = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP2057));
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = fileexists_122004(scriptfile);
			if (!LOC25) goto LA26;
			runnimscript_534203(scriptfile);
			{
				if (!eqStrings(scriptfile, gprojectfull_159201)) goto LA30;
				goto BeforeRet;
			}
			LA30: ;
		}
		goto LA23;
		LA26: ;
		{
			NimStringDesc* LOC33;
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC33 = 0;
			LOC33 = HEX2F_118665(gprojectpath_159200, ((NimStringDesc*) &TMP3718));
			LOC34 = 0;
			LOC34 = fileexists_122004(LOC33);
			if (!LOC34) goto LA35;
			LOC37 = 0;
			LOC37 = HEX2F_118665(gprojectpath_159200, ((NimStringDesc*) &TMP3718));
			runnimscript_534203(LOC37);
		}
		goto LA23;
		LA35: ;
		LA23: ;
		initvars_193834();
		processcmdline_529203(((NU8) 1), ((NimStringDesc*) &TMP2024));
		{
			if (!((command_159205) && (command_159205)->Sup.len == 0)) goto LA40;
			rawmessage_184612(((NU16) 184), command_159205);
		}
		LA40: ;
		maincommand_531610();
		{
			NIM_BOOL LOC44;
			NimStringDesc* LOC48;
			LOC44 = 0;
			LOC44 = ((goptions_159119 &(1U<<((NU)(((NU8) 12))&31U)))!=0);
			if (!(LOC44)) goto LA45;
			LOC44 = ((gnotes_182077 &((NU64)1<<((NU)((((NU16) 289)- 237))&63U)))!=0);
			LA45: ;
			if (!LOC44) goto LA46;
			LOC48 = 0;
			LOC48 = Gcgetstatistics_9821();
			printf("%s\012", LOC48? (LOC48)->data:"nil");
			fflush(stdout);
		}
		LA46: ;
		{
			if (!(gerrorcounter_182078 == ((NI) 0))) goto LA51;
			{
				if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 13))&31U)))!=0)) goto LA55;
				{
					NimStringDesc* ex;
					NimStringDesc* LOC70;
					NimStringDesc* LOC71;
					if (!(gcmd_159123 == ((NU8) 4))) goto LA59;
					ex = 0;
					{
						NimStringDesc* LOC65;
						if (!(((NI) 0) < (outfile_159127 ? outfile_159127->Sup.len : 0))) goto LA63;
						LOC65 = 0;
						LOC65 = prependcurdir_535401(outfile_159127);
						ex = nospquoteShell(LOC65);
					}
					goto LA61;
					LA63: ;
					{
						NimStringDesc* LOC67;
						NimStringDesc* LOC68;
						NimStringDesc* LOC69;
						LOC67 = 0;
						LOC67 = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP5307));
						LOC68 = 0;
						LOC68 = prependcurdir_535401(LOC67);
						LOC69 = 0;
						LOC69 = completecfilepath_193854(LOC68, NIM_TRUE);
						ex = nospquoteShell(LOC69);
					}
					LA61: ;
					LOC70 = 0;
					LOC71 = 0;
					LOC71 = findnodejs_533003();
					LOC70 = rawNewString(LOC71->Sup.len + ex->Sup.len + arguments_200699->Sup.len + 2);
appendString(LOC70, LOC71);
appendString(LOC70, ((NimStringDesc*) &TMP5311));
appendString(LOC70, ex);
appendChar(LOC70, 32);
appendString(LOC70, arguments_200699);
					execexternalprogram_193881(LOC70, ((NU16) 284));
				}
				goto LA57;
				LA59: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC79;
					binpath = 0;
					{
						if (!(((NI) 0) < (outfile_159127 ? outfile_159127->Sup.len : 0))) goto LA75;
						binpath = prependcurdir_535401(outfile_159127);
					}
					goto LA73;
					LA75: ;
					{
						NimStringDesc* LOC78;
						LOC78 = 0;
						LOC78 = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP2024));
						binpath = prependcurdir_535401(LOC78);
					}
					LA73: ;
					ex = nospquoteShell(binpath);
					LOC79 = 0;
					LOC79 = rawNewString(ex->Sup.len + arguments_200699->Sup.len + 1);
appendString(LOC79, ex);
appendChar(LOC79, 32);
appendString(LOC79, arguments_200699);
					execexternalprogram_193881(LOC79, ((NU16) 284));
				}
				LA57: ;
			}
			LA55: ;
		}
		LA51: ;
	}
	LA1: ;
	}BeforeRet: ;
}
Exemplo n.º 3
0
N_NIMCALL(void, handlecmdline_527607)(void) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = paramcount_124830();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_175020();
	}
	goto LA1;
	LA4: ;
	{
		processcmdline_521209(((NU8) 0), ((NimStringDesc*) &TMP1869));
		{
			TSafePoint TMP1870;
			TY118589 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			if (!!(((gprojectname_153234) && (gprojectname_153234)->Sup.len == 0))) goto LA9;
			pushSafePoint(&TMP1870);
			TMP1870.status = setjmp(TMP1870.context);
			if (TMP1870.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_153236), canonicalizepath_153380(gprojectname_153234));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3433))) {
					NimStringDesc* LOC14;
					TMP1870.status = 0;
					LOC14 = 0;
					LOC14 = gprojectfull_153236; gprojectfull_153236 = copyStringRC1(gprojectname_153234);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}
			}
			if (TMP1870.status != 0) reraiseException();
			memset((void*)(&p), 0, sizeof(p));
			chckNil((void*)(&p));
			memset((void*)(&p), 0, sizeof(p));
			nossplitFile(gprojectfull_153236, (&p));
			LOC15 = 0;
			LOC15 = gprojectpath_153235; gprojectpath_153235 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			LOC16 = 0;
			LOC16 = gprojectname_153234; gprojectname_153234 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}
		goto LA7;
		LA9: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_153235), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_185811(((NimStringDesc*) &TMP1898));
		initvars_169876();
		processcmdline_521209(((NU8) 1), ((NimStringDesc*) &TMP1869));
		maincommand_524628();
		{
			NimStringDesc* LOC22;
			if (!(((NI) 2) <= gverbosity_153137)) goto LA20;
			LOC22 = 0;
			LOC22 = Gcgetstatistics_8821();
			printf("%s\012", LOC22? (LOC22)->data:"nil");
		}
		LA20: ;
		{
			if (!(gerrorcounter_163016 == ((NI) 0))) goto LA25;
			{
				if (!((gglobaloptions_153128 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				{
					NimStringDesc* LOC35;
					if (!eqStrings(gprojectname_153234, ((NimStringDesc*) &TMP5024))) goto LA33;
					LOC35 = 0;
					LOC35 = gprojectfull_153236; gprojectfull_153236 = copyStringRC1(((NimStringDesc*) &TMP5025));
					if (LOC35) nimGCunrefNoCycle(LOC35);
				}
				LA33: ;
				{
					NimStringDesc* ex;
					NimStringDesc* LOC49;
					NimStringDesc* LOC50;
					if (!(gcmd_153130 == ((NU8) 4))) goto LA38;
					ex = 0;
					{
						NimStringDesc* LOC44;
						if (!(((NI) 0) < (outfile_153134 ? outfile_153134->Sup.len : 0))) goto LA42;
						LOC44 = 0;
						LOC44 = prependcurdir_527401(outfile_153134);
						ex = nospquoteShell(LOC44);
					}
					goto LA40;
					LA42: ;
					{
						NimStringDesc* LOC46;
						NimStringDesc* LOC47;
						NimStringDesc* LOC48;
						LOC46 = 0;
						LOC46 = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP5027));
						LOC47 = 0;
						LOC47 = prependcurdir_527401(LOC46);
						LOC48 = 0;
						LOC48 = completecfilepath_169912(LOC47, NIM_TRUE);
						ex = nospquoteShell(LOC48);
					}
					LA40: ;
					LOC49 = 0;
					LOC50 = 0;
					LOC50 = findnodejs_526009();
					LOC49 = rawNewString(LOC50->Sup.len + ex->Sup.len + arguments_176723->Sup.len + 2);
appendString(LOC49, LOC50);
appendString(LOC49, ((NimStringDesc*) &TMP5030));
appendString(LOC49, ex);
appendChar(LOC49, 32);
appendString(LOC49, arguments_176723);
					execexternalprogram_169985(LOC49, ((NimStringDesc*) &TMP1869));
				}
				goto LA36;
				LA38: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC58;
					binpath = 0;
					{
						if (!(((NI) 0) < (outfile_153134 ? outfile_153134->Sup.len : 0))) goto LA54;
						binpath = prependcurdir_527401(outfile_153134);
					}
					goto LA52;
					LA54: ;
					{
						NimStringDesc* LOC57;
						LOC57 = 0;
						LOC57 = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP1869));
						binpath = prependcurdir_527401(LOC57);
					}
					LA52: ;
					ex = nospquoteShell(binpath);
					LOC58 = 0;
					LOC58 = rawNewString(ex->Sup.len + arguments_176723->Sup.len + 1);
appendString(LOC58, ex);
appendChar(LOC58, 32);
appendString(LOC58, arguments_176723);
					execexternalprogram_169985(LOC58, ((NimStringDesc*) &TMP1869));
				}
				LA36: ;
			}
			LA29: ;
		}
		LA25: ;
	}
	LA1: ;
}
Exemplo n.º 4
0
N_NIMCALL(void, handlecmdline_424603)(void) {
	nimfr("HandleCmdLine", "nimrod.nim")
	nimln(35, "nimrod.nim");
	{
		NI LOC3;
		nimln(35, "nimrod.nim");
		nimln(35, "nimrod.nim");
		LOC3 = 0;
		LOC3 = paramcount_107029();
		if (!(LOC3 == 0)) goto LA4;
		nimln(36, "nimrod.nim");
		writecommandlineusage_152002();	}	goto LA1;
	LA4: ;
	{
		nimln(39, "nimrod.nim");
		processcmdline_419207(((NU8) 0), ((NimStringDesc*) &TMP7233));		nimln(40, "nimrod.nim");
		{
			TSafePoint TMP7234;
			TY102259 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			nimln(698, "system.nim");
			nimln(698, "system.nim");
			if (!!(((gprojectname_114197) && (gprojectname_114197)->Sup.len == 0))) goto LA9;
			nimln(41, "nimrod.nim");
			pushSafePoint(&TMP7234);
			TMP7234.status = setjmp(TMP7234.context);
			if (TMP7234.status == 0) {
				nimln(42, "nimrod.nim");
				asgnRefNoCycle((void**) &gprojectfull_114199, canonicalizepath_114316(gprojectname_114197));
				popSafePoint();
			}			else {
				popSafePoint();
				setFrame((TFrame*)&F);
				if (isObj(getCurrentException()->Sup.m_type, (&NTI1035))) {
					NimStringDesc* LOC14;
					TMP7234.status = 0;
					nimln(44, "nimrod.nim");
					LOC14 = 0;
					LOC14 = gprojectfull_114199; gprojectfull_114199 = copyStringRC1(gprojectname_114197);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}			}			if (TMP7234.status != 0) reraiseException();
			nimln(45, "nimrod.nim");
			chckNil((void*)&p);
			memset((void*)&p, 0, sizeof(p));
			nossplitFile(gprojectfull_114199, &p);			nimln(46, "nimrod.nim");
			LOC15 = 0;
			LOC15 = gprojectpath_114198; gprojectpath_114198 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			nimln(47, "nimrod.nim");
			LOC16 = 0;
			LOC16 = gprojectname_114197; gprojectname_114197 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}		goto LA7;
		LA9: ;
		{
			nimln(49, "nimrod.nim");
			asgnRefNoCycle((void**) &gprojectpath_114198, nosgetCurrentDir());
		}		LA7: ;
		nimln(50, "nimrod.nim");
		loadconfigs_168607(((NimStringDesc*) &TMP7235));		nimln(53, "nimrod.nim");
		initvars_148647();		nimln(54, "nimrod.nim");
		processcmdline_419207(((NU8) 1), ((NimStringDesc*) &TMP7233));		nimln(55, "nimrod.nim");
		maincommand_422811();		nimln(56, "nimrod.nim");
		{
			NimStringDesc* LOC22;
			nimln(702, "system.nim");
			if (!(2 <= gverbosity_114117)) goto LA20;
			nimln(56, "nimrod.nim");
			nimln(56, "nimrod.nim");
			LOC22 = 0;
			LOC22 = gcgetstatistics_6021();
			printf("%s\012", (LOC22)->data);
		}		LA20: ;
		nimln(58, "nimrod.nim");
		{
			nimln(58, "nimrod.nim");
			if (!(gerrorcounter_138074 == 0)) goto LA25;
			nimln(62, "nimrod.nim");
			{
				nimln(730, "system.nim");
				if (!((gglobaloptions_114109 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				nimln(63, "nimrod.nim");
				{
					NimStringDesc* ex;
					NimStringDesc* LOC35;
					NimStringDesc* LOC36;
					NimStringDesc* LOC37;
					NimStringDesc* LOC38;
					nimln(63, "nimrod.nim");
					if (!(gcmd_114111 == ((NU8) 4))) goto LA33;
					nimln(64, "nimrod.nim");
					nimln(65, "nimrod.nim");
					nimln(65, "nimrod.nim");
					nimln(65, "nimrod.nim");
					LOC35 = 0;
					LOC35 = nosChangeFileExt(gprojectfull_114199, ((NimStringDesc*) &TMP7236));
					LOC36 = 0;
					LOC36 = prependcurdir_424401(LOC35);
					LOC37 = 0;
					LOC37 = completecfilepath_148681(LOC36, NIM_TRUE);
					ex = nospquoteShell(LOC37);
					nimln(66, "nimrod.nim");
					nimln(66, "nimrod.nim");
					LOC38 = 0;
					LOC38 = rawNewString(ex->Sup.len + arguments_419205->Sup.len + 6);
appendString(LOC38, ((NimStringDesc*) &TMP7237));
appendString(LOC38, ex);
appendChar(LOC38, 32);
appendString(LOC38, arguments_419205);
					execexternalprogram_148713(LOC38);				}				goto LA31;
				LA33: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC46;
					binpath = 0;
					nimln(69, "nimrod.nim");
					{
						nimln(706, "system.nim");
						nimln(69, "nimrod.nim");
						if (!(0 < outfile_114115->Sup.len)) goto LA42;
						nimln(71, "nimrod.nim");
						binpath = prependcurdir_424401(outfile_114115);
					}					goto LA40;
					LA42: ;
					{
						NimStringDesc* LOC45;
						nimln(74, "nimrod.nim");
						nimln(74, "nimrod.nim");
						LOC45 = 0;
						LOC45 = nosChangeFileExt(gprojectfull_114199, ((NimStringDesc*) &TMP7233));
						binpath = prependcurdir_424401(LOC45);
					}					LA40: ;
					nimln(75, "nimrod.nim");
					ex = nospquoteShell(binpath);
					nimln(76, "nimrod.nim");
					nimln(76, "nimrod.nim");
					LOC46 = 0;
					LOC46 = rawNewString(ex->Sup.len + arguments_419205->Sup.len + 1);
appendString(LOC46, ex);
appendChar(LOC46, 32);
appendString(LOC46, arguments_419205);
					execexternalprogram_148713(LOC46);				}				LA31: ;
			}			LA29: ;
		}		LA25: ;
	}	LA1: ;
	popFrame();
}
Exemplo n.º 5
0
N_NIMCALL(void, handlecmdline_598601_957294627)(void) {
{	{
		NI LOC3;
		LOC3 = (NI)0;
		LOC3 = paramcount_143026_2125978480();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_280005_2004575671();
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* scriptfile0;
		processcmdline_592203_3526807654(((Tcmdlinepass280008) 0), ((NimStringDesc*) &T957294627_2));
		{
			NimStringDesc* LOC11;
			NimStringDesc* LOC12;
			if (!eqStrings(gprojectname_169209_2607990831, ((NimStringDesc*) &T957294627_3))) goto LA9;
			LOC11 = (NimStringDesc*)0;
			LOC11 = gprojectname_169209_2607990831; gprojectname_169209_2607990831 = copyStringRC1(((NimStringDesc*) &T957294627_4));
			if (LOC11) nimGCunrefNoCycle(LOC11);
			LOC12 = (NimStringDesc*)0;
			LOC12 = gprojectfull_169211_2607990831; gprojectfull_169211_2607990831 = copyStringRC1(((NimStringDesc*) &T957294627_4));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			asgnRefNoCycle((void**) (&gprojectpath_169210_2607990831), nosgetCurrentDir());
			gprojectisstdin_169212_2607990831 = NIM_TRUE;
		}
		goto LA7;
		LA9: ;
		{
			TSafePoint T957294627_5;
			TY128506 p0;
			NimStringDesc* LOC20;
			NimStringDesc* LOC21;
			if (!!(((gprojectname_169209_2607990831) && (gprojectname_169209_2607990831)->Sup.len == 0))) goto LA14;
			pushSafePoint(&T957294627_5);
			T957294627_5.status = _setjmp(T957294627_5.context);
			if (T957294627_5.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_169211_2607990831), canonicalizepath_169405_2607990831(gprojectname_169209_2607990831));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3630))) {
					NimStringDesc* LOC19;
					T957294627_5.status = 0;
					LOC19 = (NimStringDesc*)0;
					LOC19 = gprojectfull_169211_2607990831; gprojectfull_169211_2607990831 = copyStringRC1(gprojectname_169209_2607990831);
					if (LOC19) nimGCunrefNoCycle(LOC19);
					popCurrentException();
				}
			}
			if (T957294627_5.status != 0) reraiseException();
			memset((void*)(&p0), 0, sizeof(p0));
			chckNil((void*)(&p0));
			memset((void*)(&p0), 0, sizeof(p0));
			nossplitFile(gprojectfull_169211_2607990831, (&p0));
			LOC20 = (NimStringDesc*)0;
			LOC20 = gprojectpath_169210_2607990831; gprojectpath_169210_2607990831 = copyStringRC1(p0.Field0);
			if (LOC20) nimGCunrefNoCycle(LOC20);
			LOC21 = (NimStringDesc*)0;
			LOC21 = gprojectname_169209_2607990831; gprojectname_169209_2607990831 = copyStringRC1(p0.Field1);
			if (LOC21) nimGCunrefNoCycle(LOC21);
		}
		goto LA7;
		LA14: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_169210_2607990831), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_290603_930198375(((NimStringDesc*) &T957294627_6));
		scriptfile0 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_7));
		{
			NIM_BOOL LOC25;
			LOC25 = (NIM_BOOL)0;
			LOC25 = fileexists_131604_2125978480(scriptfile0);
			if (!LOC25) goto LA26;
			runnimscript_597218_3062286716(scriptfile0, NIM_FALSE);
			{
				if (!eqStrings(scriptfile0, gprojectfull_169211_2607990831)) goto LA30;
				goto BeforeRet;
			}
			LA30: ;
		}
		goto LA23;
		LA26: ;
		{
			NimStringDesc* LOC33;
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC33 = (NimStringDesc*)0;
			LOC33 = HEX2F_128265_2125978480(gprojectpath_169210_2607990831, ((NimStringDesc*) &T957294627_8));
			LOC34 = (NIM_BOOL)0;
			LOC34 = fileexists_131604_2125978480(LOC33);
			if (!LOC34) goto LA35;
			LOC37 = (NimStringDesc*)0;
			LOC37 = HEX2F_128265_2125978480(gprojectpath_169210_2607990831, ((NimStringDesc*) &T957294627_8));
			runnimscript_597218_3062286716(LOC37, NIM_FALSE);
		}
		goto LA23;
		LA35: ;
		LA23: ;
		initvars_273834_2528170400();
		processcmdline_592203_3526807654(((Tcmdlinepass280008) 1), ((NimStringDesc*) &T957294627_2));
		{
			if (!((command_169215_2607990831) && (command_169215_2607990831)->Sup.len == 0)) goto LA40;
			rawmessage_194612_155036129(((Tmsgkind191002) 184), command_169215_2607990831);
		}
		LA40: ;
		maincommand_594610_6460232();
		{
			NIM_BOOL LOC44;
			NimStringDesc* LOC48;
			LOC44 = (NIM_BOOL)0;
			LOC44 = ((goptions_169128_2607990831 &(1U<<((NU)(((Toption169009) 12))&31U)))!=0);
			if (!(LOC44)) goto LA45;
			LOC44 = ((gnotes_192068_155036129 &((NU64)1<<((NU)((((Tmsgkind191002) 289)- 237))&63U)))!=0);
			LA45: ;
			if (!LOC44) goto LA46;
			LOC48 = (NimStringDesc*)0;
			LOC48 = Gcgetstatistics_10421_1689653243();
			printf("%s\012", LOC48? (LOC48)->data:"nil");
			fflush(stdout);
		}
		LA46: ;
		{
			if (!(gerrorcounter_192069_155036129 == ((NI) 0))) goto LA51;
			{
				if (!((gglobaloptions_169130_2607990831 &((NU64)1<<((NU)(((Tglobaloption169013) 13))&63U)))!=0)) goto LA55;
				{
					NimStringDesc* ex0;
					NimStringDesc* LOC70;
					NimStringDesc* LOC71;
					if (!(gcmd_169132_2607990831 == ((Tcommands169076) 4))) goto LA59;
					ex0 = (NimStringDesc*)0;
					{
						NimStringDesc* LOC65;
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA63;
						LOC65 = (NimStringDesc*)0;
						LOC65 = prependcurdir_598401_957294627(outfile_169136_2607990831);
						ex0 = nospquoteShell(LOC65);
					}
					goto LA61;
					LA63: ;
					{
						NimStringDesc* LOC67;
						NimStringDesc* LOC68;
						NimStringDesc* LOC69;
						LOC67 = (NimStringDesc*)0;
						LOC67 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_10));
						LOC68 = (NimStringDesc*)0;
						LOC68 = prependcurdir_598401_957294627(LOC67);
						LOC69 = (NimStringDesc*)0;
						LOC69 = completecfilepath_273854_2528170400(LOC68, NIM_TRUE);
						ex0 = nospquoteShell(LOC69);
					}
					LA61: ;
					LOC70 = (NimStringDesc*)0;
					LOC71 = (NimStringDesc*)0;
					LOC71 = findnodejs_596002_1446018522();
					LOC70 = rawNewString(LOC71->Sup.len + ex0->Sup.len + arguments_281811_2004575671->Sup.len + 2);
appendString(LOC70, LOC71);
appendString(LOC70, ((NimStringDesc*) &T957294627_11));
appendString(LOC70, ex0);
appendChar(LOC70, 32);
appendString(LOC70, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC70, ((Tmsgkind191002) 284));
				}
				goto LA57;
				LA59: ;
				{
					NimStringDesc* ex0;
					NimStringDesc* LOC84;
					if (!(gcmd_169132_2607990831 == ((Tcommands169076) 5))) goto LA73;
					ex0 = (NimStringDesc*)0;
					{
						NimStringDesc* LOC79;
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA77;
						LOC79 = (NimStringDesc*)0;
						LOC79 = prependcurdir_598401_957294627(outfile_169136_2607990831);
						ex0 = nospquoteShell(LOC79);
					}
					goto LA75;
					LA77: ;
					{
						NimStringDesc* LOC81;
						NimStringDesc* LOC82;
						NimStringDesc* LOC83;
						LOC81 = (NimStringDesc*)0;
						LOC81 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_12));
						LOC82 = (NimStringDesc*)0;
						LOC82 = prependcurdir_598401_957294627(LOC81);
						LOC83 = (NimStringDesc*)0;
						LOC83 = completecfilepath_273854_2528170400(LOC82, NIM_TRUE);
						ex0 = nospquoteShell(LOC83);
					}
					LA75: ;
					LOC84 = (NimStringDesc*)0;
					LOC84 = rawNewString(ex0->Sup.len + arguments_281811_2004575671->Sup.len + 5);
appendString(LOC84, ((NimStringDesc*) &T957294627_13));
appendString(LOC84, ex0);
appendChar(LOC84, 32);
appendString(LOC84, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC84, ((Tmsgkind191002) 284));
				}
				goto LA57;
				LA73: ;
				{
					NimStringDesc* binpath0;
					NimStringDesc* ex0;
					NimStringDesc* LOC92;
					binpath0 = (NimStringDesc*)0;
					{
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA88;
						binpath0 = prependcurdir_598401_957294627(outfile_169136_2607990831);
					}
					goto LA86;
					LA88: ;
					{
						NimStringDesc* LOC91;
						LOC91 = (NimStringDesc*)0;
						LOC91 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_2));
						binpath0 = prependcurdir_598401_957294627(LOC91);
					}
					LA86: ;
					ex0 = nospquoteShell(binpath0);
					LOC92 = (NimStringDesc*)0;
					LOC92 = rawNewString(ex0->Sup.len + arguments_281811_2004575671->Sup.len + 1);
appendString(LOC92, ex0);
appendChar(LOC92, 32);
appendString(LOC92, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC92, ((Tmsgkind191002) 284));
				}
				LA57: ;
			}
			LA55: ;
		}
		LA51: ;
	}
	LA1: ;
	}BeforeRet: ;
}