compiler/bootstrap: synced
[sdk] / compiler / bootstrap / libec / bootstrap / pass3.c
index ea91f8d..d7c948b 100644 (file)
@@ -1,4 +1,11 @@
 /* Code generated from eC source file: pass3.ec */
+#if defined(_WIN32)
+#define __runtimePlatform 1
+#elif defined(__APPLE__)
+#define __runtimePlatform 3
+#else
+#define __runtimePlatform 2
+#endif
 #if defined(__GNUC__)
 typedef long long int64;
 typedef unsigned long long uint64;
@@ -28,9 +35,65 @@ typedef unsigned __int64 uint64;
 #else
 #define __ENDIAN_PAD(x) 0
 #endif
+#if defined(_WIN32)
+#   if defined(__GNUC__) || defined(__TINYC__)
+#      define ecere_stdcall __attribute__((__stdcall__))
+#      define ecere_gcc_struct __attribute__((gcc_struct))
+#   else
+#      define ecere_stdcall __stdcall
+#      define ecere_gcc_struct
+#   endif
+#else
+#   define ecere_stdcall
+#   define ecere_gcc_struct
+#endif
 #include <stdint.h>
 #include <sys/types.h>
-struct __ecereNameSpace__ecere__com__Instance;
+enum yytokentype
+{
+IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, INT128 = 294, LONG = 295, SIGNED = 296, UNSIGNED = 297, FLOAT = 298, DOUBLE = 299, CONST = 300, VOLATILE = 301, VOID = 302, VALIST = 303, STRUCT = 304, UNION = 305, ENUM = 306, ELLIPSIS = 307, CASE = 308, DEFAULT = 309, IF = 310, SWITCH = 311, WHILE = 312, DO = 313, FOR = 314, GOTO = 315, CONTINUE = 316, BREAK = 317, RETURN = 318, IFX = 319, ELSE = 320, CLASS = 321, THISCLASS = 322, CLASS_NAME = 323, PROPERTY = 324, SETPROP = 325, GETPROP = 326, NEWOP = 327, RENEW = 328, DELETE = 329, EXT_DECL = 330, EXT_STORAGE = 331, IMPORT = 332, DEFINE = 333, VIRTUAL = 334, ATTRIB = 335, PUBLIC = 336, PRIVATE = 337, TYPED_OBJECT = 338, ANY_OBJECT = 339, _INCREF = 340, EXTENSION = 341, ASM = 342, TYPEOF = 343, WATCH = 344, STOPWATCHING = 345, FIREWATCHERS = 346, WATCHABLE = 347, CLASS_DESIGNER = 348, CLASS_NO_EXPANSION = 349, CLASS_FIXED = 350, ISPROPSET = 351, CLASS_DEFAULT_PROPERTY = 352, PROPERTY_CATEGORY = 353, CLASS_DATA = 354, CLASS_PROPERTY = 355, SUBCLASS = 356, NAMESPACE = 357, NEW0OP = 358, RENEW0 = 359, VAARG = 360, DBTABLE = 361, DBFIELD = 362, DBINDEX = 363, DATABASE_OPEN = 364, ALIGNOF = 365, ATTRIB_DEP = 366, __ATTRIB = 367, BOOL = 368, _BOOL = 369, _COMPLEX = 370, _IMAGINARY = 371, RESTRICT = 372, THREAD = 373, WIDE_STRING_LITERAL = 374, BUILTIN_OFFSETOF = 375
+};
+
+extern int targetPlatform;
+
+extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
+
+struct __ecereNameSpace__ecere__sys__OldList
+{
+void *  first;
+void *  last;
+int count;
+unsigned int offset;
+unsigned int circ;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__sys__BTNode;
+
+struct __ecereNameSpace__ecere__com__DataValue
+{
+union
+{
+char c;
+unsigned char uc;
+short s;
+unsigned short us;
+int i;
+unsigned int ui;
+void *  p;
+float f;
+double d;
+long long i64;
+uint64 ui64;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__SerialBuffer
+{
+unsigned char *  _buffer;
+unsigned int count;
+unsigned int _size;
+unsigned int pos;
+} ecere_gcc_struct;
 
 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
 
@@ -42,79 +105,33 @@ extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsi
 
 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void *  memory);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
+struct Context;
 
-struct __ecereNameSpace__ecere__sys__BTNode;
+struct Attrib;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
+struct Attribute;
 
-struct __ecereNameSpace__ecere__sys__BinaryTree
-{
-struct __ecereNameSpace__ecere__sys__BTNode * root;
-int count;
-int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
-void (*  FreeKey)(void *  key);
-} __attribute__ ((gcc_struct));
+struct Instantiation;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
+struct MembersInit;
 
-struct __ecereNameSpace__ecere__sys__OldList
-{
-void *  first;
-void *  last;
-int count;
-unsigned int offset;
-unsigned int circ;
-} __attribute__ ((gcc_struct));
+struct MemberInit;
+
+struct ClassFunction;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
+struct ClassDefinition;
 
-struct __ecereNameSpace__ecere__com__Method
-{
-const char *  name;
-struct __ecereNameSpace__ecere__com__Method * parent;
-struct __ecereNameSpace__ecere__com__Method * left;
-struct __ecereNameSpace__ecere__com__Method * right;
-int depth;
-int (*  function)();
-int vid;
-int type;
-struct __ecereNameSpace__ecere__com__Class * _class;
-void *  symbol;
-const char *  dataTypeString;
-struct Type * dataType;
-int memberAccess;
-} __attribute__ ((gcc_struct));
+struct PropertyDef;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
+struct PropertyWatch;
 
-struct __ecereNameSpace__ecere__com__Property
-{
-struct __ecereNameSpace__ecere__com__Property * prev;
-struct __ecereNameSpace__ecere__com__Property * next;
-const char *  name;
-unsigned int isProperty;
-int memberAccess;
-int id;
-struct __ecereNameSpace__ecere__com__Class * _class;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-struct Type * dataType;
-void (*  Set)(void * , int);
-int (*  Get)(void * );
-unsigned int (*  IsSet)(void * );
-void *  data;
-void *  symbol;
-int vid;
-unsigned int conversion;
-unsigned int watcherOffset;
-const char *  category;
-unsigned int compiled;
-unsigned int selfWatchable;
-unsigned int isWatchable;
-} __attribute__ ((gcc_struct));
+struct TemplateArgument;
+
+struct DBTableEntry;
+
+struct DBIndexItem;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
+struct DBTableDef;
 
 struct CodePosition
 {
@@ -122,21 +139,68 @@ int line;
 int charPos;
 int pos;
 int included;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
+
+extern char *  __ecereNameSpace__ecere__sys__CopyString(const char *  string);
+
+struct ModuleImport;
+
+struct ClassImport;
+
+extern void FullClassNameCat(char *  output, const char *  className, unsigned int includeTemplateParams);
+
+extern int strcmp(const char * , const char * );
+
+extern char *  strchr(const char * , int);
+
+extern char *  strcpy(char * , const char * );
+
+extern size_t strlen(const char * );
+
+struct __ecereNameSpace__ecere__com__LinkList
+{
+void * first;
+void * last;
+int count;
+} ecere_gcc_struct;
+
+struct __ecereNameSpace__ecere__com__LinkElement
+{
+void * prev;
+void * next;
+} ecere_gcc_struct;
+
+extern void Compiler_Error(const char *  format, ...);
+
+struct __ecereNameSpace__ecere__com__GlobalFunction;
+
+struct __ecereNameSpace__ecere__com__IteratorPointer;
+
+extern struct __ecereNameSpace__ecere__sys__OldList *  MkList(void);
+
+extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (*  FreeFunction)(void * ));
+
+extern struct __ecereNameSpace__ecere__sys__OldList *  MkListOne(void *  item);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
+extern struct __ecereNameSpace__ecere__sys__OldList *  ast;
+
+void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
+
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void *  prevItem, void *  item);
+
+void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
+
+extern struct Context * curContext;
+
+extern struct Context * globalContext;
 
 struct Location
 {
 struct CodePosition start;
 struct CodePosition end;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
-
-struct Attrib;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
+extern struct Location yylloc;
 
 struct ExtDecl
 {
@@ -146,134 +210,178 @@ union
 {
 char * s;
 struct Attrib * attr;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
+extern struct ExtDecl * MkExtDeclString(char * s);
 
-struct ClassDefinition;
+struct External;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
+extern struct External * curExternal;
 
-struct Context;
+extern struct External * DeclareStruct(struct External * neededBy, const char *  name, unsigned int skipNoHead, unsigned int needDereference);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
+extern void FreeExternal(struct External * external);
 
-struct Instantiation;
+struct TopoEdge
+{
+struct __ecereNameSpace__ecere__com__LinkElement in;
+struct __ecereNameSpace__ecere__com__LinkElement out;
+struct External * from;
+struct External * to;
+unsigned int breakable;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
+struct __ecereNameSpace__ecere__com__Class;
 
-struct Declaration
-{
-struct Declaration * prev;
-struct Declaration * next;
-struct Location loc;
-int type;
-union
+struct __ecereNameSpace__ecere__com__Instance
 {
-struct
+void * *  _vTbl;
+struct __ecereNameSpace__ecere__com__Class * _class;
+int _refCount;
+} ecere_gcc_struct;
+
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
+
+extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
+
+extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
+
+extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
+
+extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove;
+
+int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add;
+
+struct __ecereNameSpace__ecere__com__Property;
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
+
+extern void __ecereNameSpace__ecere__com__eInstance_Watch(void *  instance, struct __ecereNameSpace__ecere__com__Property * _property, void *  object, void (*  callback)(void * , void * ));
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+struct Specifier;
+
+extern struct Specifier * CopySpecifier(struct Specifier * spec);
+
+extern void FreeSpecifier(struct Specifier * spec);
+
+extern void FreeSpecifierContents(struct Specifier * spec);
+
+extern struct Specifier * MkSpecifier(int specifier);
+
+extern struct Specifier * MkSpecifierName(const char *  name);
+
+struct Declarator;
+
+extern struct Declarator * SpecDeclFromString(const char *  string, struct __ecereNameSpace__ecere__sys__OldList *  specs, struct Declarator * baseDecl);
+
+extern void FreeDeclarator(struct Declarator * decl);
+
+struct TemplateDatatype
 {
 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
-struct __ecereNameSpace__ecere__sys__OldList *  declarators;
-} __attribute__ ((gcc_struct)) __anon1;
-struct Instantiation * inst;
-struct
-{
-struct Identifier * id;
-struct Expression * exp;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
-struct Specifier * extStorage;
-struct Symbol * symbol;
-int declMode;
-} __attribute__ ((gcc_struct));
+struct Declarator * decl;
+} ecere_gcc_struct;
+
+extern struct Declarator * QMkPtrDecl(const char *  id);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
+struct Symbol;
 
-struct Statement
+extern struct Symbol * FindClass(const char *  name);
+
+struct Identifier;
+
+extern struct Identifier * MkIdentifier(const char *  string);
+
+extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
+
+extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
+
+struct Identifier
 {
-struct Statement * prev;
-struct Statement * next;
+struct Identifier * prev;
+struct Identifier * next;
 struct Location loc;
-int type;
-union
-{
-struct __ecereNameSpace__ecere__sys__OldList *  expressions;
-struct
+struct Symbol * classSym;
+struct Specifier * _class;
+char *  string;
+struct Identifier * badID;
+} ecere_gcc_struct;
+
+static void InstDeclPassIdentifier(struct Identifier * id)
 {
-struct Identifier * id;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) labeled;
-struct
+if(strchr(id->string, ':'))
 {
-struct Expression * exp;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) caseStmt;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * declarations;
-struct __ecereNameSpace__ecere__sys__OldList * statements;
-struct Context * context;
-unsigned int isSwitch;
-} __attribute__ ((gcc_struct)) compound;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct Statement * stmt;
-struct Statement * elseStmt;
-} __attribute__ ((gcc_struct)) ifStmt;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) switchStmt;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) whileStmt;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) doWhile;
-struct
-{
-struct Statement * init;
-struct Statement * check;
-struct __ecereNameSpace__ecere__sys__OldList * increment;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) forStmt;
-struct
-{
-struct Identifier * id;
-} __attribute__ ((gcc_struct)) gotoStmt;
-struct
-{
-struct Specifier * spec;
-char * statements;
-struct __ecereNameSpace__ecere__sys__OldList * inputFields;
-struct __ecereNameSpace__ecere__sys__OldList * outputFields;
-struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
-} __attribute__ ((gcc_struct)) asmStmt;
-struct
+char newID[1024];
+int c;
+char ch;
+int len;
+
+strcpy(newID, "__ecereNameSpace__");
+len = strlen(newID);
+for(c = 0; (ch = id->string[c]); c++)
 {
-struct Expression * watcher;
-struct Expression * object;
-struct __ecereNameSpace__ecere__sys__OldList * watches;
-} __attribute__ ((gcc_struct)) _watch;
-struct
+if(ch == ':')
+ch = '_';
+newID[len++] = ch;
+}
+newID[len] = 0;
+(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
+id->string = __ecereNameSpace__ecere__sys__CopyString(newID);
+}
+}
+
+struct Type;
+
+struct __ecereNameSpace__ecere__com__Property
 {
-struct Identifier * id;
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct __ecereNameSpace__ecere__sys__OldList * filter;
-struct Statement * stmt;
-} __attribute__ ((gcc_struct)) forEachStmt;
-struct Declaration * decl;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__com__Property * prev;
+struct __ecereNameSpace__ecere__com__Property * next;
+const char *  name;
+unsigned int isProperty;
+int memberAccess;
+int id;
+struct __ecereNameSpace__ecere__com__Class * _class;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+struct Type * dataType;
+void (*  Set)(void * , int);
+int (*  Get)(void * );
+unsigned int (*  IsSet)(void * );
+void *  data;
+void *  symbol;
+int vid;
+unsigned int conversion;
+unsigned int watcherOffset;
+const char *  category;
+unsigned int compiled;
+unsigned int selfWatchable;
+unsigned int isWatchable;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
+extern struct Type * ProcessTypeString(const char *  string, unsigned int staticMethod);
+
+extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
+
+extern void FreeType(struct Type * type);
+
+struct Expression;
+
+extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
+
+extern struct Expression * MoveExpContents(struct Expression * exp);
+
+extern struct Expression * GetNonBracketsExp(struct Expression * exp);
+
+extern void FreeExpContents(struct Expression * exp);
+
+struct TypeName;
 
 struct TypeName
 {
@@ -284,338 +392,151 @@ struct __ecereNameSpace__ecere__sys__OldList *  qualifiers;
 struct Declarator * declarator;
 int classObjectType;
 struct Expression * bitCount;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
-
-struct Initializer
-{
-struct Initializer * prev;
-struct Initializer * next;
-struct Location loc;
-int type;
-union
-{
-struct Expression * exp;
-struct __ecereNameSpace__ecere__sys__OldList *  list;
-} __attribute__ ((gcc_struct)) __anon1;
-unsigned int isConstant;
-struct Identifier * id;
-} __attribute__ ((gcc_struct));
+extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
+extern void FreeTypeName(struct TypeName * typeName);
 
-struct __ecereNameSpace__ecere__com__DataValue
-{
-union
-{
-char c;
-unsigned char uc;
-short s;
-unsigned short us;
-int i;
-unsigned int ui;
-void *  p;
-float f;
-double d;
-long long i64;
-uint64 ui64;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
+extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
+struct Pointer;
 
-struct Expression
+struct Declarator
 {
-struct Expression * prev;
-struct Expression * next;
+struct Declarator * prev;
+struct Declarator * next;
 struct Location loc;
 int type;
+struct Symbol * symbol;
+struct Declarator * declarator;
 union
 {
-struct
-{
-char *  constant;
 struct Identifier * identifier;
-} __attribute__ ((gcc_struct)) __anon1;
-struct Statement * compound;
-struct Instantiation * instance;
-struct
-{
-char *  string;
-unsigned int intlString;
-} __attribute__ ((gcc_struct)) __anon2;
-struct __ecereNameSpace__ecere__sys__OldList *  list;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * specifiers;
-struct Declarator * decl;
-} __attribute__ ((gcc_struct)) _classExp;
-struct
-{
-struct Identifier * id;
-} __attribute__ ((gcc_struct)) classData;
 struct
 {
 struct Expression * exp;
-struct __ecereNameSpace__ecere__sys__OldList * arguments;
-struct Location argLoc;
-} __attribute__ ((gcc_struct)) call;
-struct
-{
-struct Expression * exp;
-struct __ecereNameSpace__ecere__sys__OldList * index;
-} __attribute__ ((gcc_struct)) index;
-struct
-{
-struct Expression * exp;
-struct Identifier * member;
-int memberType;
-unsigned int thisPtr;
-} __attribute__ ((gcc_struct)) member;
-struct
-{
-int op;
-struct Expression * exp1;
-struct Expression * exp2;
-} __attribute__ ((gcc_struct)) op;
-struct TypeName * typeName;
-struct Specifier * _class;
-struct
-{
-struct TypeName * typeName;
-struct Expression * exp;
-} __attribute__ ((gcc_struct)) cast;
-struct
-{
-struct Expression * cond;
-struct __ecereNameSpace__ecere__sys__OldList * exp;
-struct Expression * elseExp;
-} __attribute__ ((gcc_struct)) cond;
-struct
-{
-struct TypeName * typeName;
-struct Expression * size;
-} __attribute__ ((gcc_struct)) _new;
+struct Expression * posExp;
+struct Attrib * attrib;
+} ecere_gcc_struct structDecl;
 struct
 {
-struct TypeName * typeName;
-struct Expression * size;
 struct Expression * exp;
-} __attribute__ ((gcc_struct)) _renew;
+struct Specifier * enumClass;
+} ecere_gcc_struct array;
 struct
 {
-char * table;
-struct Identifier * id;
-} __attribute__ ((gcc_struct)) db;
+struct __ecereNameSpace__ecere__sys__OldList * parameters;
+} ecere_gcc_struct function;
 struct
 {
-struct Expression * ds;
-struct Expression * name;
-} __attribute__ ((gcc_struct)) dbopen;
+struct Pointer * pointer;
+} ecere_gcc_struct pointer;
 struct
 {
-struct TypeName * typeName;
-struct Initializer * initializer;
-} __attribute__ ((gcc_struct)) initializer;
-struct
+struct ExtDecl * extended;
+} ecere_gcc_struct extended;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
+
+extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
+
+extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
+
+struct Pointer
 {
-struct Expression * exp;
-struct TypeName * typeName;
-} __attribute__ ((gcc_struct)) vaArg;
-} __attribute__ ((gcc_struct)) __anon1;
-unsigned int debugValue;
-struct __ecereNameSpace__ecere__com__DataValue val;
-uint64 address;
-unsigned int hasAddress;
-struct Type * expType;
-struct Type * destType;
-unsigned int usage;
-int tempCount;
-unsigned int byReference;
-unsigned int isConstant;
-unsigned int addedThis;
-unsigned int needCast;
-unsigned int thisPtr;
-unsigned int opDestType;
-unsigned int needTemplateCast;
-} __attribute__ ((gcc_struct));
+struct Pointer * prev;
+struct Pointer * next;
+struct Location loc;
+struct __ecereNameSpace__ecere__sys__OldList *  qualifiers;
+struct Pointer * pointer;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
+struct __ecereNameSpace__ecere__sys__BinaryTree;
 
-struct TemplateDatatype
+struct __ecereNameSpace__ecere__sys__BinaryTree
 {
-struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
-struct Declarator * decl;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__sys__BTNode * root;
+int count;
+int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
+void (*  FreeKey)(void *  key);
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
+struct __ecereNameSpace__ecere__com__Module;
 
-struct TemplateArgument;
+extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char *  name, const char *  type, void *  func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
+struct __ecereNameSpace__ecere__com__DataMember;
 
-struct TemplateParameter
-{
-struct TemplateParameter * prev;
-struct TemplateParameter * next;
-struct Location loc;
-int type;
-struct Identifier * identifier;
-union
+struct __ecereNameSpace__ecere__com__DataMember
 {
-struct TemplateDatatype * dataType;
-int memberType;
-} __attribute__ ((gcc_struct)) __anon1;
-struct TemplateArgument * defaultArgument;
-const char *  dataTypeString;
-struct Type * baseType;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
-
-struct Specifier
-{
-struct Specifier * prev;
-struct Specifier * next;
-struct Location loc;
+struct __ecereNameSpace__ecere__com__DataMember * prev;
+struct __ecereNameSpace__ecere__com__DataMember * next;
+const char *  name;
+unsigned int isProperty;
+int memberAccess;
+int id;
+struct __ecereNameSpace__ecere__com__Class * _class;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+struct Type * dataType;
 int type;
-union
-{
-int specifier;
-struct
-{
-struct ExtDecl * extDecl;
-char *  name;
-struct Symbol * symbol;
-struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
-} __attribute__ ((gcc_struct)) __anon1;
-struct
-{
-struct Identifier * id;
-struct __ecereNameSpace__ecere__sys__OldList *  list;
-struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
-struct __ecereNameSpace__ecere__sys__OldList *  definitions;
-unsigned int addNameSpace;
-struct Context * ctx;
-struct ExtDecl * extDeclStruct;
-} __attribute__ ((gcc_struct)) __anon2;
-struct Expression * expression;
-struct Specifier * _class;
-struct TemplateParameter * templateParameter;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
+int offset;
+int memberID;
+struct __ecereNameSpace__ecere__sys__OldList members;
+struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
+int memberOffset;
+short structAlignment;
+short pointerAlignment;
+} ecere_gcc_struct;
 
-struct Identifier
-{
-struct Identifier * prev;
-struct Identifier * next;
-struct Location loc;
-struct Symbol * classSym;
-struct Specifier * _class;
-char *  string;
-struct Identifier * badID;
-} __attribute__ ((gcc_struct));
+struct InitDeclarator;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
+struct ClassDef;
 
-struct Pointer;
+struct FunctionDefinition;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
+struct __ecereNameSpace__ecere__com__Method;
 
-struct Declarator
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument
 {
-struct Declarator * prev;
-struct Declarator * next;
-struct Location loc;
-int type;
-struct Symbol * symbol;
-struct Declarator * declarator;
 union
 {
-struct Identifier * identifier;
-struct
-{
-struct Expression * exp;
-struct Expression * posExp;
-struct Attrib * attrib;
-} __attribute__ ((gcc_struct)) structDecl;
-struct
-{
-struct Expression * exp;
-struct Specifier * enumClass;
-} __attribute__ ((gcc_struct)) array;
-struct
-{
-struct __ecereNameSpace__ecere__sys__OldList * parameters;
-} __attribute__ ((gcc_struct)) function;
 struct
 {
-struct Pointer * pointer;
-} __attribute__ ((gcc_struct)) pointer;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+} ecere_gcc_struct __anon1;
+struct __ecereNameSpace__ecere__com__DataValue expression;
 struct
 {
-struct ExtDecl * extended;
-} __attribute__ ((gcc_struct)) extended;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
-
-struct FunctionDefinition
+const char *  memberString;
+union
 {
-struct FunctionDefinition * prev;
-struct FunctionDefinition * next;
-struct Location loc;
-struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
-struct Declarator * declarator;
-struct __ecereNameSpace__ecere__sys__OldList *  declarations;
-struct Statement * body;
-struct __ecereNameSpace__ecere__com__Class * _class;
-struct __ecereNameSpace__ecere__sys__OldList attached;
-int declMode;
-struct Type * type;
-struct Symbol * propSet;
-int tempCount;
-unsigned int propertyNoThis;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
-
-struct DBTableDef;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
+struct __ecereNameSpace__ecere__com__DataMember * member;
+struct __ecereNameSpace__ecere__com__Property * prop;
+struct __ecereNameSpace__ecere__com__Method * method;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct __anon2;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
-struct External
+struct __ecereNameSpace__ecere__com__Method
 {
-struct External * prev;
-struct External * next;
-struct Location loc;
+const char *  name;
+struct __ecereNameSpace__ecere__com__Method * parent;
+struct __ecereNameSpace__ecere__com__Method * left;
+struct __ecereNameSpace__ecere__com__Method * right;
+int depth;
+int (*  function)();
+int vid;
 int type;
-struct Symbol * symbol;
-union
-{
-struct FunctionDefinition * function;
-struct ClassDefinition * _class;
-struct Declaration * declaration;
-char *  importString;
-struct Identifier * id;
-struct DBTableDef * table;
-} __attribute__ ((gcc_struct)) __anon1;
-int importType;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
-
-struct ModuleImport;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
-
-struct ClassImport;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
+struct __ecereNameSpace__ecere__com__Class * _class;
+void *  symbol;
+const char *  dataTypeString;
+struct Type * dataType;
+int memberAccess;
+} ecere_gcc_struct;
 
 struct Symbol
 {
@@ -630,29 +551,28 @@ union
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Property * _property;
 struct __ecereNameSpace__ecere__com__Class * registered;
-} __attribute__ ((gcc_struct)) __anon1;
-int id;
-int idCode;
+} ecere_gcc_struct __anon1;
+unsigned int notYetDeclared;
 union
 {
 struct
 {
 struct External * pointerExternal;
 struct External * structExternal;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct
 {
 struct External * externalGet;
 struct External * externalSet;
 struct External * externalPtr;
 struct External * externalIsSet;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct
 {
 struct External * methodExternal;
 struct External * methodCodeExternal;
-} __attribute__ ((gcc_struct)) __anon3;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon3;
+} ecere_gcc_struct __anon2;
 unsigned int imported;
 unsigned int declaredStructSym;
 struct __ecereNameSpace__ecere__com__Class * _class;
@@ -679,9 +599,60 @@ struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
 struct Context * ctx;
 int isIterator;
 struct Expression * propCategory;
-} __attribute__ ((gcc_struct));
+unsigned int mustRegister;
+} ecere_gcc_struct;
+
+struct TemplateParameter;
+
+struct Specifier
+{
+struct Specifier * prev;
+struct Specifier * next;
+struct Location loc;
+int type;
+union
+{
+int specifier;
+struct
+{
+struct ExtDecl * extDecl;
+char *  name;
+struct Symbol * symbol;
+struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
+struct Specifier * nsSpec;
+} ecere_gcc_struct __anon1;
+struct
+{
+struct Identifier * id;
+struct __ecereNameSpace__ecere__sys__OldList *  list;
+struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
+struct __ecereNameSpace__ecere__sys__OldList *  definitions;
+unsigned int addNameSpace;
+struct Context * ctx;
+struct ExtDecl * extDeclStruct;
+} ecere_gcc_struct __anon2;
+struct Expression * expression;
+struct Specifier * _class;
+struct TemplateParameter * templateParameter;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
+struct TemplateParameter
+{
+struct TemplateParameter * prev;
+struct TemplateParameter * next;
+struct Location loc;
+int type;
+struct Identifier * identifier;
+union
+{
+struct TemplateDatatype * dataType;
+int memberType;
+} ecere_gcc_struct __anon1;
+struct TemplateArgument * defaultArgument;
+const char *  dataTypeString;
+struct Type * baseType;
+} ecere_gcc_struct;
 
 struct Type
 {
@@ -695,7 +666,7 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList members;
 char *  enumName;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 struct
 {
 struct Type * returnType;
@@ -703,13 +674,13 @@ struct __ecereNameSpace__ecere__sys__OldList params;
 struct Symbol * thisClass;
 unsigned int staticMethod;
 struct TemplateParameter * thisClassTemplate;
-} __attribute__ ((gcc_struct)) __anon2;
+} ecere_gcc_struct __anon2;
 struct
 {
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Class * methodClass;
 struct __ecereNameSpace__ecere__com__Class * usedClass;
-} __attribute__ ((gcc_struct)) __anon3;
+} ecere_gcc_struct __anon3;
 struct
 {
 struct Type * arrayType;
@@ -717,19 +688,22 @@ int arraySize;
 struct Expression * arraySizeExp;
 unsigned int freeExp;
 struct Symbol * enumClass;
-} __attribute__ ((gcc_struct)) __anon4;
+} ecere_gcc_struct __anon4;
 struct Type * type;
 struct TemplateParameter * templateParameter;
-} __attribute__ ((gcc_struct)) __anon1;
+} ecere_gcc_struct __anon1;
 int kind;
 unsigned int size;
 char *  name;
 char *  typeName;
+struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
 int classObjectType;
 int alignment;
 unsigned int offset;
 int bitFieldCount;
 int count;
+int bitMemberSize;
 unsigned int isSigned : 1;
 unsigned int constant : 1;
 unsigned int truth : 1;
@@ -744,221 +718,150 @@ unsigned int attrStdcall : 1;
 unsigned int declaredWithStruct : 1;
 unsigned int typedByReference : 1;
 unsigned int casted : 1;
-} __attribute__ ((gcc_struct));
+unsigned int pointerAlignment : 1;
+unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
+unsigned int isVector : 1;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
-
-struct __ecereNameSpace__ecere__com__Class
+unsigned int IsVoidPtrCast(struct TypeName * typeName)
 {
-struct __ecereNameSpace__ecere__com__Class * prev;
-struct __ecereNameSpace__ecere__com__Class * next;
-const char *  name;
-int offset;
-int structSize;
-int (* *  _vTbl)();
-int vTblSize;
-int (*  Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
-void (*  Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
-int offsetClass;
-int sizeClass;
-struct __ecereNameSpace__ecere__com__Class * base;
-struct __ecereNameSpace__ecere__sys__BinaryTree methods;
-struct __ecereNameSpace__ecere__sys__BinaryTree members;
-struct __ecereNameSpace__ecere__sys__BinaryTree prop;
-struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
-struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
-struct __ecereNameSpace__ecere__sys__OldList derivatives;
-int memberID;
-int startMemberID;
-int type;
-struct __ecereNameSpace__ecere__com__Instance * module;
-struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
-const char *  dataTypeString;
-struct Type * dataType;
-int typeSize;
-int defaultAlignment;
-void (*  Initialize)();
-int memberOffset;
-struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
-const char *  designerClass;
-unsigned int noExpansion;
-const char *  defaultProperty;
-unsigned int comRedefinition;
-int count;
-int isRemote;
-unsigned int internalDecl;
-void *  data;
-unsigned int computeSize;
-int structAlignment;
-int destructionWatchOffset;
-unsigned int fixed;
-struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
-int inheritanceAccess;
-const char *  fullName;
-void *  symbol;
-struct __ecereNameSpace__ecere__sys__OldList conversions;
-struct __ecereNameSpace__ecere__sys__OldList templateParams;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
-struct __ecereNameSpace__ecere__com__Class * templateClass;
-struct __ecereNameSpace__ecere__sys__OldList templatized;
-int numParams;
-unsigned int isInstanceClass;
-unsigned int byValueSystemClass;
-} __attribute__ ((gcc_struct));
+unsigned int result = 0;
+struct Declarator * d = typeName->declarator;
 
-extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
+if(d && d->type == 5 && d->__anon1.pointer.pointer && !d->__anon1.pointer.pointer->pointer)
+{
+if(typeName->qualifiers)
+{
+struct Specifier * s;
 
-extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
+for(s = (*typeName->qualifiers).first; s; s = s->next)
+{
+if(s->type == 0 && s->__anon1.specifier == VOID)
+result = 1;
+}
+}
+}
+return result;
+}
 
-extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
 
-extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
+struct Enumerator;
 
-extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
-
-extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
-
-extern void __ecereNameSpace__ecere__com__eInstance_Watch(void *  instance, struct __ecereNameSpace__ecere__com__Property * _property, void *  object, void (*  callback)(void * , void * ));
-
-extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
-
-struct __ecereNameSpace__ecere__com__Instance
+struct Enumerator
 {
-int (* *  _vTbl)();
-struct __ecereNameSpace__ecere__com__Class * _class;
-int _refCount;
-} __attribute__ ((gcc_struct));
+struct Enumerator * prev;
+struct Enumerator * next;
+struct Location loc;
+struct Identifier * id;
+struct Expression * exp;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
+struct Initializer;
 
-struct __ecereNameSpace__ecere__com__DataMember
+struct Initializer
 {
-struct __ecereNameSpace__ecere__com__DataMember * prev;
-struct __ecereNameSpace__ecere__com__DataMember * next;
-const char *  name;
-unsigned int isProperty;
-int memberAccess;
-int id;
-struct __ecereNameSpace__ecere__com__Class * _class;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-struct Type * dataType;
+struct Initializer * prev;
+struct Initializer * next;
+struct Location loc;
 int type;
-int offset;
-int memberID;
-struct __ecereNameSpace__ecere__sys__OldList members;
-struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
-int memberOffset;
-int structAlignment;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
+union
+{
+struct Expression * exp;
+struct __ecereNameSpace__ecere__sys__OldList *  list;
+} ecere_gcc_struct __anon1;
+unsigned int isConstant;
+struct Identifier * id;
+} ecere_gcc_struct;
 
-struct __ecereNameSpace__ecere__com__SerialBuffer
+struct InitDeclarator
 {
-unsigned char *  _buffer;
-unsigned int count;
-unsigned int _size;
-unsigned int pos;
-} __attribute__ ((gcc_struct));
+struct InitDeclarator * prev;
+struct InitDeclarator * next;
+struct Location loc;
+struct Declarator * declarator;
+struct Initializer * initializer;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
+struct Declaration;
 
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument
+struct ClassDef
 {
+struct ClassDef * prev;
+struct ClassDef * next;
+struct Location loc;
+int type;
 union
 {
+struct Declaration * decl;
+struct ClassFunction * function;
+struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
+struct PropertyDef * propertyDef;
+struct PropertyWatch * propertyWatch;
+char *  designer;
+struct Identifier * defaultProperty;
 struct
 {
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-} __attribute__ ((gcc_struct)) __anon1;
-struct __ecereNameSpace__ecere__com__DataValue expression;
-struct
+struct Identifier * id;
+struct Initializer * initializer;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct __anon1;
+int memberAccess;
+void *  object;
+} ecere_gcc_struct;
+
+struct Declaration
 {
-const char *  memberString;
+struct Declaration * prev;
+struct Declaration * next;
+struct Location loc;
+int type;
 union
 {
-struct __ecereNameSpace__ecere__com__DataMember * member;
-struct __ecereNameSpace__ecere__com__Property * prop;
-struct __ecereNameSpace__ecere__com__Method * method;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
-
-enum yytokentype
+struct
 {
-IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372
-};
-
-typedef union YYSTYPE
+struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
+struct __ecereNameSpace__ecere__sys__OldList *  declarators;
+} ecere_gcc_struct __anon1;
+struct Instantiation * inst;
+struct
 {
-int specifierType;
-int i;
-int declMode;
 struct Identifier * id;
 struct Expression * exp;
-struct Specifier * specifier;
-struct __ecereNameSpace__ecere__sys__OldList * list;
-struct Enumerator * enumerator;
-struct Declarator * declarator;
-struct Pointer * pointer;
-struct Initializer * initializer;
-struct InitDeclarator * initDeclarator;
-struct TypeName * typeName;
-struct Declaration * declaration;
-struct Statement * stmt;
-struct FunctionDefinition * function;
-struct External * external;
-struct Context * context;
-struct AsmField * asmField;
-struct Attrib * attrib;
-struct ExtDecl * extDecl;
-struct Attribute * attribute;
-struct Instantiation * instance;
-struct MembersInit * membersInit;
-struct MemberInit * memberInit;
-struct ClassFunction * classFunction;
-struct ClassDefinition * _class;
-struct ClassDef * classDef;
-struct PropertyDef * prop;
-char * string;
+} ecere_gcc_struct __anon2;
+} ecere_gcc_struct __anon1;
+struct Specifier * extStorage;
 struct Symbol * symbol;
-struct PropertyWatch * propertyWatch;
-struct TemplateParameter * templateParameter;
-struct TemplateArgument * templateArgument;
-struct TemplateDatatype * templateDatatype;
-struct DBTableEntry * dbtableEntry;
-struct DBIndexItem * dbindexItem;
-struct DBTableDef * dbtableDef;
-} __attribute__ ((gcc_struct)) YYSTYPE;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
+int declMode;
+} ecere_gcc_struct;
 
-struct Enumerator
+struct External
 {
-struct Enumerator * prev;
-struct Enumerator * next;
+struct External * prev;
+struct External * next;
 struct Location loc;
+int type;
+struct Symbol * symbol;
+union
+{
+struct FunctionDefinition * function;
+struct ClassDefinition * _class;
+struct Declaration * declaration;
+char *  importString;
 struct Identifier * id;
-struct Expression * exp;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
+struct DBTableDef * table;
+} ecere_gcc_struct __anon1;
+int importType;
+struct External * fwdDecl;
+struct __ecereNameSpace__ecere__com__Instance * outgoing;
+struct __ecereNameSpace__ecere__com__Instance * incoming;
+int nonBreakableIncoming;
+} ecere_gcc_struct;
 
-struct InitDeclarator
-{
-struct InitDeclarator * prev;
-struct InitDeclarator * next;
-struct Location loc;
-struct Declarator * declarator;
-struct Initializer * initializer;
-} __attribute__ ((gcc_struct));
+struct External * __ecereMethod_External_ForwardDeclare();
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
+struct AsmField;
 
 struct AsmField
 {
@@ -968,102 +871,155 @@ struct Location loc;
 char *  command;
 struct Expression * expression;
 struct Identifier * symbolic;
-} __attribute__ ((gcc_struct));
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
+struct __ecereNameSpace__ecere__com__NameSpace;
 
-struct Attribute;
+struct __ecereNameSpace__ecere__com__NameSpace
+{
+const char *  name;
+struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
+struct __ecereNameSpace__ecere__com__NameSpace *  left;
+struct __ecereNameSpace__ecere__com__NameSpace *  right;
+int depth;
+struct __ecereNameSpace__ecere__com__NameSpace *  parent;
+struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
+struct __ecereNameSpace__ecere__sys__BinaryTree classes;
+struct __ecereNameSpace__ecere__sys__BinaryTree defines;
+struct __ecereNameSpace__ecere__sys__BinaryTree functions;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
+struct __ecereNameSpace__ecere__com__Class
+{
+struct __ecereNameSpace__ecere__com__Class * prev;
+struct __ecereNameSpace__ecere__com__Class * next;
+const char *  name;
+int offset;
+int structSize;
+void * *  _vTbl;
+int vTblSize;
+unsigned int (*  Constructor)(void * );
+void (*  Destructor)(void * );
+int offsetClass;
+int sizeClass;
+struct __ecereNameSpace__ecere__com__Class * base;
+struct __ecereNameSpace__ecere__sys__BinaryTree methods;
+struct __ecereNameSpace__ecere__sys__BinaryTree members;
+struct __ecereNameSpace__ecere__sys__BinaryTree prop;
+struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
+struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
+struct __ecereNameSpace__ecere__sys__OldList derivatives;
+int memberID;
+int startMemberID;
+int type;
+struct __ecereNameSpace__ecere__com__Instance * module;
+struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
+const char *  dataTypeString;
+struct Type * dataType;
+int typeSize;
+int defaultAlignment;
+void (*  Initialize)();
+int memberOffset;
+struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
+const char *  designerClass;
+unsigned int noExpansion;
+const char *  defaultProperty;
+unsigned int comRedefinition;
+int count;
+int isRemote;
+unsigned int internalDecl;
+void *  data;
+unsigned int computeSize;
+short structAlignment;
+short pointerAlignment;
+int destructionWatchOffset;
+unsigned int fixed;
+struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
+int inheritanceAccess;
+const char *  fullName;
+void *  symbol;
+struct __ecereNameSpace__ecere__sys__OldList conversions;
+struct __ecereNameSpace__ecere__sys__OldList templateParams;
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
+struct __ecereNameSpace__ecere__com__Class * templateClass;
+struct __ecereNameSpace__ecere__sys__OldList templatized;
+int numParams;
+unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
+} ecere_gcc_struct;
 
-struct ClassFunction;
+struct __ecereNameSpace__ecere__com__Application
+{
+int argc;
+const char * *  argv;
+int exitCode;
+unsigned int isGUIApp;
+struct __ecereNameSpace__ecere__sys__OldList allModules;
+char *  parsedCommand;
+struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
+} ecere_gcc_struct;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
+extern void __ecereNameSpace__ecere__com__PrintLn(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
 
-struct MembersInit;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
 
-struct MemberInit;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
 
-struct PropertyDef;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_char__PTR_;
 
-struct PropertyWatch;
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TopoEdge;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
+struct __ecereNameSpace__ecere__com__Module
+{
+struct __ecereNameSpace__ecere__com__Instance * application;
+struct __ecereNameSpace__ecere__sys__OldList classes;
+struct __ecereNameSpace__ecere__sys__OldList defines;
+struct __ecereNameSpace__ecere__sys__OldList functions;
+struct __ecereNameSpace__ecere__sys__OldList modules;
+struct __ecereNameSpace__ecere__com__Instance * prev;
+struct __ecereNameSpace__ecere__com__Instance * next;
+const char *  name;
+void *  library;
+void *  Unload;
+int importType;
+int origImportType;
+struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
+struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
+} ecere_gcc_struct;
 
-struct ClassDef
+static void ReplaceByInstancePtr(struct Specifier * spec, struct Declarator ** declPtr, int type)
 {
-struct ClassDef * prev;
-struct ClassDef * next;
-struct Location loc;
-int type;
-union
+struct Declarator * decl = *declPtr;
+
+if(decl && decl->type == 5)
 {
-struct Declaration * decl;
-struct ClassFunction * function;
-struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
-struct PropertyDef * propertyDef;
-struct PropertyWatch * propertyWatch;
-char *  designer;
-struct Identifier * defaultProperty;
-struct
+if(type == 2)
+;
+else
+decl->__anon1.pointer.pointer = MkPointer((((void *)0)), decl->__anon1.pointer.pointer);
+}
+else
 {
-struct Identifier * id;
-struct Initializer * initializer;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon1;
-int memberAccess;
-void *  object;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
-
-struct DBTableEntry;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
-
-struct DBIndexItem;
-
-extern YYSTYPE yylval;
-
-extern struct Location yylloc;
-
-extern struct External * curExternal;
-
-extern struct __ecereNameSpace__ecere__sys__OldList *  MkList(void);
-
-extern struct Declarator * SpecDeclFromString(const char *  string, struct __ecereNameSpace__ecere__sys__OldList *  specs, struct Declarator * baseDecl);
-
-extern struct Specifier * CopySpecifier(struct Specifier * spec);
-
-extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (*  FreeFunction)(void * ));
-
-extern void FreeSpecifier(struct Specifier * spec);
-
-extern void FreeDeclarator(struct Declarator * decl);
-
-extern char *  __ecereNameSpace__ecere__sys__CopyString(const char *  string);
-
-extern struct Symbol * FindClass(const char *  name);
-
-extern void FreeSpecifierContents(struct Specifier * spec);
-
-extern void FullClassNameCat(char *  output, const char *  className, unsigned int includeTemplateParams);
-
-extern struct Identifier * MkIdentifier(const char *  string);
-
-extern int strcmp(const char * , const char * );
-
-extern struct Type * ProcessTypeString(const char *  string, unsigned int staticMethod);
-
-extern struct Specifier * MkSpecifier(int specifier);
+struct Declarator * newDecl = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Declarator);
 
-void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
+if(decl)
+{
+*newDecl = *decl;
+decl->declarator = newDecl;
+}
+else
+decl = newDecl;
+decl->type = 5;
+decl->__anon1.pointer.pointer = MkPointer((((void *)0)), (((void *)0)));
+*declPtr = decl;
+}
+}
 
 static int ReplaceClassSpec(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Specifier * spec, unsigned int param)
 {
@@ -1081,9 +1037,13 @@ if((*newSpecs).first)
 struct Specifier * newSpec = CopySpecifier((*newSpecs).first);
 
 *spec = *newSpec;
-((newSpec ? (__ecereClass_Specifier->Destructor ? __ecereClass_Specifier->Destructor((void *)newSpec) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newSpec)) : 0), newSpec = 0);
+((newSpec ? __extension__ ({
+void * __ecerePtrToDelete = (newSpec);
+
+__ecereClass_Specifier->Destructor ? __ecereClass_Specifier->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
+}) : 0), newSpec = 0);
 }
-FreeList(newSpecs, FreeSpecifier);
+FreeList(newSpecs, (void *)(FreeSpecifier));
 if(decl)
 {
 unsigned int isPointer = decl->type == 5;
@@ -1104,7 +1064,11 @@ if((*newSpecs).first)
 struct Specifier * newSpec = CopySpecifier((*newSpecs).first);
 
 *spec = *newSpec;
-((newSpec ? (__ecereClass_Specifier->Destructor ? __ecereClass_Specifier->Destructor((void *)newSpec) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newSpec)) : 0), newSpec = 0);
+((newSpec ? __extension__ ({
+void * __ecerePtrToDelete = (newSpec);
+
+__ecereClass_Specifier->Destructor ? __ecereClass_Specifier->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
+}) : 0), newSpec = 0);
 }
 if(decl)
 {
@@ -1139,8 +1103,8 @@ if(_class && _class->type == 1)
 {
 char name[1024];
 
-name[0] = (char)0;
-FullClassNameCat(name, _class->fullName, 0x0);
+name[0] = 0;
+FullClassNameCat(name, _class->fullName, 0);
 FreeSpecifierContents(spec);
 spec->type = 3;
 spec->__anon1.__anon2.baseSpecs = (((void *)0));
@@ -1148,20 +1112,20 @@ spec->__anon1.__anon2.id = MkIdentifier(name);
 spec->__anon1.__anon2.list = (((void *)0));
 spec->__anon1.__anon2.definitions = (((void *)0));
 spec->__anon1.__anon2.ctx = (((void *)0));
-spec->__anon1.__anon2.addNameSpace = 0x0;
+spec->__anon1.__anon2.addNameSpace = 0;
 }
 else if(_class && _class->type == 5)
 {
 char name[1024] = "";
 
-FullClassNameCat(name, _class->fullName, 0x0);
+FullClassNameCat(name, _class->fullName, 0);
 spec->type = 3;
 spec->__anon1.__anon2.baseSpecs = (((void *)0));
 spec->__anon1.__anon2.id = MkIdentifier(name);
 spec->__anon1.__anon2.list = (((void *)0));
 spec->__anon1.__anon2.definitions = (((void *)0));
 spec->__anon1.__anon2.ctx = (((void *)0));
-spec->__anon1.__anon2.addNameSpace = 0x0;
+spec->__anon1.__anon2.addNameSpace = 0;
 }
 else if(_class)
 {
@@ -1172,7 +1136,7 @@ if(_class->dataTypeString)
 if(!strcmp(_class->dataTypeString, "uint64") || !strcmp(_class->dataTypeString, "uint32") || !strcmp(_class->dataTypeString, "uint16") || !strcmp(_class->dataTypeString, "uintptr") || !strcmp(_class->dataTypeString, "intptr") || !strcmp(_class->dataTypeString, "uintsize") || !strcmp(_class->dataTypeString, "intsize") || !strcmp(_class->dataTypeString, "uint") || !strcmp(_class->dataTypeString, "byte"))
 {
 if(!_class->dataType)
-_class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
+_class->dataType = ProcessTypeString(_class->dataTypeString, 0);
 if(_class->dataType && _class->dataType->kind == 8)
 classSym = _class->dataType->__anon1._class;
 else
@@ -1203,7 +1167,7 @@ spec->__anon1.__anon2.list = (((void *)0));
 spec->__anon1.__anon2.baseSpecs = (((void *)0));
 spec->__anon1.__anon2.definitions = (((void *)0));
 spec->__anon1.__anon2.ctx = (((void *)0));
-spec->__anon1.__anon2.addNameSpace = 0x0;
+spec->__anon1.__anon2.addNameSpace = 0;
 }
 if(_class && _class->dataTypeString && !strcmp(_class->dataTypeString, "char *"))
 return 1;
@@ -1225,361 +1189,494 @@ return 1;
 return 0;
 }
 
-extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
-
-extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
-
-static void ReplaceByInstancePtr(struct Specifier * spec, struct Declarator ** declPtr, int type)
+void TopoSort(struct __ecereNameSpace__ecere__sys__OldList * input)
 {
-struct Declarator * decl = *declPtr;
-
-if(decl && decl->type == 5)
+struct __ecereNameSpace__ecere__sys__OldList L =
 {
-if(type == 2)
-;
-else
-decl->__anon1.pointer.pointer = MkPointer((((void *)0)), decl->__anon1.pointer.pointer);
-}
-else
+0, 0, 0, 0, 0
+};
+struct __ecereNameSpace__ecere__sys__OldList S =
 {
-struct Declarator * newDecl = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Declarator);
-
-if(decl)
+0, 0, 0, 0, 0
+};
+struct __ecereNameSpace__ecere__sys__OldList B =
 {
-*newDecl = *decl;
-decl->declarator = newDecl;
-}
-else
-decl = newDecl;
-decl->type = 5;
-decl->__anon1.pointer.pointer = MkPointer((((void *)0)), (((void *)0)));
-*declPtr = decl;
-}
-}
-
-extern struct ExtDecl * MkExtDeclString(char * s);
-
-static void InstDeclPassDeclaration(struct Declaration * decl);
-
-static void InstDeclPassIdentifier(struct Identifier * id);
-
-extern int targetPlatform;
+0, 0, 0, 0, 0
+};
+struct External * n, * next;
 
