Пример #1
0
N_NIMCALL(void, addpackage_172126)(Stringtableobj133012* packages, NimStringDesc* p) {
	NI x;
	NimStringDesc* name;
	x = versionsplitpos_172023(p);
	name = copyStrLast(p, ((NI) 0), (NI)(x - ((NI) 1)));
	{
		NimStringDesc* version;
		if (!(x < (p ? p->Sup.len : 0))) goto LA3;
		version = copyStr(p, (NI)(x + ((NI) 1)));
		{
			NimStringDesc* LOC7;
			NIM_BOOL LOC8;
			LOC7 = 0;
			LOC7 = nstGet(packages, name);
			LOC8 = 0;
			LOC8 = HEX3CHEX2E_172064(LOC7, version);
			if (!LOC8) goto LA9;
			nstPut(packages, name, version);
		}
		LA9: ;
	}
	goto LA1;
	LA3: ;
	{
		nstPut(packages, name, ((NimStringDesc*) &TMP1660));
	}
	LA1: ;
}
Пример #2
0
N_NIMCALL(NimStringDesc*, getvalue_112975)(tstringtable112610* t, NU8 flags, NimStringDesc* key) {
	NimStringDesc* result;
	nimfr("getValue", "strtabs.nim")
	result = 0;
	nimln(150, "strtabs.nim");
	{
		NIM_BOOL LOC3;
		nimln(150, "strtabs.nim");
		LOC3 = 0;
		LOC3 = nsthasKey(t, key);
		if (!LOC3) goto LA4;
		nimln(150, "strtabs.nim");
		nimln(150, "strtabs.nim");
		result = nstGet(t, key);
		goto BeforeRet;
	}	LA4: ;
	nimln(152, "strtabs.nim");
	{
		nimln(730, "system.nim");
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA8;
		nimln(152, "strtabs.nim");
		nimln(152, "strtabs.nim");
		result = getenv_104625(key);
	}	goto LA6;
	LA8: ;
	{
		nimln(153, "strtabs.nim");
		result = copyString(((NimStringDesc*) &TMP284));
	}	LA6: ;
	nimln(154, "strtabs.nim");
	{
		nimln(154, "strtabs.nim");
		nimln(154, "strtabs.nim");
		if (!(result->Sup.len == 0)) goto LA13;
		nimln(155, "strtabs.nim");
		{
			NimStringDesc* LOC19;
			nimln(730, "system.nim");
			if (!((flags &(1<<((((NU8) 2))&7)))!=0)) goto LA17;
			nimln(155, "strtabs.nim");
			nimln(155, "strtabs.nim");
			LOC19 = 0;
			LOC19 = rawNewString(key->Sup.len + 1);
appendChar(LOC19, 36);
appendString(LOC19, key);
			result = LOC19;
		}		goto LA15;
		LA17: ;
		{
			nimln(156, "strtabs.nim");
			nimln(730, "system.nim");
			if (!!(((flags &(1<<((((NU8) 1))&7)))!=0))) goto LA21;
			nimln(156, "strtabs.nim");
			raiseformatexception_112955(key);		}		goto LA15;
		LA21: ;
		LA15: ;
	}	LA13: ;
	BeforeRet: ;	popFrame();
	return result;
}N_NIMCALL(void, TMP298)(void* p, NI op) {
Пример #3
0
N_NIMCALL(NimStringDesc*, getconfigvar_136311)(NimStringDesc* key) {
	NimStringDesc* result;
	nimfr("getConfigVar", "options.nim")
	result = 0;
	nimln(178, "options.nim");
	result = nstGet(gconfigvars_136203, key);
	popFrame();
	return result;
}
Пример #4
0
N_NIMCALL(NimStringDesc*, getvalue_134630)(Stringtableobj134012* t, NU8 flags, NimStringDesc* key) {
    NimStringDesc* result;
    {   result = 0;
        {
            NIM_BOOL LOC3;
            LOC3 = 0;
            LOC3 = nsthasKey(t, key);
            if (!LOC3) goto LA4;
            result = nstGet(t, key);
            goto BeforeRet;
        }
LA4:
        ;
        {
            if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA8;
            result = getenv_122843(key);
        }
        goto LA6;
LA8:
        ;
        {
            result = copyString(((NimStringDesc*) &TMP1428));
        }
LA6:
        ;
        {
            if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA13;
            {
                NimStringDesc* LOC19;
                if (!((flags &(1<<((((NU8) 2))&7)))!=0)) goto LA17;
                LOC19 = 0;
                LOC19 = rawNewString(key->Sup.len + 1);
                appendChar(LOC19, 36);
                appendString(LOC19, key);
                result = LOC19;
            }
            goto LA15;
LA17:
            ;
            {
                if (!!(((flags &(1<<((((NU8) 1))&7)))!=0))) goto LA21;
                raiseformatexception_134610(key);
            }
            goto LA15;
LA21:
            ;
LA15:
            ;
        }
LA13:
        ;
    }
BeforeRet:
    ;
    return result;
}
Пример #5
0
N_NIMCALL(void, addpackage_175137)(tstringtable123810* packages, NimStringDesc* p) {
    NI x;
    NimStringDesc* name;
    NI TMP1418;
    nimfr("addPackage", "babelcmd.nim")
    nimln(47, "babelcmd.nim");
    x = versionsplitpos_175014(p);
    nimln(48, "babelcmd.nim");
    nimln(48, "babelcmd.nim");
    nimln(48, "babelcmd.nim");
    TMP1418 = subInt(x, 1);
    name = copyStrLast(p, 0, (NI32)(TMP1418));
    nimln(49, "babelcmd.nim");
    {
        NimStringDesc* version;
        NI TMP1419;
        nimln(49, "babelcmd.nim");
        nimln(49, "babelcmd.nim");
        if (!(x < p->Sup.len)) goto LA3;
        nimln(50, "babelcmd.nim");
        nimln(50, "babelcmd.nim");
        nimln(50, "babelcmd.nim");
        TMP1419 = addInt(x, 1);
        version = copyStr(p, (NI32)(TMP1419));
        nimln(51, "babelcmd.nim");
        {
            NimStringDesc* LOC7;
            NIM_BOOL LOC8;
            nimln(51, "babelcmd.nim");
            nimln(51, "babelcmd.nim");
            LOC7 = 0;
            LOC7 = nstGet(packages, name);
            LOC8 = 0;
            LOC8 = HEX3CHEX2E_175054(LOC7, version);
            if (!LOC8) goto LA9;
            nimln(52, "babelcmd.nim");
            nstPut(packages, name, version);
        }
LA9:
        ;
    }
    goto LA1;
LA3:
    ;
    {
        nimln(54, "babelcmd.nim");
        nstPut(packages, name, ((NimStringDesc*) &TMP1417));
    }
LA1:
    ;
    popFrame();
}
Пример #6
0
N_NIMCALL(NimStringDesc*, attr_333229)(txmlnode331009* n, NimStringDesc* name) {
	NimStringDesc* result;
	tstringtable121810* LOC11;
	nimfr("attr", "xmltree.nim")
	result = 0;
	nimln(297, "xmltree.nim");
	{
		NU8 LOC3;
		nimln(297, "xmltree.nim");
		nimln(297, "xmltree.nim");
		nimln(297, "xmltree.nim");
		LOC3 = 0;
		LOC3 = kind_331704(n);
		if (!!((LOC3 == ((NU8) 1)))) goto LA4;
		nimln(297, "xmltree.nim");
		failedassertimpl_80021(((NimStringDesc*) &TMP4677));
	}
	LA4: ;
	nimln(298, "xmltree.nim");
	{
		tstringtable121810* LOC8;
		nimln(298, "xmltree.nim");
		nimln(298, "xmltree.nim");
		LOC8 = 0;
		LOC8 = attrs_332028(n);
		if (!(LOC8 == NIM_NIL)) goto LA9;
		nimln(298, "xmltree.nim");
		nimln(298, "xmltree.nim");
		result = copyString(((NimStringDesc*) &TMP4651));
		goto BeforeRet;
	}
	LA9: ;
	nimln(299, "xmltree.nim");
	nimln(299, "xmltree.nim");
	nimln(299, "xmltree.nim");
	LOC11 = 0;
	LOC11 = attrs_332028(n);
	result = nstGet(LOC11, name);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}
Пример #7
0
N_NIMCALL(NIM_BOOL, isdefined_142016)(NimStringDesc* symbol) {
	NIM_BOOL result;
	nimfr("isDefined", "condsyms.nim")
	result = 0;
	nimln(26, "condsyms.nim");
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		nimln(26, "condsyms.nim");
		LOC3 = 0;
		LOC3 = nsthasKey(gsymbols_142003, symbol);
		if (!LOC3) goto LA4;
		nimln(27, "condsyms.nim");
		nimln(27, "condsyms.nim");
		nimln(27, "condsyms.nim");
		LOC6 = 0;
		LOC6 = nstGet(gsymbols_142003, symbol);
		result = eqStrings(LOC6, ((NimStringDesc*) &TMP897));
	}	LA4: ;
	popFrame();
	return result;
}
Пример #8
0
N_NIMCALL(NIM_BOOL, isdefined_166031)(NimStringDesc* symbol) {
	NIM_BOOL result;
	nimfr("isDefined", "condsyms.nim")
	result = 0;
	nimln(29, "condsyms.nim");
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = nsthasKey(gsymbols_166004, symbol);
		if (!LOC3) goto LA4;
		nimln(30, "condsyms.nim");
		LOC6 = 0;
		LOC6 = nstGet(gsymbols_166004, symbol);
		result = !(eqStrings(LOC6, ((NimStringDesc*) &TMP1318)));
	}
	goto LA1;
	LA4: ;
	{
		NI LOC8;
		nimln(31, "condsyms.nim");
		if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
		LOC8 = 0;
		LOC8 = nsuCmpIgnoreStyle(symbol, Cpu_157496[(targetcpu_157600)- 1].Field0);
		if (!(LOC8 == ((NI) 0))) goto LA9;
		nimln(32, "condsyms.nim");
		result = NIM_TRUE;
	}
	goto LA1;
	LA9: ;
	{
		NI LOC12;
		nimln(33, "condsyms.nim");
		if (targetos_157602 < 1 || targetos_157602 > 24) raiseIndexError();
		LOC12 = 0;
		LOC12 = nsuCmpIgnoreStyle(symbol, Os_157070[(targetos_157602)- 1].Field0);
		if (!(LOC12 == ((NI) 0))) goto LA13;
		nimln(34, "condsyms.nim");
		result = NIM_TRUE;
	}
	goto LA1;
	LA13: ;
	{
		NimStringDesc* LOC16;
		nimln(36, "condsyms.nim");
		LOC16 = 0;
		LOC16 = nsuNormalize(symbol);
		switch (hashString(LOC16) & 31) {
		case 2: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1334))) goto LA25;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1340))) goto LA31;
