+/* Code generated from eC source file: pass15.ec */
#if defined(__GNUC__)
typedef long long int64;
typedef unsigned long long uint64;
#include <stdint.h>
#include <sys/types.h>
-#if defined(_W64) || (defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
+#if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
#define _64BIT 1
#else
#define _64BIT 0
int line;
int charPos;
int pos;
-unsigned int included;
+int included;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
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);
if(result > (unsigned short)32767)
sprintf(temp, "0x%X", (int)result);
else
-sprintf(temp, "%d", result);
+sprintf(temp, "%d", (int)result);
return __ecereNameSpace__ecere__sys__CopyString(temp);
}
if(result > (char)0 && isprint(result))
sprintf(temp, "'%c'", result);
else if(result < (char)0)
-sprintf(temp, "%d", result);
+sprintf(temp, "%d", (int)result);
else
sprintf(temp, "0x%X", (unsigned char)result);
return __ecereNameSpace__ecere__sys__CopyString(temp);
type->arraySize = 0;
}
size = ComputeTypeSize(type->type) * type->arraySize;
+if(type->type)
type->alignment = type->type->alignment;
break;
case 9:
if(_class->type == 1 || _class->type == 5)
AddMembers(declarations, _class->base, 0x0, &totalSize, topClass, (((void *)0)));
else
-maxSize -= _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
+{
+unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
+
+if(maxSize > baseSize)
+maxSize -= baseSize;
+else
+maxSize = 0;
+}
}
}
for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
extern void FullClassNameCat(char * output, char * className, unsigned int includeTemplateParams);
-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 FreeClassDef(struct ClassDef * def);
void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
{
-void * __ecereTemp1;
struct Symbol * symbol = prop->symbol;
char propName[1024];
module = FindModule(prop->_class->module);
else
module = mainModule;
-classSym->_import = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport), ((struct ClassImport *)__ecereTemp1)->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), ((struct ClassImport *)__ecereTemp1)->isRemote = prop->_class->isRemote, ((struct ClassImport *)__ecereTemp1));
+classSym->_import = __extension__ ({
+struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
+
+__ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
}
symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
-symbol->_import = (struct ClassImport *)(__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport), ((struct PropertyImport *)__ecereTemp1)->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), ((struct PropertyImport *)__ecereTemp1)->isVirtual = 0x0, ((struct PropertyImport *)__ecereTemp1)->hasSet = prop->Set ? 0x1 : 0x0, ((struct PropertyImport *)__ecereTemp1)->hasGet = prop->Get ? 0x1 : 0x0, ((struct PropertyImport *)__ecereTemp1));
+symbol->_import = (struct ClassImport *)__extension__ ({
+struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
+
+__ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0x0, __ecereInstance1->hasSet = prop->Set ? 0x1 : 0x0, __ecereInstance1->hasGet = prop->Get ? 0x1 : 0x0, __ecereInstance1;
+});
if(classSym)
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
}
struct Type * Dereference(struct Type * source)
{
-void * __ecereTemp1;
struct Type * type = (((void *)0));
if(source)
}
else if(source->kind == 8 && !strcmp(source->_class->string, "String"))
{
-type = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->kind = 1, ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1));
+type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
}
else if(source->kind == 8 && source->_class && source->_class->registered && source->_class->registered->type == 5)
{
static struct Type * Reference(struct Type * source)
{
-void * __ecereTemp1;
struct Type * type = (((void *)0));
if(source)
{
-type = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->kind = 13, ((struct Type *)__ecereTemp1)->type = source, ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1));
+type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 13, __ecereInstance1->type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
source->refCount++;
}
return type;
{
*curMember = thisMember;
*curClass = thisMember->_class;
-memcpy(subMemberStack, _subMemberStack, sizeof(int) * _subMemberStackPos);
+memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
*subMemberStackPos = _subMemberStackPos;
}
found = 0x1;
static void ProcessFunction(struct FunctionDefinition * function);
-extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* )(void * ));
+extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
extern struct Specifier * CopySpecifier(struct Specifier * spec);
struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
{
-void * __ecereTemp1;
struct Context * context = PushContext();
context->templateTypesOnly = 0x1;
if(!param)
{
-p->param = param = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter), ((struct TemplateParameter *)__ecereTemp1)->identifier = MkIdentifier(p->name), ((struct TemplateParameter *)__ecereTemp1)->type = p->type, ((struct TemplateParameter *)__ecereTemp1)->dataTypeString = p->dataTypeString, ((struct TemplateParameter *)__ecereTemp1));
+p->param = param = __extension__ ({
+struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
+
+__ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->dataTypeString, __ecereInstance1;
+});
}
-type = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), ((struct TemplatedType *)__ecereTemp1)->key = (uintptr_t)p->name, ((struct TemplatedType *)__ecereTemp1)->param = param, ((struct TemplatedType *)__ecereTemp1));
+type = __extension__ ({
+struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
+
+__ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
}
}
void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, char * name)
{
-void * __ecereTemp1;
struct Symbol * symbol = method->symbol;
if(!symbol || (!symbol->pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
module = FindModule(method->_class->module);
else
module = mainModule;
-classSym->_import = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport), ((struct ClassImport *)__ecereTemp1)->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), ((struct ClassImport *)__ecereTemp1)->isRemote = method->_class->isRemote, ((struct ClassImport *)__ecereTemp1));
+classSym->_import = __extension__ ({
+struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
+
+__ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
}
if(!symbol)
}
if(!symbol->_import)
{
-symbol->_import = (struct ClassImport *)(__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport), ((struct MethodImport *)__ecereTemp1)->name = __ecereNameSpace__ecere__sys__CopyString(method->name), ((struct MethodImport *)__ecereTemp1)->isVirtual = method->type == 1, ((struct MethodImport *)__ecereTemp1));
+symbol->_import = (struct ClassImport *)__extension__ ({
+struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
+
+__ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
}
if(!symbol)
unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
{
-void * __ecereTemp1;
struct Symbol * symbol = function->symbol;
if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
{
if(!function->dataType->dllExport)
{
-symbol->_import = (struct ClassImport *)(__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport), ((struct FunctionImport *)__ecereTemp1)->name = __ecereNameSpace__ecere__sys__CopyString(function->name), ((struct FunctionImport *)__ecereTemp1));
+symbol->_import = (struct ClassImport *)__extension__ ({
+struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
+
+__ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
}
}
if(type)
dest = type;
}
-if((dest->classObjectType == 2 && source->classObjectType != 3) || (dest->classObjectType == 3 && source->classObjectType != 2))
+if(dest->classObjectType == 2)
{
+if(source->classObjectType != 3)
return 0x1;
+else
+{
+if((dest->_class && strcmp(dest->_class->string, "class")) || (source->_class && strcmp(source->_class->string, "class")))
+{
+return 0x1;
+}
+}
}
-if(source->classObjectType == 3 && dest->classObjectType != 2)
+else
{
+if(source->classObjectType == 3)
+return 0x1;
+if(dest->classObjectType == 3 && source->classObjectType != 2)
return 0x1;
}
if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
return 0x1;
else
{
-if(enumBaseType && dest->_class && dest->_class->registered && dest->_class->registered->type == 4 && source->_class && source->_class->registered && source->_class->registered->type != 4)
+if(enumBaseType && dest->_class && dest->_class->registered && dest->_class->registered->type == 4 && ((source->_class && source->_class->registered && source->_class->registered->type != 4) || source->kind == 8))
{
if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->_class->registered, source->_class->registered))
{
sourceExp->type = 2;
if(!strcmp(baseClass->dataTypeString, "int"))
-sprintf(constant, "%d", value->data);
+sprintf(constant, "%d", (int)value->data);
else
-sprintf(constant, "0x%X", value->data);
+sprintf(constant, "0x%X", (int)value->data);
sourceExp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
}
while(converts.first)
unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla)
{
-void * __ecereTemp1;
struct Type * source = sourceExp->expType;
struct Type * realDest = dest;
struct Type * backupSourceExpType = (((void *)0));
if(dest->kind != 8 && source->kind == 8 && source->_class && source->_class->registered && !strcmp(source->_class->registered->fullName, "ecere::com::unichar"))
{
FreeType(source);
-source = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1)->isSigned = 0x0, ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1));
+source = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0x0, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
}
if(dest->kind == 8)
{
sourceExp->type = 2;
if(_class->dataTypeString && !strcmp(_class->dataTypeString, "int"))
-sprintf(constant, "%d", value->data);
+sprintf(constant, "%d", (int)value->data);
else
-sprintf(constant, "0x%X", value->data);
+sprintf(constant, "0x%X", (int)value->data);
sourceExp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
}
return 0x1;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(value2 ? (op1->f / value2) : (float)0);
+exp->string = PrintFloat(value2 ? (op1->f / value2) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(value2 ? (op1->d / value2) : (double)0);
+exp->string = PrintDouble(value2 ? (op1->d / value2) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintInt(-op1->i);
+exp->string = PrintInt((-op1->i));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUInt(-op1->ui);
+exp->string = PrintUInt((unsigned int)(-op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintShort(-op1->s);
+exp->string = PrintShort((-op1->s));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUShort(-op1->us);
+exp->string = PrintUShort((unsigned short)(-op1->us));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintChar(-op1->c);
+exp->string = PrintChar((-op1->c));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUChar(-op1->uc);
+exp->string = PrintUChar((unsigned char)(-op1->uc));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintFloat(-op1->f);
+exp->string = PrintFloat((float)(-op1->f));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintDouble(-op1->d);
+exp->string = PrintDouble((double)(-op1->d));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintInt(++op1->i);
+exp->string = PrintInt((++op1->i));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUInt(++op1->ui);
+exp->string = PrintUInt((++op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintShort(++op1->s);
+exp->string = PrintShort((++op1->s));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUShort(++op1->us);
+exp->string = PrintUShort((++op1->us));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintChar(++op1->c);
+exp->string = PrintChar((++op1->c));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUChar(++op1->uc);
+exp->string = PrintUChar((++op1->uc));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintFloat(++op1->f);
+exp->string = PrintFloat((float)(++op1->f));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintDouble(++op1->d);
+exp->string = PrintDouble((double)(++op1->d));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintInt(--op1->i);
+exp->string = PrintInt((--op1->i));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUInt(--op1->ui);
+exp->string = PrintUInt((--op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintShort(--op1->s);
+exp->string = PrintShort((--op1->s));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUShort(--op1->us);
+exp->string = PrintUShort((--op1->us));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintChar(--op1->c);
+exp->string = PrintChar((--op1->c));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUChar(--op1->uc);
+exp->string = PrintUChar((--op1->uc));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintFloat(--op1->f);
+exp->string = PrintFloat((float)(--op1->f));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintDouble(--op1->d);
+exp->string = PrintDouble((double)(--op1->d));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(value2 ? (op1->f /= value2) : (float)0);
+exp->string = PrintFloat(value2 ? (op1->f /= value2) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(value2 ? (op1->d /= value2) : (double)0);
+exp->string = PrintDouble(value2 ? (op1->d /= value2) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintInt(~op1->i);
+exp->string = PrintInt((~op1->i));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUInt(~op1->ui);
+exp->string = PrintUInt((unsigned int)(~op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintShort(~op1->s);
+exp->string = PrintShort((short)(~op1->s));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUShort(~op1->us);
+exp->string = PrintUShort((unsigned short)(~op1->us));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintChar(~op1->c);
+exp->string = PrintChar((char)(~op1->c));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUChar(~op1->uc);
+exp->string = PrintUChar((unsigned char)(~op1->uc));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintInt(!op1->i);
+exp->string = PrintInt((int)(!op1->i));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUInt(!op1->ui);
+exp->string = PrintUInt((unsigned int)(!op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintShort(!op1->s);
+exp->string = PrintShort((short)(!op1->s));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUShort(!op1->us);
+exp->string = PrintUShort((unsigned short)(!op1->us));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintChar(!op1->c);
+exp->string = PrintChar((char)(!op1->c));
if(!exp->expType)
{
exp->expType = op1->type;
static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
-exp->string = PrintUChar(!op1->uc);
+exp->string = PrintUChar((unsigned char)(!op1->uc));
if(!exp->expType)
{
exp->expType = op1->type;
struct __ecereNameSpace__ecere__com__DataMember * dataMember;
struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
+if(!inst->members)
inst->members = MkListOne(MkMembersInitList(memberList));
+else
+__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
{
if(!dataMember->isProperty)
{
dataMember = curMember;
__ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
+if(_class->type == 0)
+dataMemberOffset += _class->base->structSize;
}
found = 0x1;
}
{
curMember = dataMember;
curClass = dataMember->_class;
-memcpy(subMemberStack, _subMemberStack, sizeof(int) * _subMemberStackPos);
+memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
subMemberStackPos = _subMemberStackPos;
}
}
{
struct Expression * value = member->initializer->exp;
struct Type * type = (((void *)0));
+unsigned int deepMember = 0x0;
if(prop)
{
}
if(ident && ident->next)
{
+deepMember = 0x1;
for(ident = ident->next; ident && type; ident = ident->next)
{
if(type->kind == 8)
type->refCount++;
ComputeExpression(value);
}
-if(value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
+if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
{
if(type->kind == 8)
{
{
if(value->type == 1 && value->instance->data)
{
+if(type->kind == 8)
+{
+struct __ecereNameSpace__ecere__com__Class * _class = type->_class->registered;
+
+if(_class && (_class->type != 0 || __ecereNameSpace__ecere__com__eClass_IsDerived(((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)value->instance->data))->_class, _class)))
+{
void (* Set)(void *, void *) = (void *)prop->Set;
Set(inst->data, value->instance->data);
PopulateInstance(inst);
}
+}
+}
else if(value->type == 2)
{
switch(type->kind)
}
}
}
-else if(_class->type == 3)
+else if(!deepMember && type && _class->type == 3)
{
if(prop)
{
}
}
}
-else if(_class->type == 2)
+else if(!deepMember && type && _class->type == 2)
{
if(prop)
{
}
}
+void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
+
extern struct Expression * MkExpIdentifier(struct Identifier * id);
void ComputeExpression(struct Expression * exp)
struct Symbol * classSym;
string[0] = '\0';
-PrintType(type, string, 0x0, 0x1);
+PrintTypeNoConst(type, string, 0x0, 0x1);
classSym = FindClass(string);
_class = classSym ? classSym->registered : (((void *)0));
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 0x1);
MangleClassName(className);
+DeclareClass(classSym, className);
FreeExpContents(exp);
exp->type = 9;
exp->member.exp = MkExpIdentifier(MkIdentifier(className));
}
}
-extern char * __ecereNameSpace__ecere__sys__RSearchString(char * buffer, char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
+static void PrintArraySize(struct Type * arrayType, char * string)
+{
+char size[256];
-static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int printFunction, unsigned int fullName)
+size[0] = '\0';
+strcat(size, "[");
+if(arrayType->enumClass)
+strcat(size, arrayType->enumClass->string);
+else if(arrayType->arraySizeExp)
+PrintExpression(arrayType->arraySizeExp, size);
+strcat(size, "]");
+strcat(string, size);
+}
+
+static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
{
if(type)
{
+if(printConst && type->constant)
+strcat(string, "const ");
switch(type->kind)
{
case 8:
-if(type->_class && type->_class->string)
{
+struct Symbol * c = type->_class;
+
if(type->classObjectType == 2)
strcat(string, "typed_object");
-else if(fullName)
-strcat(string, type->_class->string);
+else if(type->classObjectType == 3)
+strcat(string, "any_object");
else
{
-if(type->_class->registered)
-strcat(string, type->_class->registered->name);
-else
-strcat(string, type->_class->string);
-}
-}
-break;
-case 13:
-{
-{
-_PrintType(type->type, string, 0x0, printFunction, fullName);
-strcat(string, " *");
+if(c && c->string)
+strcat(string, (fullName || !c->registered) ? c->string : c->registered->name);
}
+if(type->byReference)
+strcat(string, " &");
break;
}
case 0:
strcat(string, type->enumName);
}
else if(type->typeName)
-{
strcat(string, type->typeName);
-}
else
{
struct Type * member;
-strcat(string, "struct {");
+strcat(string, "struct { ");
for(member = type->members.first; member; member = member->next)
{
PrintType(member, string, 0x1, fullName);
strcat(string, type->enumName);
}
else if(type->typeName)
-{
strcat(string, type->typeName);
-}
else
{
strcat(string, "union ");
strcat(string, type->enumName);
}
else if(type->typeName)
-{
strcat(string, type->typeName);
-}
else
-strcat(string, "enum");
+strcat(string, "int");
break;
-case 11:
-{
-if(printFunction)
-{
-if(type->dllExport)
-strcat(string, "dllexport ");
-PrintType(type->returnType, string, 0x0, fullName);
-strcat(string, " ");
+case 14:
+strcat(string, "...");
+break;
+case 19:
+strcat(string, "subclass(");
+strcat(string, type->_class ? type->_class->string : "int");
+strcat(string, ")");
+break;
+case 20:
+strcat(string, type->templateParameter->identifier->string);
+break;
+case 21:
+strcat(string, "thisclass");
+break;
+case 17:
+strcat(string, "__builtin_va_list");
+break;
+}
}
-if(printName)
+}
+
+extern char * __ecereNameSpace__ecere__sys__RSearchString(char * buffer, char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
+
+static void PrintName(struct Type * type, char * string, unsigned int fullName)
{
-if(type->name)
+if(type->name && type->name[0])
{
if(fullName)
strcat(string, type->name);
}
}
}
-if(printFunction)
-{
-struct Type * param;
-strcat(string, "(");
-for(param = type->params.first; param; param = param->next)
+static void PrintAttribs(struct Type * type, char * string)
{
-PrintType(param, string, 0x1, fullName);
-if(param->next)
-strcat(string, ", ");
-}
-strcat(string, ")");
+if(type)
+{
+if(type->dllExport)
+strcat(string, "dllexport ");
+if(type->attrStdcall)
+strcat(string, "stdcall ");
}
-break;
}
-case 12:
+
+static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
{
+if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
{
-char baseType[1024], size[256];
-struct Type * arrayType = type;
+struct Type * attrType = (((void *)0));
-baseType[0] = '\0';
-size[0] = '\0';
-while(arrayType->kind == 12)
+if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
+PrintAttribs(type, string);
+if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
+strcat(string, " const");
+PrePrintType(type->kind == 16 ? type->method->dataType : type->type, string, fullName, type, printConst);
+if(type->kind == 13 && (type->type->kind == 12 || type->type->kind == 11 || type->type->kind == 16))
+strcat(string, " (");
+if(type->kind == 13)
{
-strcat(size, "[");
-if(arrayType->enumClass)
-strcat(size, arrayType->enumClass->string);
-else if(arrayType->arraySizeExp)
-PrintExpression(arrayType->arraySizeExp, size);
-strcat(size, "]");
-arrayType = arrayType->arrayType;
+if(type->type->kind == 11 || type->type->kind == 16)
+PrintAttribs(type->type, string);
}
-_PrintType(arrayType, baseType, printName, printFunction, fullName);
-strcat(string, baseType);
-strcat(string, size);
-}
-printName = 0x0;
-break;
-}
-case 14:
-strcat(string, "...");
-break;
-case 16:
-_PrintType(type->method->dataType, string, 0x0, printFunction, fullName);
-break;
-case 19:
-strcat(string, "subclass(");
-strcat(string, type->_class ? type->_class->string : "int");
-strcat(string, ")");
-break;
-case 20:
-strcat(string, type->templateParameter->identifier->string);
-break;
-case 21:
-strcat(string, "thisclass");
-break;
-case 17:
-strcat(string, "__builtin_va_list");
-break;
-}
-if(type->name && printName && type->kind != 11 && (type->kind != 13 || type->type->kind != 11))
+if(type->kind == 13)
{
-strcat(string, " ");
-strcat(string, type->name);
+if(type->type->kind == 11 || type->type->kind == 16 || type->type->kind == 12)
+strcat(string, "*");
+else
+strcat(string, " *");
}
+if(printConst && type->constant && type->kind == 13)
+strcat(string, " const");
}
+else
+PrintTypeSpecs(type, string, fullName, printConst);
}
-void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
+static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
{
-struct Type * funcType;
-
-for(funcType = type; funcType && (funcType->kind == 13 || funcType->kind == 12); funcType = funcType->type)
-;
-if(funcType && funcType->kind == 11 && type != funcType)
+if(type->kind == 13 && (type->type->kind == 12 || type->type->kind == 11 || type->type->kind == 16))
+strcat(string, ")");
+if(type->kind == 12)
+PrintArraySize(type, string);
+else if(type->kind == 11)
{
-char typeString[1024];
struct Type * param;
-PrintType(funcType->returnType, string, 0x0, fullName);
-strcat(string, "(");
-_PrintType(type, string, printName, 0x0, fullName);
-strcat(string, ")");
strcat(string, "(");
-for(param = funcType->params.first; param; param = param->next)
+for(param = type->params.first; param; param = param->next)
{
PrintType(param, string, 0x1, fullName);
if(param->next)
}
strcat(string, ")");
}
+if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
+PostPrintType(type->kind == 16 ? type->method->dataType : type->type, string, fullName);
+}
+
+static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
+{
+PrePrintType(type, string, fullName, (((void *)0)), printConst);
+if(type->thisClass || (printName && type->name && type->name[0]))
+strcat(string, " ");
+if((type->thisClass || type->staticMethod))
+{
+struct Symbol * _class = type->thisClass;
+
+if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
+{
+if(type->classObjectType == 1)
+strcat(string, "class");
+else
+strcat(string, type->byReference ? "typed_object&" : "typed_object");
+}
+else if(_class && _class->string)
+{
+char * s = _class->string;
+
+if(fullName)
+strcat(string, s);
+else
+{
+char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 0x1, 0x0);
+
+if(name)
+name += 2;
else
-_PrintType(type, string, printName, 0x1, fullName);
+name = s;
+strcat(string, name);
+}
+}
+strcat(string, "::");
+}
+if(printName && type->name)
+PrintName(type, string, fullName);
+PostPrintType(type, string, fullName);
if(type->bitFieldCount)
{
char count[100];
}
}
+void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
+{
+_PrintType(type, string, printName, fullName, 0x1);
+}
+
+void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
+{
+_PrintType(type, string, printName, fullName, 0x0);
+}
+
static struct Type * FindMember(struct Type * type, char * string)
{
struct Type * memberType;
static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
{
-void * __ecereTemp1;
struct Identifier * id = exp->identifier;
struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
exp->type = 2;
exp->isConstant = 0x1;
if(!strcmp(baseClass->dataTypeString, "int"))
-sprintf(constant, "%d", value->data);
+sprintf(constant, "%d", (int)value->data);
else
-sprintf(constant, "0x%X", value->data);
+sprintf(constant, "0x%X", (int)value->data);
exp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
exp->expType = MkClassType(baseClass->fullName);
break;
if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
{
ProcessMethodType(method);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 16, ((struct Type *)__ecereTemp1)->method = method, ((struct Type *)__ecereTemp1)->methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->method = method, __ecereInstance1->methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
+});
return 0x1;
}
else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
char string[1024] = "";
struct Symbol * classSym;
-PrintType(type, string, 0x0, 0x1);
+PrintTypeNoConst(type, string, 0x0, 0x1);
classSym = FindClass(string);
if(classSym)
_class = classSym->registered;
}
-if((_class && (_class->type == 4 || _class->type == 3 || _class->type == 2 || _class->type == 1000) && strcmp(_class->fullName, "class") && strcmp(_class->fullName, "ecere::com::Class")) || (!e->expType->classObjectType && (((type->kind != 13 && type->kind != 19 && (type->kind != 8 || !type->_class || !type->_class->registered || type->_class->registered->type == 1))) || destType->byReference)))
+if((_class && (_class->type == 4 || _class->type == 3 || _class->type == 2 || _class->type == 1000) && strcmp(_class->fullName, "class") && strcmp(_class->fullName, "uintptr") && strcmp(_class->fullName, "intptr")) || (!e->expType->classObjectType && (((type->kind != 13 && type->kind != 22 && type->kind != 19 && (type->kind != 8 || !type->_class || !type->_class->registered || type->_class->registered->type == 1))) || destType->byReference)))
{
if(!_class || strcmp(_class->fullName, "char *"))
{
newExp->prev = (((void *)0));
newExp->next = (((void *)0));
newExp->expType = (((void *)0));
-PrintType(e->expType, typeString, 0x0, 0x1);
+PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
decl = SpecDeclFromString(typeString, specs, (((void *)0)));
newExp->destType = ProcessType(specs, decl);
curContext = context;
-e->type = 25;
if(curCompound)
{
char name[100];
struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
+e->type = 25;
sprintf(name, "__internalValue%03X", internalValueCounter++);
if(!curCompound->compound.declarations)
curCompound->compound.declarations = MkList();
}
if((!destType || destType->kind == 14 || destType->kind == 0) && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && (e->expType->byReference || (e->expType->kind == 8 && e->expType->_class && e->expType->_class->registered && (e->expType->_class->registered->type == 2 || e->expType->_class->registered->type == 4 || e->expType->_class->registered->type == 3))))
{
-if(e->expType->kind == 8 && e->expType->_class && e->expType->_class->registered && !strcmp(e->expType->_class->registered->name, "class"))
+if(e->expType->classObjectType && destType && destType->classObjectType)
{
return ;
}
thisExp->next = (((void *)0));
__ecereMethod_Expression_Clear(e);
e->type = 5;
-e->list = MkListOne(MkExpOp((((void *)0)), '*', MkExpBrackets(MkListOne(thisExp))));
+e->list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
if(thisExp->expType->kind == 8 && thisExp->expType->_class && thisExp->expType->_class->registered && thisExp->expType->_class->registered->type == 5)
((struct Expression *)(*e->list).first)->byReference = 0x1;
{
char typeString[1024];
struct Type * type;
int backupClassObjectType;
+unsigned int backupByReference;
if(e->expType->kind == 8 && e->expType->_class && e->expType->_class->registered && strcmp(e->expType->_class->registered->name, "class"))
type = e->expType;
else
type = destType;
backupClassObjectType = type->classObjectType;
+backupByReference = type->byReference;
type->classObjectType = 0;
+type->byReference = 0x0;
typeString[0] = '\0';
PrintType(type, typeString, 0x0, 0x1);
decl = SpecDeclFromString(typeString, specs, (((void *)0)));
type->classObjectType = backupClassObjectType;
+type->byReference = backupByReference;
*thisExp = *e;
thisExp->prev = (((void *)0));
thisExp->next = (((void *)0));
__ecereMethod_Expression_Clear(e);
-if((type->kind == 8 && type->_class && type->_class->registered && strcmp(type->_class->registered->fullName, "ecere::com::Instance") && (type->_class->registered->type == 1000 || type->_class->registered->type == 2 || type->_class->registered->type == 4 || type->_class->registered->type == 3)) || (type->kind != 13 && type->kind != 12 && type->kind != 8) || (!destType->byReference && byReference && (destType->kind != 13 || type->kind != 13)))
+if((type->kind == 8 && type->_class && type->_class->registered && (type->_class->registered->type == 1000 || type->_class->registered->type == 2 || type->_class->registered->type == 4 || type->_class->registered->type == 3)) || (type->kind != 13 && type->kind != 22 && type->kind != 12 && type->kind != 8) || (!destType->byReference && byReference && (destType->kind != 13 || type->kind != 13)))
{
e->type = 4;
e->op.op = '*';
e->op.exp1 = (((void *)0));
e->op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
+e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+CopyTypeInto(e->expType, type);
+e->expType->byReference = 0x0;
+e->expType->refCount = 1;
}
else
{
e->cast.typeName = MkTypeName(specs, decl);
e->cast.exp = thisExp;
e->byReference = 0x1;
-}
e->expType = type;
-e->destType = destType;
type->refCount++;
+}
+e->destType = destType;
destType->refCount++;
}
}
void ProcessExpressionType(struct Expression * exp)
{
-void * __ecereTemp2;
-void * __ecereTemp1;
unsigned int unresolved = 0x0;
struct Location oldyylloc = yylloc;
unsigned int notByReference = 0x0;
exp->isConstant = 0x1;
if(symbol->isParam || !strcmp(id->string, "this"))
{
-if(_class && _class->type == 1)
+if(_class && _class->type == 1 && !type->declaredWithStruct)
exp->byReference = 0x1;
}
if(symbol->isIterator)
type->kind = 3;
}
exp->isConstant = 0x1;
+if(exp->destType && exp->destType->kind == 7)
+type->kind = 7;
+else if(exp->destType && exp->destType->kind == 6)
+type->kind = 6;
+else if(exp->destType && exp->destType->kind == 4)
+type->kind = 4;
}
break;
}
case 3:
{
exp->isConstant = 0x1;
-exp->expType = (__ecereTemp2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp2)->refCount = 1, ((struct Type *)__ecereTemp2)->kind = 13, ((struct Type *)__ecereTemp2)->type = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 1, ((struct Type *)__ecereTemp1)->constant = 0x1, ((struct Type *)__ecereTemp1)), ((struct Type *)__ecereTemp2));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 0x1, __ecereInstance1;
+}), __ecereInstance2;
+});
break;
}
case 13:
case 28:
ProcessExpressionType(exp->_new.size);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 13, ((struct Type *)__ecereTemp1)->type = ProcessType(exp->_new.typeName->qualifiers, exp->_new.typeName->declarator), ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->type = ProcessType(exp->_new.typeName->qualifiers, exp->_new.typeName->declarator), __ecereInstance1;
+});
DeclareType(exp->expType->type, 0x0, 0x0);
break;
case 14:
case 29:
ProcessExpressionType(exp->_renew.size);
ProcessExpressionType(exp->_renew.exp);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 13, ((struct Type *)__ecereTemp1)->type = ProcessType(exp->_renew.typeName->qualifiers, exp->_renew.typeName->declarator), ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->type = ProcessType(exp->_renew.typeName->qualifiers, exp->_renew.typeName->declarator), __ecereInstance1;
+});
DeclareType(exp->expType->type, 0x0, 0x0);
break;
case 4:
unsigned int useDestType = 0x0, useSideType = 0x0;
struct Location oldyylloc = yylloc;
unsigned int useSideUnit = 0x0;
-struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = (unsigned int)1, dummy->refCount = 1, dummy);
+struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
switch(exp->op.op)
{
FreeType(dummy);
exp->op.exp2->destType = (((void *)0));
}
+if(exp->op.op == '-' && !exp->op.exp1 && exp->op.exp2->expType && !exp->op.exp2->expType->isSigned)
+{
+type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+type2->refCount = 1;
+CopyTypeInto(type2, exp->op.exp2->expType);
+type2->isSigned = 0x1;
+}
+else if(exp->op.op == '~' && !exp->op.exp1 && exp->op.exp2->expType && (!exp->op.exp2->expType->isSigned || exp->op.exp2->expType->kind != 3))
+{
+type2 = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 3, __ecereInstance1;
+});
+type2->refCount = 1;
+type2->isSigned = 0x1;
+}
+else
type2 = exp->op.exp2->expType;
}
dummy->kind = 0;
if(exp->op.op == SIZEOF)
{
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
exp->isConstant = 0x1;
}
else if(exp->op.op == '*' && !exp->op.exp1)
{
if(MatchTypes(type1->type, type2->type, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0))
{
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
+});
success = 0x1;
if(type1->type->kind == 20)
{
{
struct Type * source = exp->index.exp->expType;
-if(source->kind == 8 && source->_class && source->_class->registered && source->_class->registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(source->_class->registered, containerClass) && source->_class->registered->templateArgs)
+if(source->kind == 8 && source->_class && source->_class->registered)
{
struct __ecereNameSpace__ecere__com__Class * _class = source->_class->registered;
+struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
+if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
+{
exp->expType = ProcessTypeString(_class->templateArgs[2].dataTypeString, 0x0);
if(exp->index.index && (*exp->index.index).last)
{
}
}
}
+}
for(e = (*exp->index.index).first; e; e = e->next)
{
if(!e->next && exp->index.exp->expType && exp->index.exp->expType->kind == 12 && exp->index.exp->expType->enumClass)
}
}
{
-struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = (unsigned int)1, dummy->refCount = 1, dummy);
+struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
if(!exp->call.exp->destType)
{
char typeString[1024];
typeString[0] = '\0';
+{
+struct Symbol * back = functionType->thisClass;
+
+functionType->thisClass = (((void *)0));
PrintType(functionType, typeString, 0x1, 0x1);
+functionType->thisClass = back;
+}
if(strstr(typeString, "thisclass"))
{
struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
e->destType = MkClassType(functionType->thisClass->string);
e = e->next;
}
-if(!functionType->staticMethod)
+if(!functionType->staticMethod && !functionType->extraParam)
{
if(memberExp && memberExp->member.exp && memberExp->member.exp->expType && memberExp->member.exp->expType->kind == 19 && memberExp->member.exp->expType->_class)
{
else if(!memberExp && (functionType->thisClass || (methodType && methodType->methodClass)))
{
type = MkClassType(functionType->thisClass ? functionType->thisClass->string : (methodType ? methodType->methodClass->fullName : (((void *)0))));
+type->byReference = functionType->byReference;
+type->typedByReference = functionType->typedByReference;
if(e)
{
+if(type->kind == 8 && (functionType && functionType->thisClass) && functionType->classObjectType == 2)
+e = e->next;
e->destType = type;
e = e->next;
type = functionType->params.first;
}
else
{
-functionType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 0, ((struct Type *)__ecereTemp1)->kind = 11, ((struct Type *)__ecereTemp1));
+functionType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
+});
if(exp->call.exp->type == 0)
{
char * string = exp->call.exp->identifier->string;
yylloc = exp->call.exp->identifier->loc;
if(strstr(string, "__builtin_") == string)
-;
+{
+if(exp->destType)
+{
+functionType->returnType = exp->destType;
+exp->destType->refCount++;
+}
+}
else
Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString(__thisModule, "%s undefined; assuming extern returning int\n", (((void *)0))), string);
-symbol = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), ((struct Symbol *)__ecereTemp1)->string = __ecereNameSpace__ecere__sys__CopyString(string), ((struct Symbol *)__ecereTemp1)->type = ProcessTypeString("int()", 0x1), ((struct Symbol *)__ecereTemp1));
+symbol = __extension__ ({
+struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+
+__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 0x1), __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
if(strstr(symbol->string, "::"))
globalContext->hasNameSpace = 0x1;
Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString(__thisModule, "callable object undefined; extern assuming returning int\n", (((void *)0))));
if(!functionType->returnType)
{
-functionType->returnType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1));
+functionType->returnType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
}
}
if(functionType && functionType->kind == 11)
{
struct Type * type;
struct Location oldyylloc = yylloc;
-unsigned int thisPtr = (exp->member.exp && exp->member.exp->type == 0 && !strcmp(exp->member.exp->identifier->string, "this"));
+unsigned int thisPtr;
+struct Expression * checkExp = exp->member.exp;
+while(checkExp)
+{
+if(checkExp->type == 11)
+checkExp = checkExp->cast.exp;
+else if(checkExp->type == 5)
+checkExp = checkExp->list ? (*checkExp->list).first : (((void *)0));
+else
+break;
+}
+thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->identifier->string, "this"));
exp->thisPtr = thisPtr;
if(exp->member.member && exp->member.member->_class && exp->member.member->_class->name)
{
}
if(type && (type->kind == 20))
;
-else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
+else if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15 || type->kind == 4 || type->kind == 2 || type->kind == 5 || type->kind == 1 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->type->kind == 1)))
{
struct Identifier * id = exp->member.member;
int typeKind = type->kind;
_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
typeKind = 8;
}
-if(id && (typeKind == 3 || typeKind == 15))
+if(id)
+{
+if(typeKind == 3 || typeKind == 15)
_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
+else if(!_class)
+{
+if(type->kind == 8 && type->_class && type->_class->registered)
+{
+_class = type->_class->registered;
+}
+else if((type->kind == 12 || type->kind == 13) && type->type && type->type->kind == 1)
+{
+_class = FindClass("char *")->registered;
+}
+else if(type->kind == 13)
+{
+_class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
+FreeType(exp->expType);
+exp->expType = ProcessTypeString("uintptr", 0x0);
+exp->byReference = 0x1;
+}
+else
+{
+char string[1024] = "";
+struct Symbol * classSym;
+
+PrintTypeNoConst(type, string, 0x0, 0x1);
+classSym = FindClass(string);
+if(classSym)
+_class = classSym->registered;
+}
+}
+}
if(_class && id)
{
struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
}
}
}
-if(!prop && !member)
+if(!prop && !member && !method)
method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
if(!prop && !member && !method)
{
}
else if(method)
{
-if(inCompiler)
{
exp->member.memberType = 2;
}
if(!method->dataType)
ProcessMethodType(method);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 16, ((struct Type *)__ecereTemp1)->method = method, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->method = method, __ecereInstance1;
+});
exp->expType->methodClass = (id && id->_class) ? _class : (((void *)0));
exp->expType->usedClass = _class;
}
basicType = ReplaceThisClassType(_class);
}
FreeType(exp->expType);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 13, ((struct Type *)__ecereTemp1)->type = basicType, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->type = basicType, __ecereInstance1;
+});
if(!exp->destType)
{
exp->destType = exp->expType;
}
}
}
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
break;
}
case 10:
{
struct Type * type = ProcessType(exp->typeName->qualifiers, exp->typeName->declarator);
-exp->expType = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 3, ((struct Type *)__ecereTemp1));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
+});
exp->isConstant = 0x1;
DeclareType(type, 0x0, 0x0);
FreeType(type);
{
struct Type * type = ProcessType(exp->cast.typeName->qualifiers, exp->cast.typeName->declarator);
-type->count = (unsigned int)1;
+type->count = 1;
FreeType(exp->cast.exp->destType);
exp->cast.exp->destType = type;
type->refCount++;
ProcessExpressionType(exp->cast.exp);
-type->count = (unsigned int)0;
+type->count = 0;
exp->expType = type;
if(!exp->cast.exp->needCast && !NeedCast(exp->cast.exp->expType, type))
{
{
struct Type * type = ProcessType(exp->initializer.typeName->qualifiers, exp->initializer.typeName->declarator);
-type->refCount++;
exp->expType = type;
break;
}
struct Type * type = ProcessType(exp->vaArg.typeName->qualifiers, exp->vaArg.typeName->declarator);
ProcessExpressionType(exp->vaArg.exp);
-type->refCount++;
exp->expType = type;
break;
}
exp->destType->refCount++;
}
ProcessStatement(exp->compound);
-exp->expType = ((struct Expression *)(*last->expressions).last)->expType;
-if(((struct Expression *)(*last->expressions).last)->expType)
+exp->expType = (last->expressions && (*last->expressions).last) ? ((struct Expression *)(*last->expressions).last)->expType : (((void *)0));
+if(exp->expType)
exp->expType->refCount++;
}
break;
if(type)
{
typeStringBuf[0] = '\0';
-PrintType(type, typeStringBuf, 0x0, 0x1);
+PrintTypeNoConst(type, typeStringBuf, 0x0, 0x1);
typeString = typeStringBuf;
FreeType(type);
type = (((void *)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, (void *)0), ((struct Expression *)__ecereTemp1))));
+ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
+struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
+
+__ecereInstance1->type = 2, __ecereInstance1->constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
+})));
ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->exp);
}
Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString(__thisModule, "couldn't determine type of %s\n", (((void *)0))), expString);
}
+if(inCompiler)
ApplyAnyObjectLogic(exp);
-if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->_class && exp->expType->_class->registered && exp->expType->_class->registered->type == 5)
+if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->_class && exp->expType->_class->registered && exp->expType->_class->registered->type == 5 && (!exp->destType || (exp->destType->kind != 3 && exp->destType->kind != 4 && exp->destType->kind != 22 && exp->destType->kind != 23 && exp->destType->kind != 5 && exp->destType->kind != 2 && exp->destType->kind != 1)))
{
exp->byReference = 0x1;
}
}
decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
stmt->compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
-ListAdd(stmt->compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorArray(PlugDeclarator(decl, MkDeclaratorIdentifier(MkIdentifier("__internalArray"))), (((void *)0))), MkInitializerList(initializers)))));
+ListAdd(stmt->compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
FreeList(exp, FreeExpression);
}
else
static void ProcessFunction(struct FunctionDefinition * function)
{
-void * __ecereTemp2;
-void * __ecereTemp1;
struct Identifier * id = GetDeclId(function->declarator);
struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
struct Type * type = symbol ? symbol->type : (((void *)0));
if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
}
-thisParam = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), ((struct TypeName *)__ecereTemp1)->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), ((struct TypeName *)__ecereTemp1)->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), ((struct TypeName *)__ecereTemp1));
+thisParam = __extension__ ({
+struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
+
+__ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->function.parameters), (((void *)0)), thisParam);
}
}
{
if(type->classObjectType != 1)
{
-thisSymbol = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), ((struct Symbol *)__ecereTemp1)->string = __ecereNameSpace__ecere__sys__CopyString("this"), ((struct Symbol *)__ecereTemp1)->type = classSym ? MkClassType(classSym->string) : (((void *)0)), ((struct Symbol *)__ecereTemp1));
+thisSymbol = __extension__ ({
+struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+
+__ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
if(typedObject && thisSymbol->type)
{
thisSymbol->type->classObjectType = 2;
thisSymbol->type->byReference = type->byReference;
+thisSymbol->type->typedByReference = type->byReference;
}
}
}
exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
}
exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
-exp->expType = (__ecereTemp2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp2)->refCount = 1, ((struct Type *)__ecereTemp2)->kind = 13, ((struct Type *)__ecereTemp2)->type = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), ((struct Type *)__ecereTemp1)->refCount = 1, ((struct Type *)__ecereTemp1)->kind = 0, ((struct Type *)__ecereTemp1)), ((struct Type *)__ecereTemp2));
+exp->expType = __extension__ ({
+struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->type = __extension__ ({
+struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
+
+__ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
+}), __ecereInstance2;
+});
if(function->body)
{
yylloc = function->body->loc;
void ComputeDataTypes()
{
-void * __ecereTemp1;
struct External * external;
struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
struct External * after = (((void *)0));
}
}
}
-temp->symbol = (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), ((struct Symbol *)__ecereTemp1)->id = -1000, ((struct Symbol *)__ecereTemp1)->idCode = -1000, ((struct Symbol *)__ecereTemp1));
+temp->symbol = __extension__ ({
+struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
+
+__ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
+});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
curExternal = temp;
DeclareFunctionUtil("eSystem_New");
extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* )(void * ), void (* )(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
{
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);