-static void InstDeclPassSpecifier(struct Specifier * spec, unsigned int byRefTypedObject)
+for(n = (*input).first; n; n = next)
 {
-switch(spec->type)
+next = n->next;
+if(n->type == 1 && !n->__anon1.declaration)
 {
-case 0:
-if(spec->__anon1.specifier == TYPED_OBJECT)
-{
-spec->type = 5;
-spec->__anon1.__anon1.extDecl = MkExtDeclString(__ecereNameSpace__ecere__sys__CopyString(byRefTypedObject ? "struct __ecereNameSpace__ecere__com__Class * class, void *" : "struct __ecereNameSpace__ecere__com__Class * class, const void *"));
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), n);
+if(n->symbol && n->symbol->__anon2.__anon1.structExternal == n)
+n->symbol->__anon2.__anon1.structExternal = (((void *)0));
+FreeExternal(n);
 }
-break;
-case 1:
-break;
-case 2:
-{
-struct Enumerator * e;
-
-if(spec->__anon1.__anon2.list)
-{
-for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
+else if(!((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)n->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
 {
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), n);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&S, n);
 }
+else if(!n->nonBreakableIncoming)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), n);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&B, n);
 }
-break;
 }
-case 3:
-case 4:
-{
-if(spec->__anon1.__anon2.definitions)
+while(1)
 {
-struct ClassDef * def;
+struct TopoEdge * e, * ne;
 
-for(def = (*spec->__anon1.__anon2.definitions).first; def; def = def->next)
-if(def->__anon1.decl)
-InstDeclPassDeclaration(def->__anon1.decl);
-}
-if(spec->__anon1.__anon2.id)
-InstDeclPassIdentifier(spec->__anon1.__anon2.id);
-break;
-}
-case 5:
-if(spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && spec->__anon1.__anon1.extDecl->__anon1.s)
+if((n = S.first))
 {
-if(!strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&S, (struct __ecereNameSpace__ecere__com__IteratorPointer *)n);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&L, n);
+for(e = ((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)n->outgoing + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->first; e; e = ne)
 {
-struct Specifier * prevSpec;
+struct External * m = e->to;
+struct __ecereNameSpace__ecere__sys__OldList * list;
 
-(__ecereNameSpace__ecere__com__eSystem_Delete(spec->__anon1.__anon1.extDecl->__anon1.s), spec->__anon1.__anon1.extDecl->__anon1.s = 0);
-for(prevSpec = spec->prev; prevSpec; prevSpec = prevSpec->prev)
-if(prevSpec->type == 0 && prevSpec->__anon1.specifier == EXTERN)
-break;
-if(prevSpec)
+if(m->nonBreakableIncoming)
 {
-if(targetPlatform == 1)
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__declspec(dllexport)");
-else
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__attribute__ ((visibility(\"default\")))");
+list = input;
 }
 else
 {
-if(targetPlatform == 1)
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __declspec(dllexport)");
-else
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __attribute__ ((visibility(\"default\")))");
+list = &B;
 }
-}
-else if(!strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "_stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "__stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "__stdcall__"))
+if(!(*list).count)
+__ecereNameSpace__ecere__com__PrintLn(__ecereClass_char__PTR_, "!!! Something's wrong !!!", (void *)0);
+ne = e->out.next;
+if(!e->breakable)
 {
-(__ecereNameSpace__ecere__com__eSystem_Delete(spec->__anon1.__anon1.extDecl->__anon1.s), spec->__anon1.__anon1.extDecl->__anon1.s = 0);
-if(targetPlatform == 1)
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__attribute__((__stdcall__))");
-else
-spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("");
-}
-}
-break;
+m->nonBreakableIncoming--;
 }
-}
-
-void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
-
-extern struct __ecereNameSpace__ecere__sys__OldList *  MkListOne(void *  item);
+(__extension__ ({
+void (*  __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it);
 
-extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
+__internal_VirtualMethod = ((void (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = n->outgoing;
 
-extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove]);
+__internal_VirtualMethod ? __internal_VirtualMethod(n->outgoing, (struct __ecereNameSpace__ecere__com__IteratorPointer *)e) : (void)1;
+}));
+(__extension__ ({
+void (*  __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it);
 
-extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
+__internal_VirtualMethod = ((void (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = m->incoming;
 
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void *  prevItem, void *  item);
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove]);
+__internal_VirtualMethod ? __internal_VirtualMethod(m->incoming, (struct __ecereNameSpace__ecere__com__IteratorPointer *)e) : (void)1;
+}));
+((e ? __extension__ ({
+void * __ecerePtrToDelete = (e);
 
-static void InstDeclPassDeclarator(struct Declarator * decl)
-{
-switch(decl->type)
+__ecereClass_TopoEdge->Destructor ? __ecereClass_TopoEdge->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
+}) : 0), e = 0);
+if(!((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)m->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
 {
-case 0:
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
-break;
-case 1:
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*list), m);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&S, m);
+}
+else if(!m->nonBreakableIncoming)
 {
-if(decl->__anon1.identifier)
-InstDeclPassIdentifier(decl->__anon1.identifier);
-break;
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*list), m);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&B, m);
 }
-case 2:
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
-break;
-case 3:
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
-break;
-case 4:
+}
+}
+else if((n = B.first))
 {
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
-if(decl->__anon1.function.parameters)
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&B, (struct __ecereNameSpace__ecere__com__IteratorPointer *)n);
+for(e = ((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)n->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->first; e; e = ne)
 {
-struct TypeName * type;
+struct TopoEdge * e2, * n2;
+struct External * m = e->from;
+struct External * f;
 
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
-for(type = (*decl->__anon1.function.parameters).first; type; type = type->next)
+f = __ecereMethod_External_ForwardDeclare(m);
+ne = e->in.next;
 {
-unsigned int typedObject = 0x0;
-struct Specifier * spec = (((void *)0));
+struct External * c, * next;
 
-if(type->qualifiers)
+for(c = (*input).first; c; c = next)
 {
-spec = (struct Specifier *)(*type->qualifiers).first;
-if(spec && spec->type == 1 && !strcmp(spec->__anon1.__anon1.name, "class"))
-typedObject = 0x1;
-}
-InstDeclPassTypeName(type, 0x1);
-if(typedObject)
+next = c->next;
+if(!((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)c->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
 {
-struct TypeName * _class = (_class = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), _class->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), _class->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), _class);
-
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), spec->prev, _class);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), c);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&S, c);
 }
+else if(!c->nonBreakableIncoming)
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), c);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&B, c);
 }
 }
-break;
 }
-case 5:
-case 6:
-case 7:
-if((decl->type == 6 || decl->type == 7) && decl->__anon1.extended.extended)
+for(e2 = ((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)m->outgoing + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->first; e2; e2 = n2)
 {
-if(decl->__anon1.extended.extended->type == 0 && decl->__anon1.extended.extended->__anon1.s && !strcmp(decl->__anon1.extended.extended->__anon1.s, "dllexport"))
+n2 = e2->out.next;
+if(e2->breakable)
 {
-(__ecereNameSpace__ecere__com__eSystem_Delete(decl->__anon1.extended.extended->__anon1.s), decl->__anon1.extended.extended->__anon1.s = 0);
-if(targetPlatform == 1)
-decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __declspec(dllexport)");
+struct External * to = e2->to;
+
+if(e2 == e)
+;
 else
-decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __attribute__ ((visibility(\"default\")))");
-}
-else if(decl->__anon1.extended.extended->type == 0 && decl->__anon1.extended.extended->__anon1.s && (!strcmp(decl->__anon1.extended.extended->__anon1.s, "stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "_stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "__stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "__stdcall__")))
+;
+e2->breakable = 0;
+e2->from = f;
+(__extension__ ({
+void (*  __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it);
+
+__internal_VirtualMethod = ((void (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * it))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = m->outgoing;
+
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Remove]);
+__internal_VirtualMethod ? __internal_VirtualMethod(m->outgoing, (struct __ecereNameSpace__ecere__com__IteratorPointer *)e2) : (void)1;
+}));
+(__extension__ ({
+struct __ecereNameSpace__ecere__com__IteratorPointer * (*  __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value);
+
+__internal_VirtualMethod = ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
+struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f->outgoing;
+
+__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
+})[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add]);
+__internal_VirtualMethod ? __internal_VirtualMethod(f->outgoing, (uint64)(uintptr_t)(e2)) : (struct __ecereNameSpace__ecere__com__IteratorPointer *)1;
+}));
+to->nonBreakableIncoming++;
+if(e2 != e && to->nonBreakableIncoming == 1)
 {
-(__ecereNameSpace__ecere__com__eSystem_Delete(decl->__anon1.extended.extended->__anon1.s), decl->__anon1.extended.extended->__anon1.s = 0);
-if(targetPlatform == 1)
-decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__attribute__((__stdcall__))");
-else
-decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("");
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&B, to);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*input), to);
 }
 }
-if(decl->declarator)
-InstDeclPassDeclarator(decl->declarator);
+}
+if(!((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)f->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&S, f);
+else if(!f->nonBreakableIncoming)
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&B, f);
+else
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*input), f);
+if(S.first)
 break;
 }
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*input), n);
 }
-
-void InstDeclPassTypeName(struct TypeName * type, unsigned int param)
-{
-if(type->qualifiers)
+else
 {
-struct Specifier * spec;
-
-for(spec = (*type->qualifiers).first; spec; spec = spec->next)
+if((*input).count)
 {
-int result;
-
-if((result = ReplaceClassSpec(type->qualifiers, spec, param)))
-ReplaceByInstancePtr(spec, &type->declarator, result);
+Compiler_Error("declarations cycles found\n");
+}
 else
+*input = L;
+break;
+}
+}
+for(n = (*input).first; n; n = next)
 {
-struct Symbol * classSym = (spec->type == 1) ? spec->__anon1.__anon1.symbol : (((void *)0));
-
-if(type->classObjectType && (!classSym || (classSym && classSym->__anon1.registered && (classSym->__anon1.registered->type == 4 || classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3))))
-ReplaceByInstancePtr(spec, &type->declarator, 2);
+next = n->next;
+if(n->type == 1 && (!n->__anon1.declaration || ((!n->__anon1.declaration->__anon1.__anon1.specifiers || !(*n->__anon1.declaration->__anon1.__anon1.specifiers).count) && (!n->__anon1.declaration->__anon1.__anon1.declarators || !(*n->__anon1.declaration->__anon1.__anon1.declarators).count))))
+{
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*input), n);
+if(n->symbol && n->symbol->__anon2.__anon1.structExternal == n)
+n->symbol->__anon2.__anon1.structExternal = (((void *)0));
+FreeExternal(n);
 }
-InstDeclPassSpecifier(spec, type->declarator && type->declarator->type == 5);
 }
 }
-if(type->declarator)
-InstDeclPassDeclarator(type->declarator);
+
+void __ecereUnregisterModule_pass3(struct __ecereNameSpace__ecere__com__Instance * module)
+{
+
 }
 
-extern char *  strchr(const char * , int);
+struct Statement;
 
-extern char *  strcpy(char * , const char * );
+typedef union YYSTYPE
+{
+int specifierType;
+int i;
+int declMode;
+struct Identifier * id;
+struct Expression * exp;
+struct Specifier * specifier;
+struct __ecereNameSpace__ecere__sys__OldList * list;
+struct Enumerator * enumerator;
+struct Declarator * declarator;
+struct Pointer * pointer;
+struct Initializer * initializer;
+struct InitDeclarator * initDeclarator;
+struct TypeName * typeName;
+struct Declaration * declaration;
+struct Statement * stmt;
+struct FunctionDefinition * function;
+struct External * external;
+struct Context * context;
+struct AsmField * asmField;
+struct Attrib * attrib;
+struct ExtDecl * extDecl;
+struct Attribute * attribute;
+struct Instantiation * instance;
+struct MembersInit * membersInit;
+struct MemberInit * memberInit;
+struct ClassFunction * classFunction;
+struct ClassDefinition * _class;
+struct ClassDef * classDef;
+struct PropertyDef * prop;
+char * string;
+struct Symbol * symbol;
+struct PropertyWatch * propertyWatch;
+struct TemplateParameter * templateParameter;
+struct TemplateArgument * templateArgument;
+struct TemplateDatatype * templateDatatype;
+struct DBTableEntry * dbtableEntry;
+struct DBIndexItem * dbindexItem;
+struct DBTableDef * dbtableDef;
+} ecere_gcc_struct YYSTYPE;
 
-extern size_t strlen(const char * );
+extern YYSTYPE yylval;
 
-static void InstDeclPassIdentifier(struct Identifier * id)
+struct Expression
 {
-if(strchr(id->string, ':'))
+struct Expression * prev;
+struct Expression * next;
+struct Location loc;
+int type;
+union
 {
-char newID[1024];
-int c;
-char ch;
-int len;
-
-strcpy(newID, "__ecereNameSpace__");
-len = strlen(newID);
-for(c = 0; (ch = id->string[c]); c++)
+struct
 {
-if(ch == ':')
-ch = '_';
-newID[len++] = ch;
-}
-newID[len] = (char)0;
-(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
-id->string = __ecereNameSpace__ecere__sys__CopyString(newID);
-}
-}
-
-static unsigned int IsVoidPtrCast(struct TypeName * typeName)
+char *  constant;
+struct Identifier * identifier;
+} ecere_gcc_struct __anon1;
+struct Statement * compound;
+struct Instantiation * instance;
+struct
 {
-unsigned int result = 0x0;
-struct Declarator * d = typeName->declarator;
-
-if(d && d->type == 5 && d->__anon1.pointer.pointer == (((void *)0)))
+char *  string;
+unsigned int intlString;
+unsigned int wideString;
+} ecere_gcc_struct __anon2;
+struct __ecereNameSpace__ecere__sys__OldList *  list;
+struct
 {
-if(typeName->qualifiers)
+struct __ecereNameSpace__ecere__sys__OldList * specifiers;
+struct Declarator * decl;
+} ecere_gcc_struct _classExp;
+struct
 {
-struct Specifier * s;
-
-for(s = (*typeName->qualifiers).first; s; s = s->next)
+struct Identifier * id;
+} ecere_gcc_struct classData;
+struct
 {
-if(s->type == 0 && s->__anon1.specifier == VOID)
-result = 0x1;
-}
-}
-}
-return result;
-}
-
-extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
-
-extern void FreeType(struct Type * type);
-
-extern struct Expression * CopyExpContents(struct Expression * exp);
-
-extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
-
-extern struct Declarator * QMkPtrDecl(const char *  id);
-
-extern void FreeExpContents(struct Expression * exp);
-
-static void InstDeclPassStatement(struct Statement * stmt);
-
-static void InstDeclPassInitializer(struct Initializer * init);
+struct Expression * exp;
+struct __ecereNameSpace__ecere__sys__OldList * arguments;
+struct Location argLoc;
+} ecere_gcc_struct call;
+struct
+{
+struct Expression * exp;
+struct __ecereNameSpace__ecere__sys__OldList * index;
+} ecere_gcc_struct index;
+struct
+{
+struct Expression * exp;
+struct Identifier * member;
+int memberType;
+unsigned int thisPtr;
+} ecere_gcc_struct member;
+struct
+{
+int op;
+struct Expression * exp1;
+struct Expression * exp2;
+} ecere_gcc_struct op;
+struct TypeName * typeName;
+struct Specifier * _class;
+struct
+{
+struct TypeName * typeName;
+struct Expression * exp;
+} ecere_gcc_struct cast;
+struct
+{
+struct Expression * cond;
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct Expression * elseExp;
+} ecere_gcc_struct cond;
+struct
+{
+struct TypeName * typeName;
+struct Expression * size;
+} ecere_gcc_struct _new;
+struct
+{
+struct TypeName * typeName;
+struct Expression * size;
+struct Expression * exp;
+} ecere_gcc_struct _renew;
+struct
+{
+char * table;
+struct Identifier * id;
+} ecere_gcc_struct db;
+struct
+{
+struct Expression * ds;
+struct Expression * name;
+} ecere_gcc_struct dbopen;
+struct
+{
+struct TypeName * typeName;
+struct Initializer * initializer;
+} ecere_gcc_struct initializer;
+struct
+{
+struct Expression * exp;
+struct TypeName * typeName;
+} ecere_gcc_struct vaArg;
+struct
+{
+struct TypeName * typeName;
+struct Identifier * id;
+} ecere_gcc_struct offset;
+} ecere_gcc_struct __anon1;
+unsigned int debugValue;
+struct __ecereNameSpace__ecere__com__DataValue val;
+uint64 address;
+unsigned int hasAddress;
+struct Type * expType;
+struct Type * destType;
+unsigned int usage;
+int tempCount;
+unsigned int byReference;
+unsigned int isConstant;
+unsigned int addedThis;
+unsigned int needCast;
+unsigned int thisPtr;
+unsigned int opDestType;
+unsigned int usedInComparison;
+unsigned int ambiguousUnits;
+unsigned int parentOpDestType;
+unsigned int needTemplateCast;
+} ecere_gcc_struct;
 
-static void InstDeclPassExpression(struct Expression * exp)
+struct Statement
 {
-switch(exp->type)
+struct Statement * prev;
+struct Statement * next;
+struct Location loc;
+int type;
+union
 {
-case 0:
+struct __ecereNameSpace__ecere__sys__OldList *  expressions;
+struct
 {
-if(exp->__anon1.__anon1.identifier)
-InstDeclPassIdentifier(exp->__anon1.__anon1.identifier);
-break;
-}
-case 2:
-break;
-case 3:
-break;
-case 4:
-if(exp->__anon1.op.exp1)
-InstDeclPassExpression(exp->__anon1.op.exp1);
-if(exp->__anon1.op.exp2)
-InstDeclPassExpression(exp->__anon1.op.exp2);
-break;
-case 32:
-case 5:
+struct Identifier * id;
+struct Statement * stmt;
+} ecere_gcc_struct labeled;
+struct
+{
+struct Expression * exp;
+struct Statement * stmt;
+} ecere_gcc_struct caseStmt;
+struct
+{
+struct __ecereNameSpace__ecere__sys__OldList * declarations;
+struct __ecereNameSpace__ecere__sys__OldList * statements;
+struct Context * context;
+unsigned int isSwitch;
+} ecere_gcc_struct compound;
+struct
+{
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct Statement * stmt;
+struct Statement * elseStmt;
+} ecere_gcc_struct ifStmt;
+struct
+{
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct Statement * stmt;
+} ecere_gcc_struct switchStmt;
+struct
+{
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct Statement * stmt;
+} ecere_gcc_struct whileStmt;
+struct
+{
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct Statement * stmt;
+} ecere_gcc_struct doWhile;
+struct
+{
+struct Statement * init;
+struct Statement * check;
+struct __ecereNameSpace__ecere__sys__OldList * increment;
+struct Statement * stmt;
+} ecere_gcc_struct forStmt;
+struct
+{
+struct Identifier * id;
+} ecere_gcc_struct gotoStmt;
+struct
+{
+struct Specifier * spec;
+char * statements;
+struct __ecereNameSpace__ecere__sys__OldList * inputFields;
+struct __ecereNameSpace__ecere__sys__OldList * outputFields;
+struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
+} ecere_gcc_struct asmStmt;
+struct
 {
-struct Expression * e;
-
-for(e = (*exp->__anon1.list).first; e; e = e->next)
-InstDeclPassExpression(e);
-break;
-}
-case 6:
+struct Expression * watcher;
+struct Expression * object;
+struct __ecereNameSpace__ecere__sys__OldList * watches;
+} ecere_gcc_struct _watch;
+struct
 {
-struct Expression * e;
+struct Identifier * id;
+struct __ecereNameSpace__ecere__sys__OldList * exp;
+struct __ecereNameSpace__ecere__sys__OldList * filter;
+struct Statement * stmt;
+} ecere_gcc_struct forEachStmt;
+struct Declaration * decl;
+} ecere_gcc_struct __anon1;
+} ecere_gcc_struct;
 
-InstDeclPassExpression(exp->__anon1.index.exp);
-for(e = (*exp->__anon1.index.index).first; e; e = e->next)
-InstDeclPassExpression(e);
-break;
-}
-case 7:
+struct FunctionDefinition
 {
-struct Expression * e;
+struct FunctionDefinition * prev;
+struct FunctionDefinition * next;
+struct Location loc;
+struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
+struct Declarator * declarator;
+struct __ecereNameSpace__ecere__sys__OldList *  declarations;
+struct Statement * body;
+struct __ecereNameSpace__ecere__com__Class * _class;
+struct __ecereNameSpace__ecere__sys__OldList attached;
+int declMode;
+struct Type * type;
+struct Symbol * propSet;
+int tempCount;
+unsigned int propertyNoThis;
+} ecere_gcc_struct;
 
