Advertisement
Tiberium

Untitled

Mar 24th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.77 KB | None | 0 0
  1. /* Generated by Nim Compiler v0.16.1 */
  2. /*   (c) 2017 Andreas Rumpf */
  3. /* The generated code is subject to the original license. */
  4. /* Compiled for: Linux, amd64, gcc */
  5. /* Command for C compiler:
  6.    gcc -c  -w  -I/home/tiber/nim_experiments/Nim/lib -o /home/tiber/nim_experiments/nimcache/test.o /home/tiber/nim_experiments/nimcache/test.c */
  7. #define NIM_NEW_MANGLING_RULES
  8. #define NIM_INTBITS 64
  9.  
  10. #include "nimbase.h"
  11. #undef linux
  12. static N_INLINE(void, initStackBottomWith)(void* locals);
  13. N_NOINLINE(void, setStackBottom)(void* theStackBottom);
  14. static N_INLINE(void, nimFrame)(TFrame* s);
  15. N_NOINLINE(void, stackOverflow_II46IjNZztN9bmbxUD8dt8g)(void);
  16. static N_INLINE(void, popFrame)(void);
  17. NIM_EXTERNC N_NOINLINE(void, systemInit000)(void);
  18. NIM_EXTERNC N_NOINLINE(void, systemDatInit000)(void);
  19. NIM_EXTERNC N_NOINLINE(void, NimMainModule)(void);
  20. NIM_EXTERNC N_NOINLINE(void, testDatInit000)(void);
  21. extern TFrame* framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw;
  22.  
  23. static N_INLINE(void, initStackBottomWith)(void* locals) {
  24.         setStackBottom(locals);
  25. }
  26. void PreMainInner() {
  27.         systemInit000();
  28.         testDatInit000();
  29. }
  30.  
  31. void PreMain() {
  32.         void (*volatile inner)();
  33.         systemDatInit000();
  34.         inner = PreMainInner;
  35.         initStackBottomWith((void *)&inner);
  36.         (*inner)();
  37. }
  38.  
  39. int cmdCount;
  40. char** cmdLine;
  41. char** gEnv;
  42. N_CDECL(void, NimMainInner)(void) {
  43.         NimMainModule();
  44. }
  45.  
  46. N_CDECL(void, NimMain)(void) {
  47.         void (*volatile inner)();
  48.         PreMain();
  49.         inner = NimMainInner;
  50.         initStackBottomWith((void *)&inner);
  51.         (*inner)();
  52. }
  53.  
  54. int main(int argc, char** args, char** env) {
  55.         cmdLine = args;
  56.         cmdCount = argc;
  57.         gEnv = env;
  58.         NimMain();
  59.         return nim_program_result;
  60. }
  61.  
  62.  
  63. static N_INLINE(void, nimFrame)(TFrame* s) {
  64.         NI T1_;
  65.         T1_ = (NI)0;
  66.         {
  67.                 if (!(framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA4_;
  68.                 T1_ = ((NI) 0);
  69.         }
  70.         goto LA2_;
  71.         LA4_: ;
  72.         {
  73.                 T1_ = ((NI) ((NI16)((*framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1))));
  74.         }
  75.         LA2_: ;
  76.         (*s).calldepth = ((NI16) (T1_));
  77.         (*s).prev = framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw;
  78.         framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw = s;
  79.         {
  80.                 if (!((*s).calldepth == ((NI16) 2000))) goto LA9_;
  81.                 stackOverflow_II46IjNZztN9bmbxUD8dt8g();
  82.         }
  83.         LA9_: ;
  84. }
  85.  
  86. static N_INLINE(void, popFrame)(void) {
  87.         framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
  88. }
  89. NIM_EXTERNC N_NOINLINE(void, NimMainModule)(void) {
  90.         nimfr_("test", "test.nim")
  91.         popFrame();
  92. }
  93.  
  94. NIM_EXTERNC N_NOINLINE(void, testDatInit000)(void) {
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement