Ejemplo n.º 1
0
N_NIMCALL(void, babelpath_175290)(NimStringDesc* path, tlineinfo166527 info) {
	nimfr("babelPath", "babelcmd.nim")
	nimln(89, "babelcmd.nim");
	addpathrec_175216(path, info);
	nimln(90, "babelcmd.nim");
	addbabelpath_175163(path, info);
	popFrame();
}
Ejemplo n.º 2
0
N_NIMCALL(void, addpathrec_175216)(NimStringDesc* dir, tlineinfo166527 info) {
	tstringtable122810* packages;
	NI pos;
	NI TMP1437;
	NU8 k_175252;
	NimStringDesc* p_175253;
	DIR* d_175265;
	NimStringDesc* p_175263;
	NimStringDesc* key_175275;
	NimStringDesc* val_175277;
	NI h_175279;
	NI HEX3Atmp_175281;
	NI res_175283;
	nimfr("addPathRec", "babelcmd.nim")
	nimln(79, "babelcmd.nim");
	packages = nstnewStringTable(((NU8) 2));
	nimln(80, "babelcmd.nim");
	nimln(80, "babelcmd.nim");
	nimln(80, "babelcmd.nim");
	TMP1437 = subInt(dir->Sup.len, 1);
	pos = (NI32)(TMP1437);
	nimln(81, "babelcmd.nim");
	{
		nimln(81, "babelcmd.nim");
		if ((NU)(pos) > (NU)(dir->Sup.len)) raiseIndexError();
		if (!(((NU8)(dir->data[pos])) == ((NU8)(47)) || ((NU8)(dir->data[pos])) == ((NU8)(47)))) goto LA3;
		nimln(81, "babelcmd.nim");
		pos = addInt(pos, 1);
	}
	LA3: ;
	k_175252 = 0;
	p_175253 = 0;
	nimln(1262, "os.nim");
	d_175265 = opendir(dir->data);
	nimln(1263, "os.nim");
	{
		int LOC41;
		nimln(1263, "os.nim");
		nimln(1263, "os.nim");
		if (!!((d_175265 == NIM_NIL))) goto LA7;
		nimln(1264, "os.nim");
		while (1) {
			struct dirent* x_175267;
			NimStringDesc* y_175269;
			nimln(1265, "os.nim");
			x_175267 = readdir(d_175265);
			nimln(1266, "os.nim");
			{
				nimln(1266, "os.nim");
				if (!(x_175267 == NIM_NIL)) goto LA12;
				nimln(1266, "os.nim");
				goto LA9;
			}
			LA12: ;
			nimln(1267, "os.nim");
			nimln(1267, "os.nim");
			y_175269 = cstrToNimstr(((NCSTRING) ((*x_175267).d_name)));
			nimln(1268, "os.nim");
			{
				NIM_BOOL LOC16;
				struct stat s_175271;
				NU8 k_175273;
				nimln(1268, "os.nim");
				LOC16 = 0;
				nimln(1268, "os.nim");
				nimln(1268, "os.nim");
				LOC16 = !(eqStrings(y_175269, ((NimStringDesc*) &TMP1431)));
				if (!(LOC16)) goto LA17;
				nimln(1268, "os.nim");
				nimln(1268, "os.nim");
				LOC16 = !(eqStrings(y_175269, ((NimStringDesc*) &TMP1432)));
				LA17: ;
				if (!LOC16) goto LA18;
				memset((void*)&s_175271, 0, sizeof(s_175271));
				nimln(1270, "os.nim");
				y_175269 = HEX2F_109477(dir, y_175269);
				nimln(1271, "os.nim");
				{
					int LOC22;
					nimln(1271, "os.nim");
					nimln(1271, "os.nim");
					LOC22 = 0;
					LOC22 = lstat(y_175269->data, &s_175271);
					if (!(LOC22 < ((NI32) 0))) goto LA23;
					nimln(1271, "os.nim");
					goto LA9;
				}
				LA23: ;
				nimln(1272, "os.nim");
				k_175273 = ((NU8) 0);
				nimln(1273, "os.nim");
				{
					NIM_BOOL LOC27;
					nimln(1273, "os.nim");
					LOC27 = 0;
					LOC27 = S_ISDIR(s_175271.st_mode);
					if (!LOC27) goto LA28;
					nimln(1273, "os.nim");
					k_175273 = ((NU8) 2);
				}
				LA28: ;
				nimln(1274, "os.nim");
				{
					NIM_BOOL LOC32;
					nimln(1274, "os.nim");
					LOC32 = 0;
					LOC32 = S_ISLNK(s_175271.st_mode);
					if (!LOC32) goto LA33;
					nimln(1274, "os.nim");
					nimln(1274, "os.nim");
					k_175273 = addInt(k_175273, 1);
				}
				LA33: ;
				nimln(1272, "os.nim");
				k_175252 = k_175273;
				nimln(1267, "os.nim");
				p_175253 = y_175269;
				nimln(83, "babelcmd.nim");
				{
					NIM_BOOL LOC37;
					nimln(83, "babelcmd.nim");
					LOC37 = 0;
					nimln(83, "babelcmd.nim");
					LOC37 = (k_175252 == ((NU8) 2));
					if (!(LOC37)) goto LA38;
					nimln(83, "babelcmd.nim");
					nimln(83, "babelcmd.nim");
					if ((NU)(pos) > (NU)(p_175253->Sup.len)) raiseIndexError();
					LOC37 = !(((NU8)(p_175253->data[pos]) == (NU8)(46)));
					LA38: ;
					if (!LOC37) goto LA39;
					nimln(84, "babelcmd.nim");
					addpackage_175137(packages, p_175253);
				}
				LA39: ;
			}
			LA18: ;
		} LA9: ;
		nimln(1276, "os.nim");
		nimln(1276, "os.nim");
		LOC41 = 0;
		LOC41 = closedir(d_175265);
	}
	LA7: ;
	p_175263 = 0;
	key_175275 = 0;
	val_175277 = 0;
	h_175279 = 0;
	HEX3Atmp_175281 = 0;
	nimln(40, "strtabs.nim");
	nimln(40, "strtabs.nim");
	HEX3Atmp_175281 = ((*packages).Data->Sup.len-1);
	nimln(1458, "system.nim");
	res_175283 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_175283 <= HEX3Atmp_175281)) goto LA42;
		nimln(1458, "system.nim");
		h_175279 = res_175283;
		nimln(41, "strtabs.nim");
		{
			NimStringDesc* res_175285;
			nimln(41, "strtabs.nim");
			nimln(41, "strtabs.nim");
			if ((NU)(h_175279) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
			if (!!((*packages).Data->data[h_175279].Field0 == 0)) goto LA45;
			nimln(42, "strtabs.nim");
			if ((NU)(h_175279) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
			key_175275 = (*packages).Data->data[h_175279].Field0;
			nimln(42, "strtabs.nim");
			if ((NU)(h_175279) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
			val_175277 = (*packages).Data->data[h_175279].Field1;
			nimln(58, "babelcmd.nim");
			nimln(58, "babelcmd.nim");
			{
				nimln(58, "babelcmd.nim");
				if (!eqStrings(val_175277, ((NimStringDesc*) &TMP1428))) goto LA49;
				res_175285 = key_175275;
			}
			goto LA47;
			LA49: ;
			{
				NimStringDesc* LOC52;
				nimln(58, "babelcmd.nim");
				LOC52 = 0;
				LOC52 = rawNewString(key_175275->Sup.len + val_175277->Sup.len + 1);
appendString(LOC52, key_175275);
appendChar(LOC52, 45);
appendString(LOC52, val_175277);
				res_175285 = LOC52;
			}
			LA47: ;
			nimln(58, "babelcmd.nim");
			p_175263 = res_175285;
			nimln(86, "babelcmd.nim");
			addbabelpath_175163(p_175263, info);
		}
		LA45: ;
		nimln(1461, "system.nim");
		res_175283 = addInt(res_175283, 1);
	} LA42: ;
	popFrame();
}
Ejemplo n.º 3
0
N_NIMCALL(void, addpathrec_175210)(NimStringDesc* dir, tlineinfo166527 info) {
    tstringtable123810* packages;
    NI pos;
    NI TMP1425;
    NU8 k_175246;
    NimStringDesc* p_175247;
    twin32finddata96815 f_175259;
    NI h_175261;
    NimStringDesc* LOC5;
    NimStringDesc* p_175257;
    NimStringDesc* key_175266;
    NimStringDesc* val_175268;
    NI h_175270;
    NI HEX3Atmp_175272;
    NI res_175274;
    nimfr("addPathRec", "babelcmd.nim")
    nimln(79, "babelcmd.nim");
    packages = nstnewStringTable(((NU8) 2));
    nimln(80, "babelcmd.nim");
    nimln(80, "babelcmd.nim");
    nimln(80, "babelcmd.nim");
    TMP1425 = subInt(dir->Sup.len, 1);
    pos = (NI32)(TMP1425);
    nimln(81, "babelcmd.nim");
    {
        nimln(81, "babelcmd.nim");
        if ((NU)(pos) > (NU)(dir->Sup.len)) raiseIndexError();
        if (!(((NU8)(dir->data[pos])) == ((NU8)(92)) || ((NU8)(dir->data[pos])) == ((NU8)(47)))) goto LA3;
        nimln(81, "babelcmd.nim");
        pos = addInt(pos, 1);
    }
LA3:
    ;
    k_175246 = 0;
    p_175247 = 0;
    memset((void*)&f_175259, 0, sizeof(f_175259));
    nimln(1249, "os.nim");
    nimln(1249, "os.nim");
    LOC5 = 0;
    LOC5 = HEX2F_108677(dir, ((NimStringDesc*) &TMP1420));
    h_175261 = findfirstfile_105816(LOC5, &f_175259);
    nimln(1250, "os.nim");
    {
        nimln(1250, "os.nim");
        nimln(1250, "os.nim");
        if (!!((h_175261 == -1))) goto LA8;
        nimln(1251, "os.nim");
        while (1) {
            NU8 k_175263;
            nimln(1252, "os.nim");
            k_175263 = ((NU8) 0);
            nimln(1253, "os.nim");
            {
                NIM_BOOL LOC13;
                NimStringDesc* LOC24;
                NimStringDesc* LOC25;
                nimln(1253, "os.nim");
                nimln(1253, "os.nim");
                LOC13 = 0;
                LOC13 = skipfinddata_105834(&f_175259);
                if (!!(LOC13)) goto LA14;
                nimln(1254, "os.nim");
                {
                    nimln(1254, "os.nim");
                    nimln(1254, "os.nim");
                    nimln(1254, "os.nim");
                    if (!!(((NI32)(f_175259.Dwfileattributes & ((NI32) 16)) == ((NI32) 0)))) goto LA18;
                    nimln(1255, "os.nim");
                    k_175263 = ((NU8) 2);
                }
LA18:
                ;
                nimln(1256, "os.nim");
                {
                    nimln(1256, "os.nim");
                    nimln(1256, "os.nim");
                    nimln(1256, "os.nim");
                    if (!!(((NI32)(f_175259.Dwfileattributes & ((NI32) 1024)) == ((NI32) 0)))) goto LA22;
                    nimln(1257, "os.nim");
                    nimln(1257, "os.nim");
                    k_175263 = addInt(k_175263, 1);
                }
LA22:
                ;
                nimln(1252, "os.nim");
                k_175246 = k_175263;
                nimln(1258, "os.nim");
                nimln(1258, "os.nim");
                nimln(1258, "os.nim");
                LOC24 = 0;
                LOC24 = HEX24_74991(((NI16*) (&f_175259.Cfilename[(0)- 0])));
                LOC25 = 0;
                LOC25 = nosextractFilename(LOC24);
                p_175247 = HEX2F_108677(dir, LOC25);
                nimln(83, "babelcmd.nim");
                {
                    NIM_BOOL LOC28;
                    nimln(83, "babelcmd.nim");
                    LOC28 = 0;
                    nimln(83, "babelcmd.nim");
                    LOC28 = (k_175246 == ((NU8) 2));
                    if (!(LOC28)) goto LA29;
                    nimln(83, "babelcmd.nim");
                    nimln(83, "babelcmd.nim");
                    if ((NU)(pos) > (NU)(p_175247->Sup.len)) raiseIndexError();
                    LOC28 = !(((NU8)(p_175247->data[pos]) == (NU8)(46)));
LA29:
                    ;
                    if (!LOC28) goto LA30;
                    nimln(84, "babelcmd.nim");
                    addpackage_175137(packages, p_175247);
                }
LA30:
                ;
            }
LA14:
            ;
            nimln(1259, "os.nim");
            {
                NI32 LOC34;
                nimln(1259, "os.nim");
                nimln(1259, "os.nim");
                LOC34 = 0;
                LOC34 = Dl_96838(h_175261, &f_175259);
                if (!(LOC34 == ((NI32) 0))) goto LA35;
                nimln(1259, "os.nim");
                goto LA10;
            }
LA35:
            ;
        }
LA10:
        ;
        nimln(1260, "os.nim");
        Dl_97002(h_175261);
    }
LA8:
    ;
    p_175257 = 0;
    key_175266 = 0;
    val_175268 = 0;
    h_175270 = 0;
    HEX3Atmp_175272 = 0;
    nimln(40, "strtabs.nim");
    nimln(40, "strtabs.nim");
    HEX3Atmp_175272 = ((*packages).Data->Sup.len-1);
    nimln(1458, "system.nim");
    res_175274 = 0;
    nimln(1459, "system.nim");
    while (1) {
        nimln(1459, "system.nim");
        if (!(res_175274 <= HEX3Atmp_175272)) goto LA37;
        nimln(1458, "system.nim");
        h_175270 = res_175274;
        nimln(41, "strtabs.nim");
        {
            NimStringDesc* res_175276;
            nimln(41, "strtabs.nim");
            nimln(41, "strtabs.nim");
            if ((NU)(h_175270) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
            if (!!((*packages).Data->data[h_175270].Field0 == 0)) goto LA40;
            nimln(42, "strtabs.nim");
            if ((NU)(h_175270) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
            key_175266 = (*packages).Data->data[h_175270].Field0;
            nimln(42, "strtabs.nim");
            if ((NU)(h_175270) >= (NU)((*packages).Data->Sup.len)) raiseIndexError();
            val_175268 = (*packages).Data->data[h_175270].Field1;
            nimln(58, "babelcmd.nim");
            nimln(58, "babelcmd.nim");
            {
                nimln(58, "babelcmd.nim");
                if (!eqStrings(val_175268, ((NimStringDesc*) &TMP1417))) goto LA44;
                res_175276 = key_175266;
            }
            goto LA42;
LA44:
            ;
            {
                NimStringDesc* LOC47;
                nimln(58, "babelcmd.nim");
                LOC47 = 0;
                LOC47 = rawNewString(key_175266->Sup.len + val_175268->Sup.len + 1);
                appendString(LOC47, key_175266);
                appendChar(LOC47, 45);
                appendString(LOC47, val_175268);
                res_175276 = LOC47;
            }
LA42:
            ;
            nimln(58, "babelcmd.nim");
            p_175257 = res_175276;
            nimln(86, "babelcmd.nim");
            addbabelpath_175163(p_175257, info);
        }
LA40:
        ;
        nimln(1461, "system.nim");
        res_175274 = addInt(res_175274, 1);
    }
LA37:
    ;
    popFrame();
}
Ejemplo n.º 4
0
N_NIMCALL(void, addpathwithnimfiles_175170)(NimStringDesc* p, tlineinfo166527 info) {
	nimfr("addPathWithNimFiles", "babelcmd.nim")
	nimln(72, "babelcmd.nim");
	{
		NIM_BOOL LOC3;
		nimln(72, "babelcmd.nim");
		LOC3 = 0;
		LOC3 = hasnimfile_175174(p);
		if (!LOC3) goto LA4;
		nimln(73, "babelcmd.nim");
		addbabelpath_175163(p, info);
	}
	goto LA1;
	LA4: ;
	{
		NU8 kind_175201;
		NimStringDesc* p2_175202;
		DIR* d_175204;
		kind_175201 = 0;
		p2_175202 = 0;
		nimln(1262, "os.nim");
		d_175204 = opendir(p->data);
		nimln(1263, "os.nim");
		{
			int LOC42;
			nimln(1263, "os.nim");
			nimln(1263, "os.nim");
			if (!!((d_175204 == NIM_NIL))) goto LA9;
			nimln(1264, "os.nim");
			while (1) {
				struct dirent* x_175206;
				NimStringDesc* y_175208;
				nimln(1265, "os.nim");
				x_175206 = readdir(d_175204);
				nimln(1266, "os.nim");
				{
					nimln(1266, "os.nim");
					if (!(x_175206 == NIM_NIL)) goto LA14;
					nimln(1266, "os.nim");
					goto LA11;
				}
				LA14: ;
				nimln(1267, "os.nim");
				nimln(1267, "os.nim");
				y_175208 = cstrToNimstr(((NCSTRING) ((*x_175206).d_name)));
				nimln(1268, "os.nim");
				{
					NIM_BOOL LOC18;
					struct stat s_175210;
					NU8 k_175212;
					nimln(1268, "os.nim");
					LOC18 = 0;
					nimln(1268, "os.nim");
					nimln(1268, "os.nim");
					LOC18 = !(eqStrings(y_175208, ((NimStringDesc*) &TMP1431)));
					if (!(LOC18)) goto LA19;
					nimln(1268, "os.nim");
					nimln(1268, "os.nim");
					LOC18 = !(eqStrings(y_175208, ((NimStringDesc*) &TMP1432)));
					LA19: ;
					if (!LOC18) goto LA20;
					memset((void*)&s_175210, 0, sizeof(s_175210));
					nimln(1270, "os.nim");
					y_175208 = HEX2F_109477(p, y_175208);
					nimln(1271, "os.nim");
					{
						int LOC24;
						nimln(1271, "os.nim");
						nimln(1271, "os.nim");
						LOC24 = 0;
						LOC24 = lstat(y_175208->data, &s_175210);
						if (!(LOC24 < ((NI32) 0))) goto LA25;
						nimln(1271, "os.nim");
						goto LA11;
					}
					LA25: ;
					nimln(1272, "os.nim");
					k_175212 = ((NU8) 0);
					nimln(1273, "os.nim");
					{
						NIM_BOOL LOC29;
						nimln(1273, "os.nim");
						LOC29 = 0;
						LOC29 = S_ISDIR(s_175210.st_mode);
						if (!LOC29) goto LA30;
						nimln(1273, "os.nim");
						k_175212 = ((NU8) 2);
					}
					LA30: ;
					nimln(1274, "os.nim");
					{
						NIM_BOOL LOC34;
						nimln(1274, "os.nim");
						LOC34 = 0;
						LOC34 = S_ISLNK(s_175210.st_mode);
						if (!LOC34) goto LA35;
						nimln(1274, "os.nim");
						nimln(1274, "os.nim");
						k_175212 = addInt(k_175212, 1);
					}
					LA35: ;
					nimln(1272, "os.nim");
					kind_175201 = k_175212;
					nimln(1267, "os.nim");
					p2_175202 = y_175208;
					nimln(76, "babelcmd.nim");
					{
						NIM_BOOL LOC39;
						nimln(76, "babelcmd.nim");
						LOC39 = 0;
						LOC39 = hasnimfile_175174(p2_175202);
						if (!LOC39) goto LA40;
						nimln(76, "babelcmd.nim");
						addbabelpath_175163(p2_175202, info);
					}
					LA40: ;
				}
				LA20: ;
			} LA11: ;
			nimln(1276, "os.nim");
			nimln(1276, "os.nim");
			LOC42 = 0;
			LOC42 = closedir(d_175204);
		}
		LA9: ;
	}
	LA1: ;
	popFrame();
}
Ejemplo n.º 5
0
N_NIMCALL(void, addpathwithnimfiles_175170)(NimStringDesc* p, tlineinfo166527 info) {
    nimfr("addPathWithNimFiles", "babelcmd.nim")
    nimln(72, "babelcmd.nim");
    {
        NIM_BOOL LOC3;
        nimln(72, "babelcmd.nim");
        LOC3 = 0;
        LOC3 = hasnimfile_175174(p);
        if (!LOC3) goto LA4;
        nimln(73, "babelcmd.nim");
        addbabelpath_175163(p, info);
    }
    goto LA1;
LA4:
    ;
    {
        NU8 kind_175198;
        NimStringDesc* p2_175199;
        twin32finddata96815 f_175201;
        NI h_175203;
        NimStringDesc* LOC7;
        kind_175198 = 0;
        p2_175199 = 0;
        memset((void*)&f_175201, 0, sizeof(f_175201));
        nimln(1249, "os.nim");
        nimln(1249, "os.nim");
        LOC7 = 0;
        LOC7 = HEX2F_108677(p, ((NimStringDesc*) &TMP1420));
        h_175203 = findfirstfile_105816(LOC7, &f_175201);
        nimln(1250, "os.nim");
        {
            nimln(1250, "os.nim");
            nimln(1250, "os.nim");
            if (!!((h_175203 == -1))) goto LA10;
            nimln(1251, "os.nim");
            while (1) {
                NU8 k_175205;
                nimln(1252, "os.nim");
                k_175205 = ((NU8) 0);
                nimln(1253, "os.nim");
                {
                    NIM_BOOL LOC15;
                    NimStringDesc* LOC26;
                    NimStringDesc* LOC27;
                    nimln(1253, "os.nim");
                    nimln(1253, "os.nim");
                    LOC15 = 0;
                    LOC15 = skipfinddata_105834(&f_175201);
                    if (!!(LOC15)) goto LA16;
                    nimln(1254, "os.nim");
                    {
                        nimln(1254, "os.nim");
                        nimln(1254, "os.nim");
                        nimln(1254, "os.nim");
                        if (!!(((NI32)(f_175201.Dwfileattributes & ((NI32) 16)) == ((NI32) 0)))) goto LA20;
                        nimln(1255, "os.nim");
                        k_175205 = ((NU8) 2);
                    }
LA20:
                    ;
                    nimln(1256, "os.nim");
                    {
                        nimln(1256, "os.nim");
                        nimln(1256, "os.nim");
                        nimln(1256, "os.nim");
                        if (!!(((NI32)(f_175201.Dwfileattributes & ((NI32) 1024)) == ((NI32) 0)))) goto LA24;
                        nimln(1257, "os.nim");
                        nimln(1257, "os.nim");
                        k_175205 = addInt(k_175205, 1);
                    }
LA24:
                    ;
                    nimln(1252, "os.nim");
                    kind_175198 = k_175205;
                    nimln(1258, "os.nim");
                    nimln(1258, "os.nim");
                    nimln(1258, "os.nim");
                    LOC26 = 0;
                    LOC26 = HEX24_74991(((NI16*) (&f_175201.Cfilename[(0)- 0])));
                    LOC27 = 0;
                    LOC27 = nosextractFilename(LOC26);
                    p2_175199 = HEX2F_108677(p, LOC27);
                    nimln(76, "babelcmd.nim");
                    {
                        NIM_BOOL LOC30;
                        nimln(76, "babelcmd.nim");
                        LOC30 = 0;
                        LOC30 = hasnimfile_175174(p2_175199);
                        if (!LOC30) goto LA31;
                        nimln(76, "babelcmd.nim");
                        addbabelpath_175163(p2_175199, info);
                    }
LA31:
                    ;
                }
LA16:
                ;
                nimln(1259, "os.nim");
                {
                    NI32 LOC35;
                    nimln(1259, "os.nim");
                    nimln(1259, "os.nim");
                    LOC35 = 0;
                    LOC35 = Dl_96838(h_175203, &f_175201);
                    if (!(LOC35 == ((NI32) 0))) goto LA36;
                    nimln(1259, "os.nim");
                    goto LA12;
                }
LA36:
                ;
            }
LA12:
            ;
            nimln(1260, "os.nim");
            Dl_97002(h_175203);
        }
LA10:
        ;
    }
LA1:
    ;
    popFrame();
}