Created
August 4, 2010 21:08
-
-
Save dom96/508792 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Generated by Nimrod Compiler v0.8.9 */ | |
| /* (c) 2010 Andreas Rumpf */ | |
| /* Compiled for: Linux, i386, gcc */ | |
| /* Command for C compiler: | |
| gcc -c -w -I/home/dominik/Desktop/code/outside/bzr/nimrod/lib -o nimcache/bug.o nimcache/bug.c */ | |
| typedef long int NI; | |
| typedef unsigned long int NU; | |
| #include "nimbase.h" | |
| typedef struct NimStringDesc NimStringDesc; | |
| typedef struct TGenericSeq TGenericSeq; | |
| typedef struct TY420 TY420; | |
| typedef struct TNimType TNimType; | |
| typedef struct TNimNode TNimNode; | |
| typedef struct TY418 TY418; | |
| typedef struct TY416 TY416; | |
| typedef struct E_Base E_Base; | |
| typedef struct TNimObject TNimObject; | |
| typedef struct TY9402 TY9402; | |
| typedef struct TY9418 TY9418; | |
| typedef struct TY9790 TY9790; | |
| typedef struct TY9414 TY9414; | |
| typedef struct TY9410 TY9410; | |
| typedef struct TY9788 TY9788; | |
| struct TGenericSeq { | |
| NI len; | |
| NI space; | |
| }; | |
| typedef NIM_CHAR TY239[100000001]; | |
| struct NimStringDesc { | |
| TGenericSeq Sup; | |
| TY239 data; | |
| }; | |
| struct TNimType { | |
| NI size; | |
| NU8 kind; | |
| NU8 flags; | |
| TNimType* base; | |
| TNimNode* node; | |
| void* finalizer; | |
| }; | |
| struct TNimNode { | |
| NU8 kind; | |
| NI offset; | |
| TNimType* typ; | |
| NCSTRING name; | |
| NI len; | |
| TNimNode** sons; | |
| }; | |
| struct TNimObject { | |
| TNimType* m_type; | |
| }; | |
| struct E_Base { | |
| TNimObject Sup; | |
| NCSTRING name; | |
| NimStringDesc* message; | |
| }; | |
| struct TY416 { | |
| E_Base Sup; | |
| }; | |
| struct TY418 { | |
| TY416 Sup; | |
| }; | |
| struct TY420 { | |
| TY418 Sup; | |
| }; | |
| struct TY9402 { | |
| NI Refcount; | |
| TNimType* Typ; | |
| }; | |
| struct TY9418 { | |
| NI Len; | |
| NI Cap; | |
| TY9402** D; | |
| }; | |
| struct TY9414 { | |
| NI Counter; | |
| NI Max; | |
| TY9410* Head; | |
| TY9410** Data; | |
| }; | |
| struct TY9788 { | |
| NI Stackscans; | |
| NI Cyclecollections; | |
| NI Maxthreshold; | |
| NI Maxstacksize; | |
| NI Maxstackcells; | |
| NI Cycletablesize; | |
| }; | |
| struct TY9790 { | |
| TY9418 Zct; | |
| TY9418 Decstack; | |
| TY9414 Cycleroots; | |
| TY9418 Tempstack; | |
| TY9788 Stat; | |
| }; | |
| typedef NI TY7614[16]; | |
| struct TY9410 { | |
| TY9410* Next; | |
| NI Key; | |
| TY7614 Bits; | |
| }; | |
| N_NIMCALL(NIM_BOOL, Open_3617)(FILE** F_3620, NimStringDesc* Filename_3621, NU8 Mode_3622, NI Bufsize_3623); | |
| N_NIMCALL(void*, newObj)(TNimType* Typ_9817, NI Size_9818); | |
| static N_INLINE(void, asgnRefNoCycle)(void** Dest_10619, void* Src_10620); | |
| static N_INLINE(TY9402*, Usrtocell_9834)(void* Usr_9836); | |
| N_NOINLINE(void, Addzct_9823)(TY9418* S_9826, TY9402* C_9827); | |
| N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* Src_15508); | |
| N_NIMCALL(void, raiseException)(E_Base* E_4604, NCSTRING Ename_4605); | |
| N_NIMCALL(NIM_BOOL, Endoffile_3638)(FILE* F_3640); | |
| N_NIMCALL(void, Rawreadline_3789)(FILE* F_3791, NimStringDesc** Result_3793); | |
| N_NIMCALL(void, internalAssert)(NCSTRING File_5024, NI Line_5025, NIM_BOOL Cond_5026); | |
| N_NOINLINE(void, nim__datInit)(void); | |
| N_NOINLINE(void, systemInit)(void); | |
| N_NOINLINE(void, bugInit)(void); | |
| STRING_LITERAL(TMP19014, "blah", 4); | |
| STRING_LITERAL(TMP19015, "cannot open: blah", 17); | |
| STRING_LITERAL(TMP19016, "", 0); | |
| extern TNimType* NTI4262; /* ref EIO */ | |
| extern TNimType* NTI420; /* EIO */ | |
| extern TY9790 Gch_9808; | |
| static N_INLINE(TY9402*, Usrtocell_9834)(void* Usr_9836) { | |
| TY9402* Result_9837; | |
| volatile struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len; | |
| } F; | |
| F.procname = "system.usrToCell"; | |
| F.prev = framePtr; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| F.line = 0; | |
| framePtr = (TFrame*)&F; | |
| F.len = 0; | |
| Result_9837 = 0; | |
| F.line = 96; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| Result_9837 = ((TY9402*) ((NI32)((NU32)(((NI) (Usr_9836))) - (NU32)(((NI) (((NI)sizeof(TY9402)))))))); | |
| framePtr = framePtr->prev; | |
| return Result_9837; | |
| } | |
| static N_INLINE(void, asgnRefNoCycle)(void** Dest_10619, void* Src_10620) { | |
| TY9402* C_10621; | |
| TY9402* C_10622; | |
| volatile struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len; | |
| } F; | |
| F.procname = "system.asgnRefNoCycle"; | |
| F.prev = framePtr; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| F.line = 0; | |
| framePtr = (TFrame*)&F; | |
| F.len = 0; | |
| F.line = 250; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| if (!!((Src_10620 == NIM_NIL))) goto LA3; | |
| C_10621 = 0; | |
| F.line = 251; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| C_10621 = Usrtocell_9834(Src_10620); | |
| F.line = 252; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| (*C_10621).Refcount = (NI32)((NU32)((*C_10621).Refcount) + (NU32)(8)); | |
| LA3: ; | |
| F.line = 253; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| if (!!(((*Dest_10619) == NIM_NIL))) goto LA9; | |
| C_10622 = 0; | |
| F.line = 254; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| C_10622 = Usrtocell_9834((*Dest_10619)); | |
| F.line = 255; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| (*C_10622).Refcount = (NI32)((NU32)((*C_10622).Refcount) - (NU32)(8)); | |
| F.line = 256; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| if (!((NU32)((*C_10622).Refcount) < (NU32)(8))) goto LA15; | |
| F.line = 257; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| Addzct_9823(&Gch_9808.Zct, C_10622); | |
| LA15: ; | |
| LA9: ; | |
| F.line = 258; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system/gc.nim"; | |
| (*Dest_10619) = Src_10620; | |
| framePtr = framePtr->prev; | |
| } | |
| int cmdCount; | |
| char** cmdLine; | |
| char** gEnv; | |
| N_CDECL(void, NimMain)(void) { | |
| nim__datInit(); | |
| systemInit(); | |
| bugInit(); | |
| } | |
| int main(int argc, char** args, char** env) { | |
| cmdLine = args; | |
| cmdCount = argc; | |
| gEnv = env; | |
| NimMain(); | |
| return 0; | |
| } | |
| N_NOINLINE(void, bugInit)(void) { | |
| NimStringDesc* I_19004; | |
| FILE* F_19007; | |
| NIM_BOOL LOC3; | |
| TY420* E_19009; | |
| NimStringDesc* Res_19011; | |
| NIM_BOOL LOC13; | |
| volatile struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len; | |
| } F; | |
| F.procname = "module bug"; | |
| F.prev = framePtr; | |
| F.filename = "bug.nim"; | |
| F.line = 0; | |
| framePtr = (TFrame*)&F; | |
| F.len = 0; | |
| I_19004 = 0; | |
| F_19007 = 0; | |
| F.line = 1496; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| LOC3 = Open_3617(&F_19007, ((NimStringDesc*) &TMP19014), ((NU8) 0), -1); | |
| if (!!(LOC3)) goto LA4; | |
| E_19009 = 0; | |
| F.line = 1278; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| E_19009 = (TY420*) newObj(NTI4262, sizeof(TY420)); | |
| (*E_19009).Sup.Sup.Sup.Sup.m_type = NTI420; | |
| F.line = 1279; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| asgnRefNoCycle((void**) &(*E_19009).Sup.Sup.Sup.message, copyString(((NimStringDesc*) &TMP19015))); | |
| F.line = 1497; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| raiseException((E_Base*)E_19009, "EIO"); | |
| LA4: ; | |
| Res_19011 = 0; | |
| F.line = 1498; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| Res_19011 = copyString(((NimStringDesc*) &TMP19016)); | |
| F.line = 1499; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| while (1) { | |
| LOC13 = Endoffile_3638(F_19007); | |
| if (!!(LOC13)) goto LA12; | |
| F.line = 1500; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| Rawreadline_3789(F_19007, &Res_19011); | |
| F.line = 1498; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| I_19004 = Res_19011; | |
| F.line = 2; | |
| F.filename = "bug.nim"; | |
| internalAssert("bug.nim", 2, NIM_FALSE); | |
| } LA12: ; | |
| F.line = 1502; | |
| F.filename = "/home/dominik/Desktop/code/outside/bzr/nimrod/lib/system.nim"; | |
| fclose(F_19007); | |
| framePtr = framePtr->prev; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment