compiler: 32/64 bit bootstrap
[sdk] / compiler / bootstrap / libec / bootstrap / pass15.c
index f44085f..9d48b43 100644 (file)
@@ -1,6 +1,9 @@
 #if defined(__GNUC__)
 typedef long long int64;
 typedef unsigned long long uint64;
+#ifndef _WIN32
+#define __declspec(x)
+#endif
 #elif defined(__TINYC__)
 #include <stdarg.h>
 #define __builtin_va_list va_list
@@ -24,17 +27,19 @@ typedef unsigned __int64 uint64;
 #else
 #define __ENDIAN_PAD(x) 0
 #endif
-#ifdef __MINGW32__
-#ifdef _WIN64
-typedef unsigned long long int uintptr_t;
-typedef long long int intptr_t;
-#else
-typedef unsigned int uintptr_t;
-typedef int intptr_t;
-#endif
-#else
 #include <stdint.h>
+
+#if defined(_W64) || (defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
+#define _64BIT 1
+#else
+#define _64BIT 0
 #endif
+
+#define arch_PointerSize                  sizeof(void *)
+#define structSize_Instance               (_64BIT ? 24 : 12)
+#define structSize_Module                 (_64BIT ? 560 : 300)
+#define structSize_NamedLink              (_64BIT ? 32 : 16)
+
 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
 
 extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
@@ -101,9 +106,9 @@ struct __ecereNameSpace__ecere__com__Class * _class;
 char *  dataTypeString;
 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
 struct Type * dataType;
-void (*  Set)();
-int (*  Get)();
-unsigned int (*  IsSet)();
+void (*  Set)(void * , int);
+int (*  Get)(void * );
+unsigned int (*  IsSet)(void * );
 void *  data;
 void *  symbol;
 int vid;
@@ -464,7 +469,7 @@ struct TypeName * typeName;
 } __attribute__ ((gcc_struct));
 unsigned int debugValue;
 struct __ecereNameSpace__ecere__com__DataValue val;
-unsigned int address;
+uint64 address;
 unsigned int hasAddress;
 struct Type * expType;
 struct Type * destType;
@@ -854,6 +859,8 @@ struct __ecereNameSpace__ecere__sys__OldList templatized;
 int numParams;
 } __attribute__ ((gcc_struct));
 
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char *  name);
+
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
 
 struct __ecereNameSpace__ecere__com__Instance
@@ -921,7 +928,7 @@ struct __ecereNameSpace__ecere__com__Method * method;
 } __attribute__ ((gcc_struct));
 } __attribute__ ((gcc_struct));
 
-typedef unsigned int size_t;
+typedef uintptr_t size_t;
 
 void exit(int status);
 
@@ -1196,17 +1203,12 @@ unsigned int thisClassParams = 0x1;
 
 unsigned int internalValueCounter;
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
-
-struct __ecereNameSpace__ecere__sys__TempFile
-{
-char __ecere_padding[24];
-} __attribute__ ((gcc_struct));
-
 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
 
 extern int strlen(const char * );
 
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
+
 extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
 
 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
@@ -1231,134 +1233,6 @@ string[count] = '\0';
 }
 }
 
-extern int isspace(int c);
-
-long long _strtoi64(char * string, char ** endString, int base)
-{
-long long value = 0;
-int sign = 1;
-int c;
-char ch;
-
-for(c = 0; (ch = string[c]) && isspace(ch); c++)
-;
-if(ch == '+')
-c++;
-else if(ch == '-')
-{
-sign = -1;
-c++;
-}
-;
-if(!base)
-{
-if(ch == (char)0 && string[c + 1] == 'x')
-{
-base = 16;
-c += 2;
-}
-else if(ch == '0')
-{
-base = 8;
-c++;
-}
-else
-base = 10;
-}
-for(; (ch = string[c]); c++)
-{
-if(ch == '0')
-ch = (char)0;
-else if(ch >= '1' && ch <= '9')
-ch -= '1';
-else if(ch >= 'a' && ch <= 'z')
-ch -= 'a';
-else if(ch >= 'A' && ch <= 'Z')
-ch -= 'A';
-else
-{
-if(endString)
-*endString = string + c;
-break;
-}
-if(ch < base)
-{
-value *= base;
-value += ch;
-}
-else
-{
-if(endString)
-*endString = string + c;
-break;
-}
-}
-return sign * value;
-}
-
-uint64 _strtoui64(char * string, char ** endString, int base)
-{
-uint64 value = 0;
-int sign = 1;
-int c;
-char ch;
-
-for(c = 0; (ch = string[c]) && isspace(ch); c++)
-;
-if(ch == '+')
-c++;
-else if(ch == '-')
-{
-sign = -1;
-c++;
-}
-;
-if(!base)
-{
-if(ch == (char)0 && string[c + 1] == 'x')
-{
-base = 16;
-c += 2;
-}
-else if(ch == '0')
-{
-base = 8;
-c++;
-}
-else
-base = 10;
-}
-for(; (ch = string[c]); c++)
-{
-if(ch == '0')
-ch = (char)0;
-else if(ch >= '1' && ch <= '9')
-ch -= '1';
-else if(ch >= 'a' && ch <= 'z')
-ch -= 'a';
-else if(ch >= 'A' && ch <= 'Z')
-ch -= 'A';
-else
-{
-if(endString)
-*endString = string + c;
-break;
-}
-if(ch < base)
-{
-value *= base;
-value += ch;
-}
-else
-{
-if(endString)
-*endString = string + c;
-break;
-}
-}
-return sign * value;
-}
-
 extern struct Type * ProcessTypeString(char *  string, unsigned int staticMethod);
 
 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
@@ -1435,8 +1309,8 @@ struct __ecereNameSpace__ecere__com__ClassProperty * parent;
 struct __ecereNameSpace__ecere__com__ClassProperty * left;
 struct __ecereNameSpace__ecere__com__ClassProperty * right;
 int depth;
-void (*  Set)(struct __ecereNameSpace__ecere__com__Class *, int);
-int (*  Get)(struct __ecereNameSpace__ecere__com__Class *);
+void (*  Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
+long long (*  Get)(struct __ecereNameSpace__ecere__com__Class *);
 char *  dataTypeString;
 struct Type * dataType;
 unsigned int constant;
@@ -1461,7 +1335,6 @@ int memberType;
 } __attribute__ ((gcc_struct));
 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
 void *  param;
-char __ecere_padding[4];
 } __attribute__ ((gcc_struct));
 
 extern struct Expression * GetTemplateArgExpByName(char *  paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
@@ -1754,11 +1627,8 @@ int i;
 unsigned int ui;
 float f;
 double d;
-unsigned char *  p;
 long long i64;
 uint64 ui64;
-intptr_t iptr;
-uintptr_t uiptr;
 } __attribute__ ((gcc_struct));
 struct OpTable ops;
 } __attribute__ ((gcc_struct));
@@ -1778,9 +1648,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (int)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (int)op2.iptr;
+*value2 = (int)op2.i64;
 else if(op2.kind == 22)
-*value2 = (int)op2.uiptr;
+*value2 = (int)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (int)op2.s;
 else if(op2.kind == 2)
@@ -1794,7 +1664,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (int)op2.d;
 else if(op2.kind == 13)
-*value2 = (int)op2.ui;
+*value2 = (int)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1813,9 +1683,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (unsigned int)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (unsigned int)op2.iptr;
+*value2 = (unsigned int)op2.i64;
 else if(op2.kind == 22)
-*value2 = (unsigned int)op2.uiptr;
+*value2 = (unsigned int)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (unsigned int)op2.s;
 else if(op2.kind == 2)
@@ -1829,7 +1699,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (unsigned int)op2.d;
 else if(op2.kind == 13)
-*value2 = op2.ui;
+*value2 = (unsigned int)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1848,9 +1718,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (long long)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (long long)op2.iptr;
+*value2 = op2.i64;
 else if(op2.kind == 22)
-*value2 = (long long)op2.uiptr;
+*value2 = (long long)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (long long)op2.s;
 else if(op2.kind == 2)
@@ -1864,7 +1734,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (long long)op2.d;
 else if(op2.kind == 13)
-*value2 = (long long)op2.ui;
+*value2 = (long long)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1883,9 +1753,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (uint64)op2.iptr;
+*value2 = (uint64)op2.i64;
 else if(op2.kind == 22)
-*value2 = (uint64)op2.uiptr;
+*value2 = op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (uint64)op2.s;
 else if(op2.kind == 2)
@@ -1899,7 +1769,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (uint64)op2.d;
 else if(op2.kind == 13)
-*value2 = (uint64)op2.ui;
+*value2 = op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1918,9 +1788,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (intptr_t)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = op2.iptr;
+*value2 = (intptr_t)op2.i64;
 else if(op2.kind == 22)
-*value2 = (intptr_t)op2.uiptr;
+*value2 = (intptr_t)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (intptr_t)op2.s;
 else if(op2.kind == 2)
@@ -1934,7 +1804,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (intptr_t)op2.d;
 else if(op2.kind == 13)
-*value2 = (intptr_t)op2.ui;
+*value2 = (intptr_t)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1953,9 +1823,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (uintptr_t)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (uintptr_t)op2.iptr;
+*value2 = (uintptr_t)op2.i64;
 else if(op2.kind == 22)
-*value2 = op2.uiptr;
+*value2 = (uintptr_t)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (uintptr_t)op2.s;
 else if(op2.kind == 2)
@@ -1969,7 +1839,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (uintptr_t)op2.d;
 else if(op2.kind == 13)
-*value2 = (uintptr_t)op2.ui;
+*value2 = (uintptr_t)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -1988,9 +1858,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (short)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (short)op2.iptr;
+*value2 = (short)op2.i64;
 else if(op2.kind == 22)
-*value2 = (short)op2.uiptr;
+*value2 = (short)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = op2.s;
 else if(op2.kind == 2)
@@ -2004,7 +1874,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (short)op2.d;
 else if(op2.kind == 13)
-*value2 = (short)op2.ui;
+*value2 = (short)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2023,9 +1893,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (unsigned short)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (unsigned short)op2.iptr;
+*value2 = (unsigned short)op2.i64;
 else if(op2.kind == 22)
-*value2 = (unsigned short)op2.uiptr;
+*value2 = (unsigned short)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (unsigned short)op2.s;
 else if(op2.kind == 2)
@@ -2039,7 +1909,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (unsigned short)op2.d;
 else if(op2.kind == 13)
-*value2 = (unsigned short)op2.ui;
+*value2 = (unsigned short)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2058,9 +1928,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (char)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (char)op2.iptr;
+*value2 = (char)op2.i64;
 else if(op2.kind == 22)
-*value2 = (char)op2.uiptr;
+*value2 = (char)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (char)op2.s;
 else if(op2.kind == 2)
@@ -2074,7 +1944,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (char)op2.d;
 else if(op2.kind == 13)
-*value2 = (char)op2.ui;
+*value2 = (char)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2093,9 +1963,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (unsigned char)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (unsigned char)op2.iptr;
+*value2 = (unsigned char)op2.i64;
 else if(op2.kind == 22)
-*value2 = (unsigned char)op2.uiptr;
+*value2 = (unsigned char)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (unsigned char)op2.s;
 else if(op2.kind == 2)
@@ -2109,7 +1979,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (unsigned char)op2.d;
 else if(op2.kind == 13)
-*value2 = (unsigned char)op2.ui;
+*value2 = (unsigned char)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2128,9 +1998,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (float)(float)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (float)op2.iptr;
+*value2 = (float)(float)op2.i64;
 else if(op2.kind == 22)
-*value2 = (float)op2.uiptr;
+*value2 = (float)(float)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (float)(float)op2.s;
 else if(op2.kind == 2)
@@ -2144,7 +2014,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (float)op2.d;
 else if(op2.kind == 13)
-*value2 = (float)(float)op2.ui;
+*value2 = (float)(float)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2163,9 +2033,9 @@ if(op2.kind == 4 && op2.type->isSigned)
 else if(op2.kind == 4)
 *value2 = (double)(double)op2.ui64;
 else if(op2.kind == 22 && op2.type->isSigned)
-*value2 = (double)op2.iptr;
+*value2 = (double)(double)op2.i64;
 else if(op2.kind == 22)
-*value2 = (double)op2.uiptr;
+*value2 = (double)(double)op2.ui64;
 else if(op2.kind == 2 && op2.type->isSigned)
 *value2 = (double)(double)op2.s;
 else if(op2.kind == 2)
@@ -2179,7 +2049,7 @@ else if(op2.kind == 6)
 else if(op2.kind == 7)
 *value2 = (double)op2.d;
 else if(op2.kind == 13)
-*value2 = (double)(double)op2.ui;
+*value2 = (double)(double)op2.ui64;
 else
 return 0x0;
 return 0x1;
@@ -2189,6 +2059,8 @@ void ComputeExpression(struct Expression * exp);
 
 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
 
+extern int targetBits;
+
 int ComputeTypeSize(struct Type * type);
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
@@ -2227,12 +2099,22 @@ void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, un
 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
 
-if(member || ((_class->type == 2 || _class->type == 0 || _class->type == 1 || _class->type == 5) && (_class->type == 2 || _class->structSize == _class->offset) && _class->computeSize))
+if(member || ((_class->type == 2 || _class->type == 0 || _class->type == 1 || _class->type == 5) && (_class->type == 2 || (!_class->structSize || _class->structSize == _class->offset)) && _class->computeSize))
 {
 int c;
 int unionMemberOffset = 0;
 int bitFields = 0;
 
+if(member)
+{
+member->memberOffset = 0;
+if(targetBits < sizeof(void *) * 8)
+member->structAlignment = 0;
+}
+else if(targetBits < sizeof(void *) * 8)
+_class->structAlignment = 0;
+if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
+_class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
 if(!member && _class->destructionWatchOffset)
 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
 {
@@ -2368,24 +2250,38 @@ _class->memberOffset += size;
 }
 else
 {
+int alignment;
+
 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 0x1);
+alignment = dataMember->structAlignment;
 if(isMember)
 {
-int __simpleStruct2;
-int __simpleStruct0, __simpleStruct1;
+int __simpleStruct0;
+
+if(alignment)
+{
+int __simpleStruct0;
 
-member->structAlignment = (__simpleStruct0 = member->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+if(member->memberOffset % alignment)
+member->memberOffset += alignment - (member->memberOffset % alignment);
+member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
+}
 dataMember->offset = member->memberOffset;
 if(member->type == 1)
-unionMemberOffset = (__simpleStruct2 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct2) ? unionMemberOffset : __simpleStruct2);
+unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
 else
 member->memberOffset += dataMember->memberOffset;
 }
 else
 {
-int __simpleStruct0, __simpleStruct1;
+if(alignment)
+{
+int __simpleStruct0;
 
-_class->structAlignment = (__simpleStruct0 = _class->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+if(_class->memberOffset % alignment)
+_class->memberOffset += alignment - (_class->memberOffset % alignment);
+_class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
+}
 dataMember->offset = _class->memberOffset;
 _class->memberOffset += dataMember->memberOffset;
 }
@@ -2439,7 +2335,14 @@ if(!isMember)
 {
 if(_class->type != 2)
 {
-_class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset;
+int extra = 0;
+
+if(_class->structAlignment)
+{
+if(_class->memberOffset % _class->structAlignment)
+extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
+}
+_class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
 if(!member)
 {
 struct __ecereNameSpace__ecere__com__Property * prop;
@@ -2517,14 +2420,12 @@ void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module
 struct __ecereNameSpace__ecere__com__Class * _class;
 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
 
-for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + 12)))->modules.first; subModule; subModule = subModule->next)
+for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
 ComputeModuleClasses(subModule->data);
-for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + 12)))->classes.first; _class; _class = _class->next)
+for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
 ComputeClassMembers(_class, 0x0);
 }
 
-extern int targetBits;
-
 extern unsigned int inCompiler;
 
 extern void Compiler_Error(char *  format, ...);
@@ -2533,8 +2434,6 @@ extern char *  __ecereNameSpace__ecere__GetTranslatedString(struct __ecereNameSp
 
 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
 
-extern int __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char *  name);
-
 int ComputeTypeSize(struct Type * type)
 {
 unsigned int size = type ? type->size : 0;
@@ -2618,7 +2517,7 @@ else if(type->enumClass)
 {
 if(type->enumClass && type->enumClass->registered && type->enumClass->registered->type == 4)
 {
-type->arraySize = __ecereNameSpace__ecere__com__eClass_GetProperty(type->enumClass->registered, "enumSize");
+type->arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->enumClass->registered, "enumSize");
 }
 else
 type->arraySize = 0;
@@ -2676,14 +2575,17 @@ struct TemplateParameter * param = type->templateParameter;
 struct Type * baseType = ProcessTemplateParameterType(param);
 
 if(baseType)
+{
 size = ComputeTypeSize(baseType);
+type->alignment = baseType->alignment;
+}
 else
-size = sizeof(uint64);
+type->alignment = size = sizeof(uint64);
 break;
 }
 case 15:
 {
-size = sizeof(enum
+type->alignment = size = sizeof(enum
 {
 test
 });
@@ -2691,7 +2593,7 @@ break;
 }
 case 21:
 {
-size = targetBits / 8;
+type->alignment = size = targetBits / 8;
 break;
 }
 }
@@ -2727,7 +2629,7 @@ extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, str
 
 extern struct Expression * MkExpConstant(char *  string);
 
-int AddMembers(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember, unsigned int * retSize, struct __ecereNameSpace__ecere__com__Class * topClass)
+int AddMembers(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember, unsigned int * retSize, struct __ecereNameSpace__ecere__com__Class * topClass, unsigned int * addedPadding)
 {
 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
 unsigned int totalSize = 0;
@@ -2736,12 +2638,14 @@ int alignment, size;
 struct __ecereNameSpace__ecere__com__DataMember * member;
 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
 
+if(addedPadding)
+*addedPadding = 0x0;
 if(!isMember && _class->base)
 {
 maxSize = _class->structSize;
 {
 if(_class->type == 1 || _class->type == 5)
-AddMembers(declarations, _class->base, 0x0, &totalSize, topClass);
+AddMembers(declarations, _class->base, 0x0, &totalSize, topClass, (((void *)0)));
 else
 maxSize -= _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
 }
@@ -2789,7 +2693,7 @@ case 2:
 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
 
 size = 0;
-AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 0x1, &size, topClass);
+AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 0x1, &size, topClass, (((void *)0)));
 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, (((void *)0)), (((void *)0)))));
 alignment = member->structAlignment;
@@ -2815,10 +2719,19 @@ else
 }
 else if(totalSize < maxSize && _class->type != 1000)
 {
+int autoPadding = 0;
+
+if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
+autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
+if(totalSize + autoPadding < maxSize)
+{
 char sizeString[50];
 
 sprintf(sizeString, "%d", maxSize - totalSize);
 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
+if(addedPadding)
+*addedPadding = 0x1;
+}
 }
 if(context)
 FinishTemplatesContext(context);
@@ -2870,6 +2783,8 @@ extern void FullClassNameCat(char *  output, char *  className, unsigned int inc
 
 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* )(void * ));
 
+extern void FreeClassDef(struct ClassDef * def);
+
 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
 
 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
@@ -2890,9 +2805,9 @@ struct External * external = (((void *)0));
 struct Symbol * classSym = FindClass(name);
 
 if(!inCompiler || !classSym)
-return (((void *)0));
+return ;
 if(classSym->registered && (classSym->registered->type == 2 || classSym->registered->type == 3 || classSym->registered->type == 4))
-return (((void *)0));
+return ;
 if(classSym->registered && classSym->imported && !classSym->declaredStructSym)
 {
 struct Declaration * decl;
@@ -2909,19 +2824,21 @@ if(classSym->registered->templateClass)
 DeclareStruct(classSym->registered->templateClass->fullName, skipNoHead);
 classSym->declaring--;
 }
-return (((void *)0));
+return ;
 }
 DeclareMembers(classSym->registered, 0x0);
 structName[0] = (char)0;
 FullClassNameCat(structName, name, 0x0);
 if(!skipNoHead)
 {
+unsigned int addedPadding = 0x0;
+
 classSym->declaredStructSym = 0x1;
 declarations = MkList();
-AddMembers(declarations, classSym->registered, 0x0, (((void *)0)), classSym->registered);
-if(!(*declarations).count)
+AddMembers(declarations, classSym->registered, 0x0, (((void *)0)), classSym->registered, &addedPadding);
+if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
 {
-FreeList(declarations, (((void *)0)));
+FreeList(declarations, FreeClassDef);
 declarations = (((void *)0));
 }
 }
@@ -3083,7 +3000,7 @@ if(classSym)
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
 }
 imported = 0x1;
-if(prop->_class->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)prop->_class->module + 12)))->importType != 1)
+if(prop->_class->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)prop->_class->module + structSize_Instance)))->importType != 1)
 dllImport = 0x1;
 }
 if(!symbol->type)
@@ -4066,7 +3983,7 @@ if(!classSym->_import)
 {
 struct ModuleImport * module;
 
-if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + 12)))->name)
+if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
 module = FindModule(method->_class->module);
 else
 module = mainModule;
@@ -4092,7 +4009,7 @@ symbol->type->refCount++;
 if(!method->dataType->dllExport)
 {
 imported = 0x1;
-if(method->_class->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + 12)))->importType != 1)
+if(method->_class->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->importType != 1)
 dllImport = 0x1;
 }
 }
@@ -4368,7 +4285,7 @@ symbol->type->staticMethod = 0x1;
 }
 }
 imported = symbol->_import ? 0x1 : 0x0;
-if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + 12)))->importType != 1)
+if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
 dllImport = 0x1;
 }
 DeclareType(function->dataType, 0x1, 0x1);
@@ -4389,7 +4306,7 @@ d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
 if(dllImport)
 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + 12)))->importType == 1)
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
 {
 struct Specifier * spec;
 
@@ -4442,7 +4359,7 @@ if(curExternal)
 symbol->id = curExternal->symbol->idCode;
 }
 }
-return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + 12)))->importType != 1) ? 0x1 : 0x0;
+return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 0x1 : 0x0;
 }
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
@@ -5054,9 +4971,9 @@ struct __ecereNameSpace__ecere__com__SubModule * subModule;
 
 if(searchFor == searchIn)
 return 0x1;
-for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + 12)))->modules.first; subModule; subModule = subModule->next)
+for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
 {
-if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + 12)))->application)
+if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
 {
 if(ModuleVisibility(subModule->module, searchFor))
 return 0x1;
@@ -5082,15 +4999,15 @@ unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance
 {
 struct __ecereNameSpace__ecere__com__Instance * module;
 
-if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + 12)))->application + 300)))->systemNameSpace, sourceExp, dest, string, conversions))
+if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, sourceExp, dest, string, conversions))
 return 0x1;
-if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + 12)))->application + 12)))->privateNameSpace, sourceExp, dest, string, conversions))
+if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, sourceExp, dest, string, conversions))
 return 0x1;
-if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + 12)))->application + 12)))->publicNameSpace, sourceExp, dest, string, conversions))
+if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
 return 0x1;
-for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + 12)))->application + 300)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + 12)))->next)
+for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
 {
-if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + 12)))->publicNameSpace, sourceExp, dest, string, conversions))
+if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
 return 0x1;
 }
 return 0x0;
@@ -9290,6 +9207,10 @@ output[d++] = ch;
 output[d] = '\0';
 }
 
+extern long long __ecereNameSpace__ecere__com___strtoi64(char *  string, char * *  endString, int base);
+
+extern uint64 __ecereNameSpace__ecere__com___strtoui64(char *  string, char * *  endString, int base);
+
 extern double strtod(char * , char * * );
 
 struct Operand GetOperand(struct Expression * exp)