break;
		case 6: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1329))) goto LA21;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1337))) goto LA28;
break;
		case 7: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1326))) goto LA19;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1336))) goto LA27;
break;
		case 8: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1333))) goto LA24;
break;
		case 11: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1331))) goto LA23;
break;
		case 13: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1335))) goto LA26;
break;
		case 15: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1324))) goto LA17;
break;
		case 17: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1330))) goto LA22;
break;
		case 19: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1328))) goto LA20;
break;
		case 20: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1342))) goto LA33;
break;
		case 22: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1338))) goto LA29;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1339))) goto LA30;
break;
		case 25: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1341))) goto LA32;
break;
		case 27: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1325))) goto LA18;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1332))) goto LA24;
break;
		case 30: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1327))) goto LA20;
break;
		}
		goto LA34;
		LA17: ;
		{
			nimln(37, "condsyms.nim");
			result = (targetcpu_157600 == ((NU8) 1));
		}
		goto LA35;
		LA18: ;
		{
			nimln(38, "condsyms.nim");
			result = (targetcpu_157600 == ((NU8) 8));
		}
		goto LA35;
		LA19: ;
		{
			nimln(39, "condsyms.nim");
			result = (targetcpu_157600 == ((NU8) 9));
		}
		goto LA35;
		LA20: ;
		{
			nimln(41, "condsyms.nim");
			result = ((3768304 &(1<<((targetos_157602)&31)))!=0);
		}
		goto LA35;
		LA21: ;
		{
			nimln(46, "condsyms.nim");
			result = ((3584 &(1<<((targetos_157602)&31)))!=0);
		}
		goto LA35;
		LA22: ;
		{
			nimln(48, "condsyms.nim");
			if (targetos_157602 < 1 || targetos_157602 > 24) raiseIndexError();
			result = ((Os_157070[(targetos_157602)- 1].Field12 &(1<<((((NU8) 3))&7)))!=0);
		}
		goto LA35;
		LA23: ;
		{
			nimln(49, "condsyms.nim");
			result = (targetos_157602 == ((NU8) 1));
		}
		goto LA35;
		LA24: ;
		{
			nimln(50, "condsyms.nim");
			result = (targetos_157602 == ((NU8) 2));
		}
		goto LA35;
		LA25: ;
		{
			nimln(51, "condsyms.nim");
			result = ((786432 &(1<<((targetos_157602)&31)))!=0);
		}
		goto LA35;
		LA26: ;
		{
			nimln(52, "condsyms.nim");
			result = (targetos_157602 == ((NU8) 7));
		}
		goto LA35;
		LA27: ;
		{
			nimln(53, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field2 == ((NU8) 0));
		}
		goto LA35;
		LA28: ;
		{
			nimln(54, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field2 == ((NU8) 1));
		}
		goto LA35;
		LA29: ;
		{
			nimln(55, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field4 == ((NI) 8));
		}
		goto LA35;
		LA30: ;
		{
			nimln(56, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field4 == ((NI) 16));
		}
		goto LA35;
		LA31: ;
		{
			nimln(57, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field4 == ((NI) 32));
		}
		goto LA35;
		LA32: ;
		{
			nimln(58, "condsyms.nim");
			if (targetcpu_157600 < 1 || targetcpu_157600 > 14) raiseIndexError();
			result = (Cpu_157496[(targetcpu_157600)- 1].Field4 == ((NI) 64));
		}
		goto LA35;
		LA33: ;
		{
			nimln(60, "condsyms.nim");
			result = ((528000 &(1<<((targetos_157602)&31)))!=0);
		}
		goto LA35;
		LA34: ;
		{
		}
		LA35: ;
	}
	LA1: ;
	popFrame();
	return result;
}
Пример #9
0
N_NIMCALL(NIM_BOOL, isdefined_168031)(NimStringDesc* symbol) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = nsthasKey(gsymbols_168004, symbol);
		if (!LOC3) goto LA4;
		LOC6 = 0;
		LOC6 = nstGet(gsymbols_168004, symbol);
		result = !(eqStrings(LOC6, ((NimStringDesc*) &TMP1461)));
	}
	goto LA1;
	LA4: ;
	{
		NI LOC8;
		LOC8 = 0;
		LOC8 = nsuCmpIgnoreStyle(symbol, Cpu_159496[(targetcpu_159600)- 1].Field0);
		if (!(LOC8 == ((NI) 0))) goto LA9;
		result = NIM_TRUE;
	}
	goto LA1;
	LA9: ;
	{
		NI LOC12;
		LOC12 = 0;
		LOC12 = nsuCmpIgnoreStyle(symbol, Os_159070[(targetos_159602)- 1].Field0);
		if (!(LOC12 == ((NI) 0))) goto LA13;
		result = NIM_TRUE;
	}
	goto LA1;
	LA13: ;
	{
		NimStringDesc* LOC16;
		LOC16 = 0;
		LOC16 = nsuNormalize(symbol);
		switch (hashString(LOC16) & 31) {
		case 0: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1471))) goto LA24;