-InstDeclPassExpression(exp->__anon1.call.exp);
-if(exp->__anon1.call.arguments)
-{
-for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
+static void AddPointerCast(struct Expression * e)
 {
 struct Type * src = e->expType;
 
-InstDeclPassExpression(e);
 if(src && (src->kind == 20 || src->kind == 8))
 {
 if(e->type != 11 || !IsVoidPtrCast(e->__anon1.cast.typeName))
@@ -1591,7 +1688,7 @@ if(src->kind == 20 && src->__anon1.templateParameter && src->__anon1.templatePar
 struct Type * newType = (((void *)0));
 
 if(src->__anon1.templateParameter->dataTypeString)
-newType = ProcessTypeString(src->__anon1.templateParameter->dataTypeString, 0x0);
+newType = ProcessTypeString(src->__anon1.templateParameter->dataTypeString, 0);
 else if(src->__anon1.templateParameter->__anon1.dataType)
 newType = ProcessType(src->__anon1.templateParameter->__anon1.dataType->specifiers, src->__anon1.templateParameter->__anon1.dataType->decl);
 if(newType)
@@ -1604,6 +1701,8 @@ if(src && src->kind == 8 && src->__anon1._class)
 {
 struct __ecereNameSpace__ecere__com__Class * sc = src->__anon1._class->__anon1.registered;
 
+if(src->thisClassFrom && src->thisClassFrom->base)
+sc = src->thisClassFrom;
 if(sc && (sc->type == 1 || sc->type == 5))
 {
 struct Type * dest = e->destType;
@@ -1617,7 +1716,7 @@ if(dest->kind == 20 && dest->__anon1.templateParameter && dest->__anon1.template
 struct Type * newType = (((void *)0));
 
 if(dest->__anon1.templateParameter->dataTypeString)
-newType = ProcessTypeString(dest->__anon1.templateParameter->dataTypeString, 0x0);
+newType = ProcessTypeString(dest->__anon1.templateParameter->dataTypeString, 0);
 else if(dest->__anon1.templateParameter->__anon1.dataType)
 newType = ProcessType(dest->__anon1.templateParameter->__anon1.dataType->specifiers, dest->__anon1.templateParameter->__anon1.dataType->decl);
 if(newType)
@@ -1636,7 +1735,7 @@ if(dc->templateClass)
 dc = dc->templateClass;
 if(dc->base && sc != dc)
 {
-e->__anon1.cast.exp = CopyExpContents(e);
+e->__anon1.cast.exp = MkExpBrackets(MkListOne(MoveExpContents(e)));
 e->type = 11;
 e->__anon1.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), QMkPtrDecl((((void *)0))));
 }
@@ -1645,182 +1744,233 @@ FreeType(dest);
 }
 }
 }
-}
 FreeType(src);
 }
 }
+else if(src && src->kind == 22 && e->destType && e->destType->classObjectType)
+{
+struct Expression * nbExp = GetNonBracketsExp(e);
+
+if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
+{
+e->__anon1.cast.exp = MkExpBrackets(MkListOne(MoveExpContents(e)));
+e->type = 11;
+e->__anon1.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), QMkPtrDecl((((void *)0))));
 }
-break;
 }
-case 8:
-{
-if(exp->__anon1.member.exp)
-InstDeclPassExpression(exp->__anon1.member.exp);
-break;
 }
-case 9:
+
+static void InstDeclPassDeclaration(struct Declaration *  decl);
+
+static void InstDeclPassSpecifier(struct Specifier * spec, unsigned int byRefTypedObject)
 {
-if(exp->__anon1.member.exp)
-InstDeclPassExpression(exp->__anon1.member.exp);
-break;
+switch(spec->type)
+{
+case 0:
+if(spec->__anon1.specifier == TYPED_OBJECT)
+{
+spec->type = 5;
+spec->__anon1.__anon1.extDecl = MkExtDeclString(__ecereNameSpace__ecere__sys__CopyString(byRefTypedObject ? "struct __ecereNameSpace__ecere__com__Class * class, void *" : "struct __ecereNameSpace__ecere__com__Class * class, const void *"));
+DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
 }
-case 10:
-InstDeclPassTypeName(exp->__anon1.typeName, 0x0);
 break;
-case 11:
+case 1:
+break;
+case 2:
 {
-struct Type * type = exp->expType;
+struct Enumerator * e;
 
-if(type && type->kind == 8 && type->__anon1._class->__anon1.registered && type->__anon1._class->__anon1.registered->type == 1 && !exp->needCast)
+if(spec->__anon1.__anon2.list)
 {
-struct Expression * castExp = exp->__anon1.cast.exp;
-struct Expression * prev = exp->prev, * next = exp->next;
-
-exp->__anon1.cast.exp = (((void *)0));
-FreeExpContents(exp);
-FreeType(exp->expType);
-FreeType(exp->destType);
-*exp = *castExp;
-((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
-exp->prev = prev;
-exp->next = next;
-InstDeclPassExpression(exp);
-}
-else
+for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
 {
-InstDeclPassTypeName(exp->__anon1.cast.typeName, ((unsigned int)((exp->usage & 0x4) >> 2)));
-if(exp->__anon1.cast.exp)
-InstDeclPassExpression(exp->__anon1.cast.exp);
+}
 }
 break;
 }
-case 12:
+case 3:
+case 4:
 {
-struct Expression * e;
+if(spec->__anon1.__anon2.definitions)
+{
+struct ClassDef * def;
 
-InstDeclPassExpression(exp->__anon1.cond.cond);
-for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
-InstDeclPassExpression(e);
-InstDeclPassExpression(exp->__anon1.cond.elseExp);
+for(def = (*spec->__anon1.__anon2.definitions).first; def; def = def->next)
+if(def->__anon1.decl)
+InstDeclPassDeclaration(def->__anon1.decl);
+}
+if(spec->__anon1.__anon2.id)
+InstDeclPassIdentifier(spec->__anon1.__anon2.id);
 break;
 }
-case 23:
+case 5:
+if(spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && spec->__anon1.__anon1.extDecl->__anon1.s)
 {
-InstDeclPassStatement(exp->__anon1.compound);
+if(!strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
+{
+struct Specifier * prevSpec;
+
+(__ecereNameSpace__ecere__com__eSystem_Delete(spec->__anon1.__anon1.extDecl->__anon1.s), spec->__anon1.__anon1.extDecl->__anon1.s = 0);
+for(prevSpec = spec->prev; prevSpec; prevSpec = prevSpec->prev)
+if(prevSpec->type == 0 && prevSpec->__anon1.specifier == EXTERN)
 break;
+if(prevSpec)
+{
+if(targetPlatform == 1)
+spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__declspec(dllexport)");
+else
+spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("__attribute__ ((visibility(\"default\")))");
 }
-case 34:
+else
 {
-InstDeclPassExpression(exp->__anon1.vaArg.exp);
-break;
+if(targetPlatform == 1)
+spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __declspec(dllexport)");
+else
+spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __attribute__ ((visibility(\"default\")))");
 }
-case 33:
+}
+else if(!strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "_stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "__stdcall") || !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "__stdcall__"))
 {
-InstDeclPassTypeName(exp->__anon1.initializer.typeName, 0x0);
-InstDeclPassInitializer(exp->__anon1.initializer.initializer);
-break;
+(__ecereNameSpace__ecere__com__eSystem_Delete(spec->__anon1.__anon1.extDecl->__anon1.s), spec->__anon1.__anon1.extDecl->__anon1.s = 0);
+spec->__anon1.__anon1.extDecl->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("ecere_stdcall");
+}
 }
+break;
 }
 }
 
-static void InstDeclPassInitializer(struct Initializer * init)
+void InstDeclPassTypeName(struct TypeName *  type, unsigned int param);
+
+static void InstDeclPassDeclarator(struct Declarator * decl)
 {
-switch(init->type)
+switch(decl->type)
 {
 case 0:
-if(init->__anon1.exp)
-InstDeclPassExpression(init->__anon1.exp);
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
 break;
 case 1:
 {
-struct Initializer * i;
-
-for(i = (*init->__anon1.list).first; i; i = i->next)
-InstDeclPassInitializer(i);
+if(decl->__anon1.identifier)
+InstDeclPassIdentifier(decl->__anon1.identifier);
 break;
 }
-}
-}
-
-static void InstDeclPassDeclaration(struct Declaration * decl)
-{
-switch(decl->type)
-{
-case 1:
+case 2:
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
+break;
+case 3:
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
+break;
+case 4:
 {
-if(decl->__anon1.__anon1.specifiers)
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
+if(decl->__anon1.function.parameters)
 {
-struct Specifier * spec;
+struct TypeName * type;
 
-for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
+for(type = (*decl->__anon1.function.parameters).first; type; type = type->next)
 {
-int type;
+unsigned int typedObject = 0;
+struct Specifier * spec = (((void *)0));
 
-if((type = ReplaceClassSpec(decl->__anon1.__anon1.specifiers, spec, 0x0)))
+if(type->qualifiers)
 {
-struct InitDeclarator * d;
-
-if(decl->__anon1.__anon1.declarators)
+spec = (struct Specifier *)(*type->qualifiers).first;
+if(spec && spec->type == 1 && spec->__anon1.__anon1.name && !strcmp(spec->__anon1.__anon1.name, "class"))
+typedObject = 1;
+}
+InstDeclPassTypeName(type, 1);
+if(typedObject)
 {
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
-ReplaceByInstancePtr(spec, &d->declarator, type);
+struct TypeName * _class = (_class = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), _class->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), _class->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), _class);
+
+DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), spec->prev, _class);
 }
 }
-InstDeclPassSpecifier(spec, 0x0);
 }
+break;
 }
-if(decl->__anon1.__anon1.declarators)
+case 5:
+case 6:
+case 7:
+if((decl->type == 6 || decl->type == 7) && decl->__anon1.extended.extended)
 {
-struct InitDeclarator * d;
-
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+if(decl->__anon1.extended.extended->type == 0 && decl->__anon1.extended.extended->__anon1.s && !strcmp(decl->__anon1.extended.extended->__anon1.s, "dllexport"))
 {
-InstDeclPassDeclarator(d->declarator);
-if(d->initializer)
-InstDeclPassInitializer(d->initializer);
+(__ecereNameSpace__ecere__com__eSystem_Delete(decl->__anon1.extended.extended->__anon1.s), decl->__anon1.extended.extended->__anon1.s = 0);
+if(targetPlatform == 1)
+decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __declspec(dllexport)");
+else
+decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("extern __attribute__ ((visibility(\"default\")))");
+}
+else if(decl->__anon1.extended.extended->type == 0 && decl->__anon1.extended.extended->__anon1.s && (!strcmp(decl->__anon1.extended.extended->__anon1.s, "stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "_stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "__stdcall") || !strcmp(decl->__anon1.extended.extended->__anon1.s, "__stdcall__")))
+{
+(__ecereNameSpace__ecere__com__eSystem_Delete(decl->__anon1.extended.extended->__anon1.s), decl->__anon1.extended.extended->__anon1.s = 0);
+decl->__anon1.extended.extended->__anon1.s = __ecereNameSpace__ecere__sys__CopyString("ecere_stdcall");
 }
 }
+if(decl->declarator)
+InstDeclPassDeclarator(decl->declarator);
 break;
 }
-case 0:
+}
+
+void InstDeclPassTypeName(struct TypeName * type, unsigned int param)
 {
-if(decl->__anon1.__anon1.specifiers)
+if(type->qualifiers)
 {
 struct Specifier * spec;
 
-for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+for(spec = (*type->qualifiers).first; spec; spec = spec->next)
+{
+int result;
+
+if((result = ReplaceClassSpec(type->qualifiers, spec, param)))
+ReplaceByInstancePtr(spec, &type->declarator, result);
+else
+{
+struct Symbol * classSym = (spec->type == 1) ? spec->__anon1.__anon1.symbol : (((void *)0));
+
+if(type->classObjectType && (!classSym || (classSym && classSym->__anon1.registered && (classSym->__anon1.registered->type == 4 || classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3))))
+ReplaceByInstancePtr(spec, &type->declarator, 2);
+}
+InstDeclPassSpecifier(spec, type->declarator && type->declarator->type == 5);
+}
+}
+if(type->declarator)
+InstDeclPassDeclarator(type->declarator);
+}
+
+static void InstDeclPassExpression(struct Expression *  exp);
+
+static void InstDeclPassInitializer(struct Initializer * init)
 {
-int type;
-
-if((type = ReplaceClassSpec(decl->__anon1.__anon1.specifiers, spec, 0x0)))
+switch(init->type)
 {
-if(decl->__anon1.__anon1.declarators)
+case 0:
+if(init->__anon1.exp)
 {
-struct Declarator * d;
-
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
-ReplaceByInstancePtr(spec, &d, type);
-}
-}
-InstDeclPassSpecifier(spec, 0x0);
-}
+InstDeclPassExpression(init->__anon1.exp);
+AddPointerCast(init->__anon1.exp);
 }
-if(decl->__anon1.__anon1.declarators)
+break;
+case 1:
 {
-struct Declarator * d;
+struct Initializer * i;
 
-for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
-InstDeclPassDeclarator(d);
-}
+for(i = (*init->__anon1.list).first; i; i = i->next)
+InstDeclPassInitializer(i);
 break;
 }
-case 2:
-break;
 }
 }
 
-extern struct Context * curContext;
-
 static void InstDeclPassStatement(struct Statement * stmt)
 {
 switch(stmt->type)
@@ -1953,6 +2103,7 @@ if(stmt->__anon1.expressions)
 {
 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
 InstDeclPassExpression(exp);
+AddPointerCast((*stmt->__anon1.expressions).last);
 }
 break;
 }
@@ -1983,9 +2134,256 @@ break;
 }
 }
 
-extern struct Context * globalContext;
+static void InstDeclPassDeclaration(struct Declaration * decl)
+{
+switch(decl->type)
+{
+case 1:
+{
+if(decl->__anon1.__anon1.specifiers)
+{
+struct Specifier * spec;
 
-extern struct __ecereNameSpace__ecere__sys__OldList *  ast;
+for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+{
+int type;
+
+if((type = ReplaceClassSpec(decl->__anon1.__anon1.specifiers, spec, 0)))
+{
+struct InitDeclarator * d;
+
+if(decl->__anon1.__anon1.declarators)
+{
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+ReplaceByInstancePtr(spec, &d->declarator, type);
+}
+}
+InstDeclPassSpecifier(spec, 0);
+}
+}
+if(decl->__anon1.__anon1.declarators)
+{
+struct InitDeclarator * d;
+
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+{
+InstDeclPassDeclarator(d->declarator);
+if(d->initializer)
+InstDeclPassInitializer(d->initializer);
+}
+}
+break;
+}
+case 0:
+{
+if(decl->__anon1.__anon1.specifiers)
+{
+struct Specifier * spec;
+
+for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
+{
+int type;
+
+if((type = ReplaceClassSpec(decl->__anon1.__anon1.specifiers, spec, 0)))
+{
+if(decl->__anon1.__anon1.declarators)
+{
+struct Declarator * d;
+
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+ReplaceByInstancePtr(spec, &d, type);
+}
+}
+InstDeclPassSpecifier(spec, 0);
+}
+}
+if(decl->__anon1.__anon1.declarators)
+{
+struct Declarator * d;
+
+for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
+InstDeclPassDeclarator(d);
+}
+break;
+}
+case 2:
+break;
+}
+}
+
+static void InstDeclPassExpression(struct Expression * exp)
+{
+switch(exp->type)
+{
+case 0:
+{
+if(exp->__anon1.__anon1.identifier)
+InstDeclPassIdentifier(exp->__anon1.__anon1.identifier);
+break;
+}
+case 2:
+break;
+case 3:
+break;
+case 4:
+if(exp->__anon1.op.exp1)
+InstDeclPassExpression(exp->__anon1.op.exp1);
+if(exp->__anon1.op.exp2)
+{
+InstDeclPassExpression(exp->__anon1.op.exp2);
+if(exp->__anon1.op.op != '=' && exp->__anon1.op.exp1 && exp->__anon1.op.exp1->expType && exp->__anon1.op.exp1->expType->kind == 13 && exp->__anon1.op.exp1->expType->__anon1.type && exp->__anon1.op.exp1->expType->__anon1.type->kind == 20 && exp->__anon1.op.exp2->expType && exp->__anon1.op.exp2->expType->kind == 13 && exp->__anon1.op.exp2->expType->__anon1.type && exp->__anon1.op.exp2->expType->__anon1.type->kind == 20)
+{
+struct Expression * e = exp->__anon1.op.exp2;
+
+e->__anon1.cast.exp = MkExpBrackets(MkListOne(MoveExpContents(e)));
+e->type = 11;
+e->__anon1.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), QMkPtrDecl((((void *)0))));
+e = exp->__anon1.op.exp1;
+e->__anon1.cast.exp = MkExpBrackets(MkListOne(MoveExpContents(e)));
+e->type = 11;
+e->__anon1.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), QMkPtrDecl((((void *)0))));
+}
+else if(exp->__anon1.op.exp1 && (exp->__anon1.op.op == '=' || exp->__anon1.op.op == EQ_OP || exp->__anon1.op.op == NE_OP))
+AddPointerCast(exp->__anon1.op.exp2);
+}
+break;
+case 32:
+case 5:
+{
+struct Expression * e;
+
+for(e = (*exp->__anon1.list).first; e; e = e->next)
+InstDeclPassExpression(e);
+break;
+}
+case 6:
+{
+struct Expression * e;
+
+InstDeclPassExpression(exp->__anon1.index.exp);
+for(e = (*exp->__anon1.index.index).first; e; e = e->next)
+InstDeclPassExpression(e);
+break;
+}
+case 7:
+{
+struct Expression * e;
+
+InstDeclPassExpression(exp->__anon1.call.exp);
+if(exp->__anon1.call.arguments)
+{
+for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
+{
+unsigned int addCast = 0;
+
+InstDeclPassExpression(e);
+AddPointerCast(e);
+if(e->expType && e->expType->kind == 13 && e->expType->__anon1.type && (e->expType->__anon1.type->kind == 8 || (e->expType->__anon1.type->kind == 13 && e->expType->__anon1.type->__anon1.type && e->expType->__anon1.type->__anon1.type->kind != 0)) && e->destType && e->destType->kind == 13 && e->destType->__anon1.type && e->destType->__anon1.type->kind == 13 && e->destType->__anon1.type->__anon1.type && e->destType->__anon1.type->__anon1.type->kind == 0)
+addCast = 1;
+else if(e->expType && e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && e->expType->__anon1._class->__anon1.registered->type == 1 && e->byReference && e->destType && e->destType->kind == 8 && e->destType->classObjectType && e->destType->byReference)
+addCast = 1;
+if(addCast && (e->type != 11 || !IsVoidPtrCast(e->__anon1.cast.typeName)))
+{
+e->__anon1.cast.exp = MkExpBrackets(MkListOne(MoveExpContents(e)));
+e->type = 11;
+e->__anon1.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), QMkPtrDecl((((void *)0))));
+}
+}
+}
+break;
+}
+case 8:
+{
+if(exp->__anon1.member.exp)
+InstDeclPassExpression(exp->__anon1.member.exp);
+break;
+}
+case 9:
+{
+if(exp->__anon1.member.exp)
+InstDeclPassExpression(exp->__anon1.member.exp);
+break;
+}
+case 10:
+InstDeclPassTypeName(exp->__anon1.typeName, 0);
+break;
+case 11:
+{
+struct Type * type = exp->expType;
+
+if(type && type->kind == 8 && type->__anon1._class->__anon1.registered && type->__anon1._class->__anon1.registered->type == 1 && !exp->needCast)
+{
+if(exp->destType && exp->destType->classObjectType == 2 && exp->destType->byReference)
+{
+FreeTypeName(exp->__anon1.cast.typeName);
+exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), MkPointer((((void *)0)), (((void *)0)))), (((void *)0))));
+}
+else
+{
+struct Expression * castExp = exp->__anon1.cast.exp;
+struct Expression * prev = exp->prev, * next = exp->next;
+
+exp->__anon1.cast.exp = (((void *)0));
+FreeExpContents(exp);
+FreeType(exp->expType);
+FreeType(exp->destType);
+*exp = *castExp;
+((castExp ? __extension__ ({
+void * __ecerePtrToDelete = (castExp);
+
+__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
+}) : 0), castExp = 0);
+exp->prev = prev;
+exp->next = next;
+InstDeclPassExpression(exp);
+}
+}
+else
+{
+if(exp->expType && exp->expType->kind == 13)
+{
+if(exp->__anon1.cast.exp && exp->__anon1.cast.exp->expType && exp->__anon1.cast.exp->expType->kind == 20 && !__ecereProp_Type_Get_isPointerType(exp->__anon1.cast.exp->expType))
+exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), exp->__anon1.cast.exp);
+}
+InstDeclPassTypeName(exp->__anon1.cast.typeName, ((unsigned int)((exp->usage & 0x4) >> 2)));
+if(exp->__anon1.cast.exp)
+{
+if(exp->expType && exp->expType->kind == 20 && exp->destType && (exp->destType->passAsTemplate || (!exp->destType->__anon1.templateParameter || (!exp->destType->__anon1.templateParameter->__anon1.dataType && !exp->destType->__anon1.templateParameter->dataTypeString))) && exp->__anon1.cast.exp->expType && !exp->__anon1.cast.exp->expType->passAsTemplate && __ecereProp_Type_Get_isPointerType(exp->__anon1.cast.exp->expType))
+exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), exp->__anon1.cast.exp);
+InstDeclPassExpression(exp->__anon1.cast.exp);
+}
+}
+break;
+}
+case 12:
+{
+struct Expression * e;
+
+InstDeclPassExpression(exp->__anon1.cond.cond);
+for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
+InstDeclPassExpression(e);
+if(exp->__anon1.cond.elseExp)
+InstDeclPassExpression(exp->__anon1.cond.elseExp);
+break;
+}
+case 23:
+{
+InstDeclPassStatement(exp->__anon1.compound);
+break;
+}
+case 34:
+{
+InstDeclPassExpression(exp->__anon1.vaArg.exp);
+break;
+}
+case 33:
+{
+InstDeclPassTypeName(exp->__anon1.initializer.typeName, 0);
+InstDeclPassInitializer(exp->__anon1.initializer.initializer);
+break;
+}
+}
+}
 
 void ProcessInstanceDeclarations()
 {
@@ -2007,9 +2405,9 @@ for(spec = (*func->specifiers).first; spec; spec = spec->next)
 {
 int type;
 
-if((type = ReplaceClassSpec(func->specifiers, spec, 0x0)))
+if((type = ReplaceClassSpec(func->specifiers, spec, 0)))
 ReplaceByInstancePtr(spec, &func->declarator, type);
-InstDeclPassSpecifier(spec, 0x0);
+InstDeclPassSpecifier(spec, 0);
 }
 }
 InstDeclPassDeclarator(func->declarator);
@@ -2022,24 +2420,16 @@ if(external->__anon1.declaration)
 InstDeclPassDeclaration(external->__anon1.declaration);
 }
 }
+TopoSort(ast);
 }
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
-
-struct __ecereNameSpace__ecere__com__GlobalFunction;
-
-extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char *  name, const char *  type, void *  func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
-
 void __ecereRegisterModule_pass3(struct __ecereNameSpace__ecere__com__Instance * module)
 {
 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
 
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("InstDeclPassTypeName", "void InstDeclPassTypeName(TypeName type, bool param)", InstDeclPassTypeName, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("IsVoidPtrCast", "bool IsVoidPtrCast(TypeName typeName)", IsVoidPtrCast, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("TopoSort", "void TopoSort(ecere::sys::OldList * input)", TopoSort, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstanceDeclarations", "void ProcessInstanceDeclarations(void)", ProcessInstanceDeclarations, module, 1);
 }
 
-void __ecereUnregisterModule_pass3(struct __ecereNameSpace__ecere__com__Instance * module)
-{
-
-}
-