@@ -9362,12 +9283,12 @@ break;
 case 4:
 if(type->isSigned)
 {
-op.i64 = _strtoi64(exp->constant, (((void *)0)), 0);
+op.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->constant, (((void *)0)), 0);
 op.ops = intOps;
 }
 else
 {
-op.ui64 = _strtoui64(exp->constant, (((void *)0)), 0);
+op.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->constant, (((void *)0)), 0);
 op.ops = uintOps;
 }
 op.kind = 3;
@@ -9375,12 +9296,12 @@ break;
 case 22:
 if(type->isSigned)
 {
-op.iptr = (intptr_t)_strtoi64(exp->constant, (((void *)0)), 0);
+op.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->constant, (((void *)0)), 0);
 op.ops = intOps;
 }
 else
 {
-op.uiptr = (uintptr_t)_strtoui64(exp->constant, (((void *)0)), 0);
+op.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->constant, (((void *)0)), 0);
 op.ops = uintOps;
 }
 op.kind = 3;
@@ -9396,7 +9317,7 @@ break;
 case 12:
 case 13:
 case 8:
-op.p = (unsigned char *)strtoul(exp->constant, (((void *)0)), 0);
+op.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->constant, (((void *)0)), 0);
 op.kind = 13;
 op.ops = uintOps;
 break;
@@ -9884,14 +9805,14 @@ case 4:
 {
 void (* Set)(void *, long long) = (void *)prop->Set;
 
-Set(inst->data, _strtoi64(value->constant, (((void *)0)), 0));
+Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->constant, (((void *)0)), 0));
 break;
 }
 case 22:
 {
 void (* Set)(void *, intptr_t) = (void *)prop->Set;
 
-Set(inst->data, (intptr_t)_strtoi64(value->constant, (((void *)0)), 0));
+Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->constant, (((void *)0)), 0));
 break;
 }
 }
@@ -9901,7 +9822,7 @@ else if(value->type == 3)
 char temp[1024];
 
 ReadString(temp, value->string);
-prop->Set(inst->data, temp);
+((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
 }
 }
 }
@@ -11696,7 +11617,7 @@ else
 char constant[256];
 
 exp->type = 2;
-sprintf(constant, "%d", classProp->Get(_class));
+sprintf(constant, "%d", (int)classProp->Get(_class));
 exp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
 }
 }
@@ -12286,7 +12207,7 @@ char name[1024];
 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
 name[0] = (char)0;
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + 12)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
 strcpy(name, "__ecereFunction_");
 FullClassNameCat(name, id->string, 0x0);
 if(DeclareFunction(function, name))
@@ -13179,7 +13100,14 @@ if(exp->call.exp->type == 0)
 struct Expression * idExp = exp->call.exp;
 struct Identifier * id = idExp->identifier;
 
-if(!strcmp(id->string, "__ENDIAN_PAD"))
+if(!strcmp(id->string, "__builtin_frame_address"))
+{
+exp->expType = ProcessTypeString("void *", 0x1);
+if(exp->call.arguments && (*exp->call.arguments).first)
+ProcessExpressionType((*exp->call.arguments).first);
+break;
+}
+else if(!strcmp(id->string, "__ENDIAN_PAD"))
 {
 exp->expType = ProcessTypeString("int", 0x1);
 if(exp->call.arguments && (*exp->call.arguments).first)
@@ -13364,7 +13292,7 @@ struct Location oldyylloc = yylloc;
 
 if(!type)
 emptyParams = 0x1;
-if(functionType->extraParam && e)
+if(functionType->extraParam && e && functionType->thisClass)
 {
 e->destType = MkClassType(functionType->thisClass->string);
 e = e->next;
@@ -14529,7 +14457,7 @@ ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
-ListAdd(structInitializers, MkInitializerAssignment((__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression), ((struct Expression *)__ecereTemp1)->type = 2, ((struct Expression *)__ecereTemp1)->constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, 0), ((struct Expression *)__ecereTemp1))));
+ListAdd(structInitializers, MkInitializerAssignment((__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression), ((struct Expression *)__ecereTemp1)->type = 2, ((struct Expression *)__ecereTemp1)->constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), ((struct Expression *)__ecereTemp1))));
 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