break;
		case 1: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1470))) goto LA24;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1480))) goto LA33;
break;
		case 2: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1478))) goto LA31;
break;
		case 3: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1469))) goto LA23;
break;
		case 6: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1467))) goto LA21;
break;
		case 13: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1473))) goto LA26;
break;
		case 15: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1462))) goto LA17;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1463))) goto LA18;
break;
		case 19: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1466))) goto LA20;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1468))) goto LA22;
break;
		case 20: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1475))) goto LA28;
break;
		case 22: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1476))) goto LA29;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1477))) goto LA30;
break;
		case 23: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1464))) goto LA19;
break;
		case 25: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1479))) goto LA32;
break;
		case 27: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1474))) goto LA27;
break;
		case 30: 
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1465))) goto LA20;
if (eqStrings(LOC16, ((NimStringDesc*) &TMP1472))) goto LA25;
break;
		}
		goto LA34;
		LA17: ;
		{
			result = (targetcpu_159600 == ((NU8) 1));
		}
		goto LA35;
		LA18: ;
		{
			result = (targetcpu_159600 == ((NU8) 8));
		}
		goto LA35;
		LA19: ;
		{
			result = (targetcpu_159600 == ((NU8) 9));
		}
		goto LA35;
		LA20: ;
		{
			result = ((3768304 &(1<<((targetos_159602)&31)))!=0);
		}
		goto LA35;
		LA21: ;
		{
			result = ((3584 &(1<<((targetos_159602)&31)))!=0);
		}
		goto LA35;
		LA22: ;
		{
			result = ((Os_159070[(targetos_159602)- 1].Field12 &(1<<((((NU8) 3))&7)))!=0);
		}
		goto LA35;
		LA23: ;
		{
			result = (targetos_159602 == ((NU8) 1));
		}
		goto LA35;
		LA24: ;
		{
			result = (targetos_159602 == ((NU8) 2));
		}
		goto LA35;
		LA25: ;
		{
			result = ((786432 &(1<<((targetos_159602)&31)))!=0);
		}
		goto LA35;
		LA26: ;
		{
			result = (targetos_159602 == ((NU8) 7));
		}
		goto LA35;
		LA27: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field2 == ((NU8) 0));
		}
		goto LA35;
		LA28: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field2 == ((NU8) 1));
		}
		goto LA35;
		LA29: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field4 == ((NI) 8));
		}
		goto LA35;
		LA30: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field4 == ((NI) 16));
		}
		goto LA35;
		LA31: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field4 == ((NI) 32));
		}
		goto LA35;
		LA32: ;
		{
			result = (Cpu_159496[(targetcpu_159600)- 1].Field4 == ((NI) 64));
		}
		goto LA35;
		LA33: ;
		{
			result = ((528000 &(1<<((targetos_159602)&31)))!=0);
		}
		goto LA35;
		LA34: ;
		{
		}
		LA35: ;
	}
	LA1: ;
	return result;
}
Пример #10
0
N_NIMCALL(NimStringDesc*, getconfigvar_153340)(NimStringDesc* key) {
	NimStringDesc* result;
	result = 0;
	result = nstGet(gconfigvars_153231, key);
	return result;
}
Пример #11
0
N_NIMCALL(NimStringDesc*, getpackagename_153825)(NimStringDesc* path) {
	NimStringDesc* result;
	NI parents;
{	result = 0;
	parents = ((NI) 0);
	{
		{
			NimStringDesc* d_153831;
			NimStringDesc* current_153888;
			d_153831 = 0;
			current_153888 = copyString(path);
			{
				while (1) {
					current_153888 = nosparentDir(current_153888);
					{
						if (!((current_153888 ? current_153888->Sup.len : 0) == ((NI) 0))) goto LA7;
						goto LA3;
					}
					LA7: ;
					d_153831 = current_153888;
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = nsthasKey(packagecache_153601, d_153831);
						if (!LOC11) goto LA12;
						result = nstGet(packagecache_153601, d_153831);
						goto BeforeRet;
					}
					LA12: ;
					parents += ((NI) 1);
					{
						NimStringDesc* file_153841;
						NimStringDesc* HEX3Atmp_153855;
						glob_t f_153859;
						NI res_153861;
						int LOC15;
						file_153841 = 0;
						HEX3Atmp_153855 = 0;
						HEX3Atmp_153855 = HEX2F_118292(d_153831, ((NimStringDesc*) &TMP1433));
						memset((void*)(&f_153859), 0, sizeof(f_153859));
						res_153861 = 0;
						f_153859.gl_offs = ((NI) 0);
						f_153859.gl_pathc = ((NI) 0);
						f_153859.gl_pathv = NIM_NIL;
						LOC15 = 0;
						LOC15 = glob(HEX3Atmp_153855->data, ((int) 0), NIM_NIL, (&f_153859));
						res_153861 = ((NI) (LOC15));
						{
							if (!(res_153861 == ((NI) 0))) goto LA18;
							{
								NI i_153863;
								NI HEX3Atmp_153865;
								NI res_153867;
								i_153863 = 0;
								HEX3Atmp_153865 = 0;
								HEX3Atmp_153865 = (NI)(f_153859.gl_pathc - ((NI) 1));
								res_153867 = ((NI) 0);
								{
									while (1) {
										TY118589 LOC23;
										if (!(res_153867 <= HEX3Atmp_153865)) goto LA22;
										i_153863 = res_153867;
										file_153841 = cstrToNimstr(f_153859.gl_pathv[(i_153863)- 0]);
										memset((void*)(&LOC23), 0, sizeof(LOC23));
										nossplitFile(file_153841, (&LOC23));
										result = copyString(LOC23.Field1);
										goto LA1;
										res_153867 += ((NI) 1);
									} LA22: ;
								}
							}
						}
						LA18: ;
						globfree((&f_153859));
					}
					{
						NimStringDesc* file_153842;
						NimStringDesc* HEX3Atmp_153871;
						glob_t f_153875;
						NI res_153877;
						int LOC25;
						file_153842 = 0;
						HEX3Atmp_153871 = 0;
						HEX3Atmp_153871 = HEX2F_118292(d_153831, ((NimStringDesc*) &TMP1434));
						memset((void*)(&f_153875), 0, sizeof(f_153875));
						res_153877 = 0;
						f_153875.gl_offs = ((NI) 0);
						f_153875.gl_pathc = ((NI) 0);
						f_153875.gl_pathv = NIM_NIL;
						LOC25 = 0;
						LOC25 = glob(HEX3Atmp_153871->data, ((int) 0), NIM_NIL, (&f_153875));
						res_153877 = ((NI) (LOC25));
						{
							if (!(res_153877 == ((NI) 0))) goto LA28;
							{
								NI i_153879;
								NI HEX3Atmp_153881;
								NI res_153883;
								i_153879 = 0;
								HEX3Atmp_153881 = 0;
								HEX3Atmp_153881 = (NI)(f_153875.gl_pathc - ((NI) 1));
								res_153883 = ((NI) 0);
								{
									while (1) {
										TY118589 LOC33;
										if (!(res_153883 <= HEX3Atmp_153881)) goto LA32;
										i_153879 = res_153883;
										file_153842 = cstrToNimstr(f_153875.gl_pathv[(i_153879)- 0]);
										memset((void*)(&LOC33), 0, sizeof(LOC33));
										nossplitFile(file_153842, (&LOC33));
										result = copyString(LOC33.Field1);
										goto LA1;
										res_153883 += ((NI) 1);
									} LA32: ;
								}
							}
						}
						LA28: ;
						globfree((&f_153875));
					}
				}
			} LA3: ;
		}
	} LA1: ;
	{
		if (!result == 0) goto LA36;
		result = copyString(((NimStringDesc*) &TMP39));
	}
	LA36: ;
	{
		NimStringDesc* d_153843;
		NimStringDesc* current_153892;
		d_153843 = 0;
		current_153892 = copyString(path);
		{
			while (1) {
				current_153892 = nosparentDir(current_153892);
				{
					if (!((current_153892 ? current_153892->Sup.len : 0) == ((NI) 0))) goto LA43;
					goto LA39;
				}
				LA43: ;
				d_153843 = current_153892;
				nstPut(packagecache_153601, d_153843, result);
				parents -= ((NI) 1);
				{
					if (!(parents <= ((NI) 0))) goto LA47;
					goto LA38;
				}
				LA47: ;
			}
		} LA39: ;
	} LA38: ;
	}BeforeRet: ;
	return result;
}
Пример #12
0
N_NIMCALL(NimStringDesc*, getpackagename_136811)(NimStringDesc* path) {
	NimStringDesc* result;
	NI parents;
	NimStringDesc* d_136835;
	NimStringDesc* current_136866;
	nimfr("getPackageName", "options.nim")
	result = 0;
	nimln(234, "options.nim");
	parents = 0;
	{
		NimStringDesc* d_136817;
		NimStringDesc* current_136864;
		d_136817 = 0;
		nimln(227, "options.nim");
		current_136864 = copyString(path);
		nimln(228, "options.nim");
		while (1) {
			NimStringDesc* file_136834;
			NimStringDesc* HEX3Atmp_136852;
			glob_t f_136854;
			NI res_136856;
			int LOC12;
			nimln(229, "options.nim");
			current_136864 = nosparentDir(current_136864);
			nimln(230, "options.nim");
			{
				nimln(230, "options.nim");
				nimln(230, "options.nim");
				if (!(current_136864->Sup.len == 0)) goto LA5;
				nimln(230, "options.nim");
				goto LA2;
			}
			LA5: ;
			nimln(227, "options.nim");
			d_136817 = current_136864;
			nimln(237, "options.nim");
			{
				NIM_BOOL LOC9;
				nimln(237, "options.nim");
				LOC9 = 0;
				LOC9 = nsthasKey(packagecache_136601, d_136817);
				if (!LOC9) goto LA10;
				nimln(239, "options.nim");
				nimln(239, "options.nim");
				result = nstGet(packagecache_136601, d_136817);
				goto BeforeRet;
			}
			LA10: ;
			nimln(240, "options.nim");
			parents = addInt(parents, 1);
			file_136834 = 0;
			HEX3Atmp_136852 = 0;
			nimln(241, "options.nim");
			HEX3Atmp_136852 = HEX2F_108477(d_136817, ((NimStringDesc*) &TMP425));
			memset((void*)&f_136854, 0, sizeof(f_136854));
			res_136856 = 0;
			nimln(1208, "os.nim");
			f_136854.gl_offs = 0;
			nimln(1209, "os.nim");
			f_136854.gl_pathc = 0;
			nimln(1210, "os.nim");
			f_136854.gl_pathv = NIM_NIL;
			nimln(1211, "os.nim");
			nimln(1211, "os.nim");
			LOC12 = 0;
			LOC12 = glob(HEX3Atmp_136852->data, ((int) 0), NIM_NIL, &f_136854);
			res_136856 = ((NI) (LOC12));
			nimln(1212, "os.nim");
			{
				NI i_136858;
				NI HEX3Atmp_136860;
				NI TMP426;
				NI res_136862;
				nimln(1212, "os.nim");
				if (!(res_136856 == 0)) goto LA15;
				i_136858 = 0;
				HEX3Atmp_136860 = 0;
				nimln(1213, "os.nim");
				nimln(1213, "os.nim");
				TMP426 = subInt(f_136854.gl_pathc, 1);
				HEX3Atmp_136860 = (NI32)(TMP426);
				nimln(1457, "system.nim");
				res_136862 = 0;
				nimln(1458, "system.nim");
				while (1) {
					TY108700 LOC22;
					nimln(1458, "system.nim");
					if (!(res_136862 <= HEX3Atmp_136860)) goto LA17;
					nimln(1457, "system.nim");
					i_136858 = res_136862;
					nimln(1214, "os.nim");
					{
						nimln(1214, "os.nim");
						nimln(1214, "os.nim");
						nimln(1214, "os.nim");
						if ((NU)(i_136858) > (NU)(50000)) raiseIndexError();
						if (!!(!((f_136854.gl_pathv[(i_136858)- 0] == NIM_NIL)))) goto LA20;
						nimln(1214, "os.nim");
						failedassertimpl_79821(((NimStringDesc*) &TMP427));
					}
					LA20: ;
					nimln(1215, "os.nim");
					nimln(1215, "os.nim");
					if ((NU)(i_136858) > (NU)(50000)) raiseIndexError();
					file_136834 = cstrToNimstr(f_136854.gl_pathv[(i_136858)- 0]);
					nimln(242, "options.nim");
					nimln(242, "options.nim");
					memset((void*)&LOC22, 0, sizeof(LOC22));
					nossplitFile(file_136834, &LOC22);
					result = copyString(LOC22.Field1);
					nimln(243, "options.nim");
					goto LA1;
					nimln(1460, "system.nim");
					res_136862 = addInt(res_136862, 1);
				} LA17: ;
			}
			LA15: ;
			nimln(1216, "os.nim");
			globfree(&f_136854);
		} LA2: ;
	} LA1: ;
	nimln(245, "options.nim");
	{
		nimln(245, "options.nim");
		if (!result == 0) goto LA25;
		nimln(245, "options.nim");
		result = copyString(((NimStringDesc*) &TMP404));
	}
	LA25: ;
	d_136835 = 0;
	nimln(227, "options.nim");
	current_136866 = copyString(path);
	nimln(228, "options.nim");
	while (1) {
		nimln(229, "options.nim");
		current_136866 = nosparentDir(current_136866);
		nimln(230, "options.nim");
		{
			nimln(230, "options.nim");
			nimln(230, "options.nim");
			if (!(current_136866->Sup.len == 0)) goto LA30;
			nimln(230, "options.nim");
			goto LA27;
		}
		LA30: ;
		nimln(227, "options.nim");
		d_136835 = current_136866;
		nimln(248, "options.nim");
		nstPut(packagecache_136601, d_136835, result);
		nimln(249, "options.nim");
		parents = subInt(parents, 1);
		nimln(250, "options.nim");
		{
			nimln(250, "options.nim");
			if (!(parents <= 0)) goto LA34;
			nimln(250, "options.nim");
			goto LA27;
		}
		LA34: ;
	} LA27: ;
	BeforeRet: ;
	popFrame();
	return result;
}