+/* Code generated from eC source file: pass3.ec */
#if defined(__GNUC__)
typedef long long int64;
typedef unsigned long long 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>
-#endif
+#include <sys/types.h>
extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
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;
int line;
int charPos;
int pos;
-unsigned int included;
+int included;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
} __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;
struct Type * type;
struct TemplateParameter * templateParameter;
} __attribute__ ((gcc_struct));
-unsigned int isSigned;
int kind;
-unsigned int constant;
unsigned int size;
char * name;
char * typeName;
-unsigned int count;
-unsigned int truth;
int classObjectType;
-unsigned int byReference;
-unsigned int extraParam;
int alignment;
-unsigned int directClassAccess;
-unsigned int computing;
-unsigned int dllExport;
unsigned int offset;
-unsigned int keepCast;
-unsigned int passAsTemplate;
int bitFieldCount;
+int count;
+unsigned int isSigned : 1;
+unsigned int constant : 1;
+unsigned int truth : 1;
+unsigned int byReference : 1;
+unsigned int extraParam : 1;
+unsigned int directClassAccess : 1;
+unsigned int computing : 1;
+unsigned int keepCast : 1;
+unsigned int passAsTemplate : 1;
+unsigned int dllExport : 1;
+unsigned int attrStdcall : 1;
+unsigned int declaredWithStruct : 1;
+unsigned int typedByReference : 1;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
struct __ecereNameSpace__ecere__com__Class * templateClass;
struct __ecereNameSpace__ecere__sys__OldList templatized;
int numParams;
+unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
} __attribute__ ((gcc_struct));
extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
extern struct Specifier * CopySpecifier(struct Specifier * spec);
-extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* )(void * ));
+extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
extern void FreeSpecifier(struct Specifier * spec);
}
else if(_class)
{
-if((_class->type != 1000 || !strcmp(_class->fullName, "enum") || !strcmp(_class->fullName, "ecere::com::Instance") || (_class->dataTypeString && !strcmp(_class->dataTypeString, "char *")) || !strcmp(_class->fullName, "uint64") || !strcmp(_class->fullName, "uint32") || !strcmp(_class->fullName, "uint16") || !strcmp(_class->fullName, "uintptr") || !strcmp(_class->fullName, "intptr") || !strcmp(_class->fullName, "uint") || !strcmp(_class->fullName, "byte")))
+if((_class->type != 1000 || !strcmp(_class->fullName, "enum") || (_class->dataTypeString && !strcmp(_class->dataTypeString, "char *")) || !strcmp(_class->fullName, "uint64") || !strcmp(_class->fullName, "uint32") || !strcmp(_class->fullName, "uint16") || !strcmp(_class->fullName, "uintptr") || !strcmp(_class->fullName, "intptr") || !strcmp(_class->fullName, "uintsize") || !strcmp(_class->fullName, "intsize") || !strcmp(_class->fullName, "uint") || !strcmp(_class->fullName, "byte")))
{
(__ecereNameSpace__ecere__com__eSystem_Delete(spec->name), spec->name = 0);
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, "uint") || !strcmp(_class->dataTypeString, "byte"))
+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);
}
if(_class && _class->dataTypeString && !strcmp(_class->dataTypeString, "char *"))
return 0x1;
-if(!_class || _class->type == 0 || _class->type == 5 || !strcmp(_class->fullName, "ecere::com::Instance"))
+if(!_class || _class->type == 0 || _class->type == 5)
return 0x1;
else if(param && _class->type == 1)
return (unsigned int)2;
break;
}
case 5:
-if(spec->extDecl && spec->extDecl->type == 0 && spec->extDecl->s && !strcmp(spec->extDecl->s, "dllexport"))
+if(spec->extDecl && spec->extDecl->type == 0 && spec->extDecl->s)
+{
+if(!strcmp(spec->extDecl->s, "dllexport"))
{
struct Specifier * prevSpec;
spec->extDecl->s = __ecereNameSpace__ecere__sys__CopyString("extern __attribute__ ((visibility(\"default\")))");
}
}
+else if(!strcmp(spec->extDecl->s, "stdcall") || !strcmp(spec->extDecl->s, "_stdcall") || !strcmp(spec->extDecl->s, "__stdcall") || !strcmp(spec->extDecl->s, "__stdcall__"))
+{
+(__ecereNameSpace__ecere__com__eSystem_Delete(spec->extDecl->s), spec->extDecl->s = 0);
+if(targetPlatform == 1)
+spec->extDecl->s = __ecereNameSpace__ecere__sys__CopyString("__attribute__((__stdcall__))");
+else
+spec->extDecl->s = __ecereNameSpace__ecere__sys__CopyString("");
+}
+}
break;
}
}
{
struct Symbol * classSym = (spec->type == 1) ? spec->symbol : (((void *)0));
-if(type->classObjectType && (!classSym || (classSym && classSym->registered && (classSym->registered->type == 4 || classSym->registered->type == 2 || classSym->registered->type == 3 || (classSym->registered->type == 1000 && strcmp(classSym->string, "ecere::com::Instance") && strcmp(classSym->string, "ecere::com::Class"))))))
+if(type->classObjectType && (!classSym || (classSym && classSym->registered && (classSym->registered->type == 4 || classSym->registered->type == 2 || classSym->registered->type == 3))))
ReplaceByInstancePtr(spec, &type->declarator, 2);
}
InstDeclPassSpecifier(spec);
InstDeclPassDeclarator(type->declarator);
}
-extern char * strchr(char * , int);
+extern char * strchr(const char * , int);
extern char * strcpy(char * , const char * );
-extern int strlen(const char * );
+extern size_t strlen(const char * );
static void InstDeclPassIdentifier(struct Identifier * id)
{
}
case 8:
{
+if(exp->member.exp)
InstDeclPassExpression(exp->member.exp);
break;
}
case 9:
{
+if(exp->member.exp)
InstDeclPassExpression(exp->member.exp);
break;
}
{
switch(stmt->type)
{
+case 14:
+if(stmt->decl)
+InstDeclPassDeclaration(stmt->decl);
+break;
case 0:
InstDeclPassStatement(stmt->labeled.stmt);
break;