@@ -14577,7 +14505,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink * member;
 
 for(member = symbol->type->members.first; member; member = member->next)
 {
-struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(16), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
+struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
 
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->members, value);
 }
@@ -16305,7 +16233,7 @@ if(function)
 char name[1024];
 
 name[0] = (char)0;
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + 12)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
 strcpy(name, "__ecereFunction_");
 FullClassNameCat(name, s, 0x0);
 DeclareFunction(function, name);
@@ -16319,16 +16247,54 @@ void ComputeDataTypes()
 void * __ecereTemp1;
 struct External * external;
 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
+struct External * after = (((void *)0));
 
 currentClass = (((void *)0));
 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
+for(external = (*ast).first; external; external = external->next)
+{
+if(external->type == 1)
+{
+struct Declaration * decl = external->declaration;
+
+if(decl)
+{
+struct __ecereNameSpace__ecere__sys__OldList * decls = decl->declarators;
+
+if(decls)
+{
+struct InitDeclarator * initDecl = (*decls).first;
+
+if(initDecl)
+{
+struct Declarator * declarator = initDecl->declarator;
+
+if(declarator && declarator->type == 1)
+{
+struct Identifier * id = declarator->identifier;
+
+if(id && id->string)
+{
+if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t"))
+{
+external->symbol->id = -1001, external->symbol->idCode = -1001;
+after = external;
+}
+}
+}
+}
+}
+}
+}
+}
 temp->symbol = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), ((struct Symbol *)__ecereTemp1)->id = -1000, ((struct Symbol *)__ecereTemp1)->idCode = -1000, ((struct Symbol *)__ecereTemp1));
-__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), (((void *)0)), temp);
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
 curExternal = temp;
 DeclareFunctionUtil("eSystem_New");
 DeclareFunctionUtil("eSystem_New0");
 DeclareFunctionUtil("eSystem_Renew");
 DeclareFunctionUtil("eSystem_Renew0");
+DeclareFunctionUtil("eClass_GetProperty");
 DeclareStruct("ecere::com::Class", 0x0);
 DeclareStruct("ecere::com::Instance", 0x0);
 DeclareStruct("ecere::com::Property", 0x0);
@@ -16388,8 +16354,6 @@ __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYy
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
-__ecereNameSpace__ecere__com__eSystem_RegisterFunction("_strtoi64", "int64 _strtoi64(char * string, char * * endString, int base)", _strtoi64, module, 2);
-__ecereNameSpace__ecere__com__eSystem_RegisterFunction("_strtoui64", "uint64 _strtoui64(char * string, char * * endString, int base)", _strtoui64, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
@@ -16419,7 +16383,7 @@ __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDou
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
-__ecereNameSpace__ecere__com__eSystem_RegisterFunction("AddMembers", "int AddMembers(ecere::sys::OldList * declarations, ecere::com::Class _class, bool isMember, uint * retSize, ecere::com::Class topClass)", AddMembers, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("AddMembers", "int AddMembers(ecere::sys::OldList * declarations, ecere::com::Class _class, bool isMember, uint * retSize, ecere::com::Class topClass, bool * addedPadding)", AddMembers, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(char * name, bool skipNoHead)", DeclareStruct, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
@@ -16437,7 +16401,7 @@ __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifie
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
-if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + 12)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + 12)))->application && class)
+if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
 __ecereClass_Conversion = class;
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypes", "bool MatchTypes(Type source, Type dest, ecere::sys::OldList conversions, ecere::com::Class owningClassSource, ecere::com::Class owningClassDest, bool doConversion, bool enumBaseType, bool acceptReversedParams, bool isConversionExploration)", MatchTypes, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchWithEnums_NameSpace", "bool MatchWithEnums_NameSpace(ecere::com::NameSpace nameSpace, Expression sourceExp, Type dest, char * string, ecere::sys::OldList conversions)", MatchWithEnums_NameSpace, module, 2);