コード例 #1
0
ファイル: compiler_vmdeps.c プロジェクト: jlp765/csources
N_NIMCALL(NimStringDesc*, opslurp_379044)(NimStringDesc* file, Tlineinfo162338 info, Tsym190843* module) {
	NimStringDesc* volatile result;
	TSafePoint TMP2884;
	result = 0;
	pushSafePoint(&TMP2884);
	TMP2884.status = _setjmp(TMP2884.context);
	if (TMP2884.status == 0) {
		NimStringDesc* filename;
		Tnodeseq190807* LOC2;
		TY208694 LOC3;
		Tnode190813* LOC4;
		filename = findfile_154341(file);
		result = readfile_13434(filename);
		LOC2 = 0;
		LOC2 = (Tnodeseq190807*) newSeq((&NTI190807), 1);
		memset((void*)LOC3, 0, sizeof(LOC3));
		LOC3[0] = newstrnode_191644(((NU8) 20), filename);
		asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
		LOC4 = 0;
		LOC4 = newnode_192607(((NU8) 121), info, LOC2, NIM_NIL);
		appendtomodule_191911(module, LOC4);
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI3431))) {
			TMP2884.status = 0;
			localerror_164171(info, ((NU16) 3), file);
			result = copyString(((NimStringDesc*) &TMP2885));
			popCurrentException();
		}
	}
	if (TMP2884.status != 0) reraiseException();
	return result;
}
コード例 #2
0
ファイル: game.c プロジェクト: Uint1024/Boomb
N_NIMCALL(void, loadlevel_154449)(NimStringDesc* name) {
    NimStringDesc* LOC1;
    NI32 x;
    NI32 y;
    nimfr("loadLevel", "game.nim")
    nimln(34, "game.nim");
    LOC1 = 0;
    LOC1 = rawNewString(name->Sup.len + 9);
    appendString(LOC1, ((NimStringDesc*) &TMP375));
    appendString(LOC1, name);
    appendString(LOC1, ((NimStringDesc*) &TMP376));
    asgnRefNoCycle((void**) (&mapstring_154011), readfile_13434(LOC1));
    nimln(35, "game.nim");
    x = ((NI32) 0);
    y = ((NI32) 0);
    {
        NIM_CHAR character_154454;
        NI i_154506;
        NI L_154508;
        character_154454 = 0;
        nimln(3102, "system.nim");
        i_154506 = ((NI) 0);
        nimln(3103, "system.nim");
        L_154508 = (mapstring_154011 ? mapstring_154011->Sup.len : 0);
        {
            nimln(3104, "system.nim");
            while (1) {
                NimStringDesc* LOC5;
                NI TMP385;
                if (!(i_154506 < L_154508)) goto LA4;
                nimln(3105, "system.nim");
                if ((NU)(i_154506) > (NU)(mapstring_154011->Sup.len)) raiseIndexError();
                character_154454 = mapstring_154011->data[i_154506];
                nimln(37, "game.nim");
                LOC5 = 0;
                LOC5 = nimIntToStr(((NI) (x)));
                printf("%s\015\012", LOC5? (LOC5)->data:"nil");
                nimln(38, "game.nim");
                {
                    NI32 TMP377;
                    NI32 TMP378;
                    WallHEX3Aobjecttype153013* LOC10;
                    NI32 TMP379;
                    if (!((NU8)(character_154454) == (NU8)(49))) goto LA8;
                    nimln(39, "game.nim");
                    TMP377 = mulInt(x, tilesize_154012);
                    TMP378 = mulInt(y, tilesize_154012);
                    LOC10 = 0;
                    LOC10 = newwall_153024((NI32)(TMP377), (NI32)(TMP378));
                    map_154010 = (TY154009*) incrSeq(&(map_154010)->Sup, sizeof(WallHEX3Aobjecttype153013*));
                    asgnRef((void**) (&map_154010->data[map_154010->Sup.len-1]), LOC10);
                    nimln(40, "game.nim");
                    TMP379 = addInt(x, ((NI) 1));
                    x = (NI32)(TMP379);
                }
                goto LA6;
LA8:
                ;
                {
                    NI32 TMP380;
                    NI32 TMP381;
                    NI32 TMP382;
                    nimln(41, "game.nim");
                    if (!((NU8)(character_154454) == (NU8)(80))) goto LA12;
                    nimln(42, "game.nim");
                    TMP380 = mulInt(x, tilesize_154012);
                    TMP381 = mulInt(y, tilesize_154012);
                    asgnRef((void**) (&player1_154008), newplayer_152024((NI32)(TMP380), (NI32)(TMP381)));
                    nimln(43, "game.nim");
                    TMP382 = addInt(x, ((NI) 1));
                    x = (NI32)(TMP382);
                }
                goto LA6;
LA12:
                ;
                {
                    NI32 TMP383;
                    nimln(44, "game.nim");
                    if (!((NU8)(character_154454) == (NU8)(48))) goto LA15;
                    nimln(45, "game.nim");
                    TMP383 = addInt(x, ((NI) 1));
                    x = (NI32)(TMP383);
                }
                goto LA6;
LA15:
                ;
                {
                    NI32 TMP384;
                    nimln(46, "game.nim");
                    if (!((NU8)(character_154454) == (NU8)(13))) goto LA18;
                    nimln(47, "game.nim");
                    TMP384 = addInt(y, ((NI) 1));
                    y = (NI32)(TMP384);
                    nimln(48, "game.nim");
                    x = ((NI32) 0);
                }
                goto LA6;
LA18:
                ;
LA6:
                ;
                nimln(3106, "system.nim");
                TMP385 = addInt(i_154506, ((NI) 1));
                i_154506 = (NI)(TMP385);
                nimln(3107, "system.nim");
                {
                    if (!!(((mapstring_154011 ? mapstring_154011->Sup.len : 0) == L_154508))) goto LA22;
                    failedassertimpl_88817(((NimStringDesc*) &TMP386));
                }
LA22:
                ;
            }
LA4:
            ;
        }
    }
    popFrame();
}