+/* Code generated from eC source file: pass15.ec */
#if defined(__GNUC__)
typedef long long int64;
typedef unsigned long long uint64;
int line;
int charPos;
int pos;
-unsigned int included;
+int included;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
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);
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))
{
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;
{
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;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 0x1);
MangleClassName(className);
+DeclareClass(classSym, className);
FreeExpContents(exp);
exp->type = 9;
exp->member.exp = MkExpIdentifier(MkIdentifier(className));
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++;
}
}
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;
}
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;
{
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)
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;
{
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)
{
{
thisSymbol->type->classObjectType = 2;
thisSymbol->type->byReference = type->byReference;
+thisSymbol->type->typedByReference = type->byReference;
}
}
}