Created
February 9, 2014 20:58
-
-
Save gradha/8905837 to your computer and use it in GitHub Desktop.
Generated code for nimrod objc hierarchy test. See https://github.com/Araq/Nimrod/issues/894 for context.
This file contains 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.9.3 */ | |
/* (c) 2014 Andreas Rumpf */ | |
/* The generated code is subject to the original license. */ | |
/* Compiled for: MacOSX, amd64, clang */ | |
/* Command for C compiler: | |
clang -c -w -I/Users/gradha/project/nimrod/root/lib -o /private/tmp/cycle/nimcache/cycle_h.o /private/tmp/cycle/nimcache/cycle_h.m */ | |
#define NIM_INTBITS 64 | |
#include "nimbase.h" | |
#include <stdio.h> | |
#include <Foundation/Foundation.h> | |
typedef struct TGenericSeq TGenericSeq; | |
typedef struct NimStringDesc NimStringDesc; | |
typedef struct TNimType TNimType; | |
typedef struct TNimNode TNimNode; | |
struct TGenericSeq { | |
NI len; | |
NI reserved; | |
}; | |
typedef NIM_CHAR TY613[100000001]; | |
struct NimStringDesc { | |
TGenericSeq Sup; | |
TY613 data; | |
}; | |
typedef N_NIMCALL_PTR(void, TY1089) (void* p, NI op); | |
struct TNimType { | |
NI size; | |
NU8 kind; | |
NU8 flags; | |
TNimType* base; | |
TNimNode* node; | |
void* finalizer; | |
TY1089 marker; | |
}; | |
struct TNimNode { | |
NU8 kind; | |
NI offset; | |
TNimType* typ; | |
NCSTRING name; | |
NI len; | |
TNimNode** sons; | |
}; | |
N_NIMCALL(void, checkisa_80015)(NSObject* x); | |
N_NIMCALL(NimStringDesc*, reprAny)(void* p_74203, TNimType* typ); | |
static N_INLINE(void, nimFrame)(TFrame* s); | |
static N_INLINE(void, popFrame)(void); | |
static N_INLINE(void, initStackBottom)(void); | |
N_NOINLINE(void, setStackBottom)(void* thestackbottom); | |
N_NOINLINE(void, systemInit)(void); | |
N_NOINLINE(void, systemDatInit)(void); | |
N_NOINLINE(void, hInit)(void); | |
N_NOINLINE(void, hDatInit)(void); | |
STRING_LITERAL(TMP124, "The isa value is ", 17); | |
TNimType NTI80007; /* TNSObject */ | |
TNimType NTI80009; /* PNSObject */ | |
extern TFrame* frameptr_12837; | |
NSString* a_80026; | |
static N_INLINE(void, nimFrame)(TFrame* s) { | |
(*s).prev = frameptr_12837; | |
frameptr_12837 = s; | |
} | |
static N_INLINE(void, popFrame)(void) { | |
frameptr_12837 = (*frameptr_12837).prev; | |
} | |
N_NIMCALL(void, checkisa_80015)(NSObject* x) { | |
nimfr("check_isa", "h.nim") | |
nimln(21, "h.nim"); | |
nimln(21, "h.nim"); | |
printf("%s%s\012", (((NimStringDesc*) &TMP124))->data, (reprAny(x, (&NTI80009)))->data); | |
popFrame(); | |
} | |
static N_INLINE(void, initStackBottom)(void) { | |
void* volatile locals; | |
locals = 0; | |
locals = ((void*) (&locals)); | |
setStackBottom(locals); | |
} | |
void PreMain() { | |
systemDatInit(); | |
systemInit(); | |
hDatInit(); | |
initStackBottom(); | |
} | |
int cmdCount; | |
char** cmdLine; | |
char** gEnv; | |
N_CDECL(void, NimMain)(void) { | |
PreMain(); | |
hInit(); | |
} | |
int main(int argc, char** args, char** env) { | |
cmdLine = args; | |
cmdCount = argc; | |
gEnv = env; | |
NimMain(); | |
return nim_program_result; | |
} | |
N_NOINLINE(void, hInit)(void) { | |
nimfr("h", "h.nim") | |
{ | |
} | |
nimln(25, "h.nim"); | |
checkisa_80015(&a_80026->Sup); | |
popFrame(); | |
} | |
N_NOINLINE(void, hDatInit)(void) { | |
static TNimNode TMP122[1]; | |
NTI80007.size = sizeof(NSObject); | |
NTI80007.kind = 17; | |
NTI80007.base = 0; | |
NTI80007.flags = 3; | |
TMP122[0].len = 0; TMP122[0].kind = 2; | |
NTI80007.node = &TMP122[0]; | |
NTI80009.size = sizeof(NSObject*); | |
NTI80009.kind = 21; | |
NTI80009.base = (&NTI80007); | |
NTI80009.flags = 3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment