1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
41 # define ecere_gcc_struct __attribute__((gcc_struct))
43 # define ecere_stdcall __stdcall
44 # define ecere_gcc_struct
47 # define ecere_stdcall
48 # define ecere_gcc_struct
51 #include <sys/types.h>
54 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373, BUILTIN_OFFSETOF = 374
57 extern int returnCode;
59 extern unsigned int yydebug;
61 extern unsigned int echoOn;
67 int expression_yyparse();
69 static char * thisNameSpace;
71 unsigned int thisClassParams = 1;
73 unsigned int internalValueCounter;
75 extern unsigned int outputLineNumbers;
77 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
79 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
81 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
83 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
89 extern int targetBits;
91 extern unsigned int inCompiler;
93 extern unsigned int inPreCompiler;
95 extern unsigned int inDebugger;
97 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
99 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
101 int UnescapeString(char * d, char * s, int len)
106 while(j < len && (ch = s[j]))
111 switch((ch = s[++j]))
157 char * OffsetEscapedString(char * s, int len, int offset)
162 while(j < len && k < offset && (ch = s[j]))
168 return (k == offset) ? s + j : (((void *)0));
171 extern int __ecereVMethodID_class_OnGetString;
173 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
175 extern unsigned int parseError;
177 static int definedExpStackPos;
179 static void * definedExpStack[512];
181 extern const char * sourceFile;
183 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
185 unsigned int reachedPass15;
187 extern unsigned int memoryGuard;
189 struct __ecereNameSpace__ecere__sys__OldList
198 struct __ecereNameSpace__ecere__com__DataValue
213 } ecere_gcc_struct __anon1;
216 struct __ecereNameSpace__ecere__com__SerialBuffer
218 unsigned char * _buffer;
224 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
226 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
228 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
230 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
232 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
240 struct TemplateArgument;
256 extern size_t strlen(const char * );
258 extern int strcmp(const char * , const char * );
260 extern int sprintf(char * , const char * , ...);
262 extern char * strcat(char * , const char * );
264 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
266 extern int isprint(int c);
268 extern char * strcpy(char * , const char * );
270 extern void Compiler_Error(const char * format, ...);
272 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
274 struct __ecereNameSpace__ecere__com__LinkList
281 extern char * strchr(const char * , int);
283 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
285 extern void * memcpy(void * , const void * , size_t size);
287 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
289 extern void Compiler_Warning(const char * format, ...);
291 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
293 extern long long strtoll(const char * nptr, char * * endptr, int base);
295 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
297 extern int strtol(const char * , char * * , int base);
299 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
301 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
303 extern double strtod(const char * , char * * );
305 extern int strncmp(const char * , const char * , size_t n);
307 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
309 extern char * QMkString(const char * source);
311 extern char * strncpy(char * , const char * , size_t n);
313 extern int printf(const char * , ...);
315 extern char * strstr(const char * , const char * );
317 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
319 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
321 extern int (* __ecereProp_float_Get_signBit)(float this);
323 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
325 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
327 extern int (* __ecereProp_double_Get_signBit)(double this);
329 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
331 extern float (* __ecereMethod_float_inf)(void);
333 extern float (* __ecereMethod_float_nan)(void);
335 extern double (* __ecereMethod_double_inf)(void);
337 extern double (* __ecereMethod_double_nan)(void);
339 int __ecereVMethodID_class_OnGetString;
341 void SetYydebug(unsigned int b)
346 unsigned int GetParseError()
351 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
353 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
355 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
357 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
359 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
361 struct __ecereNameSpace__ecere__com__EnumClassData
363 struct __ecereNameSpace__ecere__sys__OldList values;
367 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
369 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
371 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
373 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
375 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
377 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
379 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
381 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
385 struct CodePosition start;
386 struct CodePosition end;
389 void ReadString(char * output, char * string)
391 int len = strlen(string);
393 unsigned int quoted = 0, escaped = 0;
395 for(c = 0; c < len; c++)
455 char * PrintInt(long long result)
459 if(result > (((int)0x7fffffff)))
460 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
462 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
463 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
465 return __ecereNameSpace__ecere__sys__CopyString(temp);
468 char * PrintUInt(uint64 result)
472 if(result > (0xffffffff))
473 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
474 else if(result > (((int)0x7fffffff)))
475 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
477 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
478 return __ecereNameSpace__ecere__sys__CopyString(temp);
481 char * PrintInt64(long long result)
485 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
486 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
488 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
489 return __ecereNameSpace__ecere__sys__CopyString(temp);
492 char * PrintUInt64(uint64 result)
496 if(result > (0xffffffff))
497 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
498 else if(result > (((int)0x7fffffff)))
499 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
501 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
502 return __ecereNameSpace__ecere__sys__CopyString(temp);
505 char * PrintHexUInt(uint64 result)
509 if(result > (0xffffffff))
510 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
513 if(result > (0xffffffff))
515 return __ecereNameSpace__ecere__sys__CopyString(temp);
518 char * PrintHexUInt64(uint64 result)
522 if(result > (0xffffffff))
523 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
525 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
526 return __ecereNameSpace__ecere__sys__CopyString(temp);
529 char * PrintShort(short result)
533 sprintf(temp, "%d", (unsigned short)result);
534 return __ecereNameSpace__ecere__sys__CopyString(temp);
537 char * PrintUShort(unsigned short result)
542 sprintf(temp, "0x%X", (int)result);
544 sprintf(temp, "%d", (int)result);
545 return __ecereNameSpace__ecere__sys__CopyString(temp);
548 char * PrintUChar(unsigned char result)
552 sprintf(temp, "0x%X", result);
553 return __ecereNameSpace__ecere__sys__CopyString(temp);
556 char * PrintChar(char result)
560 if(result > 0 && isprint(result))
561 sprintf(temp, "'%c'", result);
563 sprintf(temp, "%d", (int)result);
565 sprintf(temp, "0x%X", (unsigned char)result);
566 return __ecereNameSpace__ecere__sys__CopyString(temp);
569 char * PrintFloat(float result)
573 if(__ecereProp_float_Get_isInf(result))
575 if(__ecereProp_float_Get_signBit(result))
576 strcpy(temp, "-inf");
580 else if(__ecereProp_float_Get_isNan(result))
582 if(__ecereProp_float_Get_signBit(result))
583 strcpy(temp, "-nan");
588 sprintf(temp, "%.16ff", result);
589 return __ecereNameSpace__ecere__sys__CopyString(temp);
592 char * PrintDouble(double result)
596 if(__ecereProp_double_Get_isInf(result))
598 if(__ecereProp_double_Get_signBit(result))
599 strcpy(temp, "-inf");
603 else if(__ecereProp_double_Get_isNan(result))
605 if(__ecereProp_double_Get_signBit(result))
606 strcpy(temp, "-nan");
611 sprintf(temp, "%.16f", result);
612 return __ecereNameSpace__ecere__sys__CopyString(temp);
615 extern struct Location yylloc;
624 struct Attrib * attr;
625 } ecere_gcc_struct __anon1;
628 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
632 extern struct Expression * parsedExpression;
634 extern struct Expression * QMkExpId(const char * id);
636 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
638 void ComputeExpression(struct Expression * exp);
640 extern struct Expression * MkExpConstant(const char * string);
642 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
644 extern void FreeExpression(struct Expression * exp);
646 extern void FreeExpContents(struct Expression * exp);
648 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
650 extern struct Expression * CopyExpression(struct Expression * exp);
652 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
654 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
656 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
658 extern struct Expression * MoveExpContents(struct Expression * exp);
660 extern struct Expression * QBrackets(struct Expression * exp);
662 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
666 static struct Statement * curCompound;
668 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
670 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
672 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
674 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
676 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
678 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
682 struct External * curExternal, * afterExternal;
684 extern void FreeExternal(struct External * external);
688 static struct Type * curSwitchType;
690 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
692 extern void FreeType(struct Type * type);
694 extern struct Type * MkClassType(const char * name);
696 extern void CopyTypeInto(struct Type * type, struct Type * src);
698 struct __ecereNameSpace__ecere__com__Class;
700 struct __ecereNameSpace__ecere__com__Instance
703 struct __ecereNameSpace__ecere__com__Class * _class;
707 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
709 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
711 static struct __ecereNameSpace__ecere__com__Class * currentClass;
713 struct __ecereNameSpace__ecere__com__Class * thisClass;
715 struct __ecereNameSpace__ecere__com__Class * containerClass;
717 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
719 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
721 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
723 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
725 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
727 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
729 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
733 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
735 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
737 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
739 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
744 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
751 extern struct Context * curContext;
753 extern struct Context * topContext;
755 extern struct Context * PushContext(void);
757 extern void PopContext(struct Context * ctx);
759 extern void FreeContext(struct Context * context);
761 extern struct Context * globalContext;
765 extern struct ModuleImport * mainModule;
769 struct ModuleImport * prev;
770 struct ModuleImport * next;
772 struct __ecereNameSpace__ecere__sys__OldList classes;
773 struct __ecereNameSpace__ecere__sys__OldList functions;
778 struct __ecereNameSpace__ecere__com__NameSpace;
780 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
782 struct FunctionDefinition;
784 static struct FunctionDefinition * curFunction;
786 struct __ecereNameSpace__ecere__sys__BTNode;
788 struct __ecereNameSpace__ecere__sys__BTNode
791 struct __ecereNameSpace__ecere__sys__BTNode * parent;
792 struct __ecereNameSpace__ecere__sys__BTNode * left;
793 struct __ecereNameSpace__ecere__sys__BTNode * right;
797 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
799 struct __ecereNameSpace__ecere__com__Property;
801 struct __ecereNameSpace__ecere__com__Property
803 struct __ecereNameSpace__ecere__com__Property * prev;
804 struct __ecereNameSpace__ecere__com__Property * next;
806 unsigned int isProperty;
809 struct __ecereNameSpace__ecere__com__Class * _class;
810 const char * dataTypeString;
811 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
812 struct Type * dataType;
813 void (* Set)(void * , int);
814 int (* Get)(void * );
815 unsigned int (* IsSet)(void * );
819 unsigned int conversion;
820 unsigned int watcherOffset;
821 const char * category;
822 unsigned int compiled;
823 unsigned int selfWatchable;
824 unsigned int isWatchable;
827 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
829 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
831 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
833 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
837 extern void FreeIdentifier(struct Identifier * id);
839 extern struct Identifier * MkIdentifier(const char * string);
841 extern struct Expression * MkExpIdentifier(struct Identifier * id);
843 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
845 extern struct Identifier * CopyIdentifier(struct Identifier * id);
847 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
849 struct __ecereNameSpace__ecere__sys__OldLink;
851 struct __ecereNameSpace__ecere__sys__OldLink
853 struct __ecereNameSpace__ecere__sys__OldLink * prev;
854 struct __ecereNameSpace__ecere__sys__OldLink * next;
860 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
862 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
866 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
868 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
870 extern struct Specifier * MkSpecifier(int specifier);
872 extern struct Specifier * MkSpecifierName(const char * name);
874 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
876 extern void FreeSpecifier(struct Specifier * spec);
878 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
882 struct Statement * prev;
883 struct Statement * next;
888 struct __ecereNameSpace__ecere__sys__OldList * expressions;
891 struct Identifier * id;
892 struct Statement * stmt;
893 } ecere_gcc_struct labeled;
896 struct Expression * exp;
897 struct Statement * stmt;
898 } ecere_gcc_struct caseStmt;
901 struct __ecereNameSpace__ecere__sys__OldList * declarations;
902 struct __ecereNameSpace__ecere__sys__OldList * statements;
903 struct Context * context;
904 unsigned int isSwitch;
905 } ecere_gcc_struct compound;
908 struct __ecereNameSpace__ecere__sys__OldList * exp;
909 struct Statement * stmt;
910 struct Statement * elseStmt;
911 } ecere_gcc_struct ifStmt;
914 struct __ecereNameSpace__ecere__sys__OldList * exp;
915 struct Statement * stmt;
916 } ecere_gcc_struct switchStmt;
919 struct __ecereNameSpace__ecere__sys__OldList * exp;
920 struct Statement * stmt;
921 } ecere_gcc_struct whileStmt;
924 struct __ecereNameSpace__ecere__sys__OldList * exp;
925 struct Statement * stmt;
926 } ecere_gcc_struct doWhile;
929 struct Statement * init;
930 struct Statement * check;
931 struct __ecereNameSpace__ecere__sys__OldList * increment;
932 struct Statement * stmt;
933 } ecere_gcc_struct forStmt;
936 struct Identifier * id;
937 } ecere_gcc_struct gotoStmt;
940 struct Specifier * spec;
942 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
943 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
944 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
945 } ecere_gcc_struct asmStmt;
948 struct Expression * watcher;
949 struct Expression * object;
950 struct __ecereNameSpace__ecere__sys__OldList * watches;
951 } ecere_gcc_struct _watch;
954 struct Identifier * id;
955 struct __ecereNameSpace__ecere__sys__OldList * exp;
956 struct __ecereNameSpace__ecere__sys__OldList * filter;
957 struct Statement * stmt;
958 } ecere_gcc_struct forEachStmt;
959 struct Declaration * decl;
960 } ecere_gcc_struct __anon1;
963 extern struct Specifier * CopySpecifier(struct Specifier * spec);
965 extern struct Expression * MkExpClassSize(struct Specifier * _class);
971 struct Identifier * prev;
972 struct Identifier * next;
974 struct Symbol * classSym;
975 struct Specifier * _class;
977 struct Identifier * badID;
980 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
982 extern struct Symbol * FindClass(const char * name);
984 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
986 extern struct Symbol * FindType(struct Context * ctx, const char * name);
988 extern void FreeSymbol(struct Symbol * symbol);
992 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
994 extern void FreeClassDef(struct ClassDef * def);
998 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1000 struct TemplateDatatype
1002 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1003 struct Declarator * decl;
1006 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1008 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1010 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1012 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1014 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1018 struct Declarator * prev;
1019 struct Declarator * next;
1020 struct Location loc;
1022 struct Symbol * symbol;
1023 struct Declarator * declarator;
1026 struct Identifier * identifier;
1029 struct Expression * exp;
1030 struct Expression * posExp;
1031 struct Attrib * attrib;
1032 } ecere_gcc_struct structDecl;
1035 struct Expression * exp;
1036 struct Specifier * enumClass;
1037 } ecere_gcc_struct array;
1040 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1041 } ecere_gcc_struct function;
1044 struct Pointer * pointer;
1045 } ecere_gcc_struct pointer;
1048 struct ExtDecl * extended;
1049 } ecere_gcc_struct extended;
1050 } ecere_gcc_struct __anon1;
1053 extern struct Identifier * GetDeclId(struct Declarator * decl);
1055 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1057 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1059 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1061 extern void FreeDeclarator(struct Declarator * decl);
1063 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1065 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1067 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1069 struct FunctionDefinition
1071 struct FunctionDefinition * prev;
1072 struct FunctionDefinition * next;
1073 struct Location loc;
1074 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1075 struct Declarator * declarator;
1076 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1077 struct Statement * body;
1078 struct __ecereNameSpace__ecere__com__Class * _class;
1079 struct __ecereNameSpace__ecere__sys__OldList attached;
1082 struct Symbol * propSet;
1084 unsigned int propertyNoThis;
1087 extern struct Declarator * QMkPtrDecl(const char * id);
1089 struct ClassFunction;
1091 struct ClassFunction
1093 struct ClassFunction * prev;
1094 struct ClassFunction * next;
1095 struct Location loc;
1096 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1097 struct Declarator * declarator;
1098 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1099 struct Statement * body;
1100 struct __ecereNameSpace__ecere__com__Class * _class;
1101 struct __ecereNameSpace__ecere__sys__OldList attached;
1104 struct Symbol * propSet;
1105 unsigned int isVirtual;
1106 unsigned int isConstructor;
1107 unsigned int isDestructor;
1108 unsigned int dontMangle;
1113 extern struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic);
1115 extern void FreeClassFunction(struct ClassFunction * func);
1117 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1119 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1123 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1125 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1129 struct TypeName * prev;
1130 struct TypeName * next;
1131 struct Location loc;
1132 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1133 struct Declarator * declarator;
1134 int classObjectType;
1135 struct Expression * bitCount;
1138 extern void FreeTypeName(struct TypeName * typeName);
1140 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1142 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1144 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1146 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1148 struct __ecereNameSpace__ecere__com__BTNamedLink;
1150 struct __ecereNameSpace__ecere__com__BTNamedLink
1153 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1154 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1155 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1160 struct __ecereNameSpace__ecere__sys__NamedLink64;
1162 struct __ecereNameSpace__ecere__sys__NamedLink64
1164 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1165 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1170 struct Instantiation;
1174 struct Declaration * prev;
1175 struct Declaration * next;
1176 struct Location loc;
1182 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1183 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1184 } ecere_gcc_struct __anon1;
1185 struct Instantiation * inst;
1188 struct Identifier * id;
1189 struct Expression * exp;
1190 } ecere_gcc_struct __anon2;
1191 } ecere_gcc_struct __anon1;
1192 struct Specifier * extStorage;
1193 struct Symbol * symbol;
1197 struct Instantiation
1199 struct Instantiation * prev;
1200 struct Instantiation * next;
1201 struct Location loc;
1202 struct Specifier * _class;
1203 struct Expression * exp;
1204 struct __ecereNameSpace__ecere__sys__OldList * members;
1205 struct Symbol * symbol;
1206 unsigned int fullSet;
1207 unsigned int isConstant;
1208 unsigned char * data;
1209 struct Location nameLoc;
1210 struct Location insideLoc;
1214 extern void FreeInstance(struct Instantiation * inst);
1216 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1218 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1220 struct InitDeclarator;
1222 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1224 struct PropertyWatch;
1226 struct PropertyWatch
1228 struct PropertyWatch * prev;
1229 struct PropertyWatch * next;
1230 struct Location loc;
1231 struct Statement * compound;
1232 struct __ecereNameSpace__ecere__sys__OldList * properties;
1233 unsigned int deleteWatch;
1236 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1238 struct PropertyImport;
1240 struct PropertyImport
1242 struct PropertyImport * prev;
1243 struct PropertyImport * next;
1245 unsigned int isVirtual;
1246 unsigned int hasSet;
1247 unsigned int hasGet;
1250 struct MethodImport;
1254 struct MethodImport * prev;
1255 struct MethodImport * next;
1257 unsigned int isVirtual;
1260 struct FunctionImport;
1262 struct FunctionImport
1264 struct FunctionImport * prev;
1265 struct FunctionImport * next;
1273 struct ClassImport * prev;
1274 struct ClassImport * next;
1276 struct __ecereNameSpace__ecere__sys__OldList methods;
1277 struct __ecereNameSpace__ecere__sys__OldList properties;
1278 unsigned int itself;
1286 struct Expression * prev;
1287 struct Expression * next;
1288 struct Location loc;
1295 struct Identifier * identifier;
1296 } ecere_gcc_struct __anon1;
1297 struct Statement * compound;
1298 struct Instantiation * instance;
1302 unsigned int intlString;
1303 unsigned int wideString;
1304 } ecere_gcc_struct __anon2;
1305 struct __ecereNameSpace__ecere__sys__OldList * list;
1308 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1309 struct Declarator * decl;
1310 } ecere_gcc_struct _classExp;
1313 struct Identifier * id;
1314 } ecere_gcc_struct classData;
1317 struct Expression * exp;
1318 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1319 struct Location argLoc;
1320 } ecere_gcc_struct call;
1323 struct Expression * exp;
1324 struct __ecereNameSpace__ecere__sys__OldList * index;
1325 } ecere_gcc_struct index;
1328 struct Expression * exp;
1329 struct Identifier * member;
1331 unsigned int thisPtr;
1332 } ecere_gcc_struct member;
1336 struct Expression * exp1;
1337 struct Expression * exp2;
1338 } ecere_gcc_struct op;
1339 struct TypeName * typeName;
1340 struct Specifier * _class;
1343 struct TypeName * typeName;
1344 struct Expression * exp;
1345 } ecere_gcc_struct cast;
1348 struct Expression * cond;
1349 struct __ecereNameSpace__ecere__sys__OldList * exp;
1350 struct Expression * elseExp;
1351 } ecere_gcc_struct cond;
1354 struct TypeName * typeName;
1355 struct Expression * size;
1356 } ecere_gcc_struct _new;
1359 struct TypeName * typeName;
1360 struct Expression * size;
1361 struct Expression * exp;
1362 } ecere_gcc_struct _renew;
1366 struct Identifier * id;
1367 } ecere_gcc_struct db;
1370 struct Expression * ds;
1371 struct Expression * name;
1372 } ecere_gcc_struct dbopen;
1375 struct TypeName * typeName;
1376 struct Initializer * initializer;
1377 } ecere_gcc_struct initializer;
1380 struct Expression * exp;
1381 struct TypeName * typeName;
1382 } ecere_gcc_struct vaArg;
1385 struct TypeName * typeName;
1386 struct Identifier * id;
1387 } ecere_gcc_struct offset;
1388 } ecere_gcc_struct __anon1;
1389 unsigned int debugValue;
1390 struct __ecereNameSpace__ecere__com__DataValue val;
1392 unsigned int hasAddress;
1393 struct Type * expType;
1394 struct Type * destType;
1397 unsigned int byReference;
1398 unsigned int isConstant;
1399 unsigned int addedThis;
1400 unsigned int needCast;
1401 unsigned int thisPtr;
1402 unsigned int opDestType;
1403 unsigned int usedInComparison;
1404 unsigned int ambiguousUnits;
1405 unsigned int parentOpDestType;
1406 unsigned int needTemplateCast;
1409 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1413 struct Initializer * prev;
1414 struct Initializer * next;
1415 struct Location loc;
1419 struct Expression * exp;
1420 struct __ecereNameSpace__ecere__sys__OldList * list;
1421 } ecere_gcc_struct __anon1;
1422 unsigned int isConstant;
1423 struct Identifier * id;
1426 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1428 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1430 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1432 struct InitDeclarator
1434 struct InitDeclarator * prev;
1435 struct InitDeclarator * next;
1436 struct Location loc;
1437 struct Declarator * declarator;
1438 struct Initializer * initializer;
1441 void ApplyLocation(struct Expression * exp, struct Location * loc)
1447 if(exp->__anon1.op.exp1)
1448 ApplyLocation(exp->__anon1.op.exp1, loc);
1449 if(exp->__anon1.op.exp2)
1450 ApplyLocation(exp->__anon1.op.exp2, loc);
1453 if(exp->__anon1.list)
1455 struct Expression * e;
1457 for(e = (*exp->__anon1.list).first; e; e = e->next)
1458 ApplyLocation(e, loc);
1462 if(exp->__anon1.index.index)
1464 struct Expression * e;
1466 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1467 ApplyLocation(e, loc);
1469 if(exp->__anon1.index.exp)
1470 ApplyLocation(exp->__anon1.index.exp, loc);
1473 if(exp->__anon1.call.arguments)
1475 struct Expression * arg;
1477 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1478 ApplyLocation(arg, loc);
1480 if(exp->__anon1.call.exp)
1481 ApplyLocation(exp->__anon1.call.exp, loc);
1485 if(exp->__anon1.member.exp)
1486 ApplyLocation(exp->__anon1.member.exp, loc);
1489 if(exp->__anon1.cast.exp)
1490 ApplyLocation(exp->__anon1.cast.exp, loc);
1493 if(exp->__anon1.cond.exp)
1495 struct Expression * e;
1497 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1498 ApplyLocation(e, loc);
1500 if(exp->__anon1.cond.cond)
1501 ApplyLocation(exp->__anon1.cond.cond, loc);
1502 if(exp->__anon1.cond.elseExp)
1503 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1506 if(exp->__anon1.vaArg.exp)
1507 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1514 void __ecereMethod_Expression_Clear();
1520 struct MembersInit * prev;
1521 struct MembersInit * next;
1522 struct Location loc;
1526 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1527 struct ClassFunction * function;
1528 } ecere_gcc_struct __anon1;
1531 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1537 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* Neg)(struct Expression *, struct Operand *);
1543 unsigned int (* Inc)(struct Expression *, struct Operand *);
1544 unsigned int (* Dec)(struct Expression *, struct Operand *);
1545 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1553 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1554 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1555 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1557 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1559 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1560 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1561 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1562 unsigned int (* Not)(struct Expression *, struct Operand *);
1563 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1564 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1565 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1566 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1567 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1568 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1569 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1570 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1571 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1578 unsigned int ptrSize;
1591 } ecere_gcc_struct __anon1;
1595 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1597 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1599 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1602 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1604 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1606 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1609 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1611 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1614 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1616 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1618 _PrintType(type, string, printName, fullName, 1);
1621 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1623 _PrintType(type, string, printName, fullName, 0);
1626 struct __ecereNameSpace__ecere__com__Method;
1628 struct __ecereNameSpace__ecere__com__Method
1631 struct __ecereNameSpace__ecere__com__Method * parent;
1632 struct __ecereNameSpace__ecere__com__Method * left;
1633 struct __ecereNameSpace__ecere__com__Method * right;
1638 struct __ecereNameSpace__ecere__com__Class * _class;
1640 const char * dataTypeString;
1641 struct Type * dataType;
1648 struct Symbol * parent;
1649 struct Symbol * left;
1650 struct Symbol * right;
1655 struct __ecereNameSpace__ecere__com__Method * method;
1656 struct __ecereNameSpace__ecere__com__Property * _property;
1657 struct __ecereNameSpace__ecere__com__Class * registered;
1658 } ecere_gcc_struct __anon1;
1659 unsigned int notYetDeclared;
1664 struct External * pointerExternal;
1665 struct External * structExternal;
1666 } ecere_gcc_struct __anon1;
1669 struct External * externalGet;
1670 struct External * externalSet;
1671 struct External * externalPtr;
1672 struct External * externalIsSet;
1673 } ecere_gcc_struct __anon2;
1676 struct External * methodExternal;
1677 struct External * methodCodeExternal;
1678 } ecere_gcc_struct __anon3;
1679 } ecere_gcc_struct __anon2;
1680 unsigned int imported;
1681 unsigned int declaredStructSym;
1682 struct __ecereNameSpace__ecere__com__Class * _class;
1683 unsigned int declaredStruct;
1684 unsigned int needConstructor;
1685 unsigned int needDestructor;
1686 char * constructorName;
1689 char * destructorName;
1690 struct ModuleImport * module;
1691 struct ClassImport * _import;
1692 struct Location nameLoc;
1693 unsigned int isParam;
1694 unsigned int isRemote;
1695 unsigned int isStruct;
1696 unsigned int fireWatchersDone;
1698 unsigned int classData;
1699 unsigned int isStatic;
1701 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1702 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1703 struct Context * ctx;
1705 struct Expression * propCategory;
1706 unsigned int mustRegister;
1709 struct __ecereNameSpace__ecere__com__ClassProperty;
1711 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1713 struct __ecereNameSpace__ecere__com__ClassProperty
1716 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1717 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1718 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1720 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1721 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1722 const char * dataTypeString;
1723 struct Type * dataType;
1724 unsigned int constant;
1727 struct __ecereNameSpace__ecere__com__BitMember;
1729 struct __ecereNameSpace__ecere__com__BitMember
1731 struct __ecereNameSpace__ecere__com__BitMember * prev;
1732 struct __ecereNameSpace__ecere__com__BitMember * next;
1734 unsigned int isProperty;
1737 struct __ecereNameSpace__ecere__com__Class * _class;
1738 const char * dataTypeString;
1739 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1740 struct Type * dataType;
1747 struct __ecereNameSpace__ecere__com__DataMember;
1749 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1755 const char * dataTypeString;
1756 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1757 } ecere_gcc_struct __anon1;
1758 struct __ecereNameSpace__ecere__com__DataValue expression;
1761 const char * memberString;
1764 struct __ecereNameSpace__ecere__com__DataMember * member;
1765 struct __ecereNameSpace__ecere__com__Property * prop;
1766 struct __ecereNameSpace__ecere__com__Method * method;
1767 } ecere_gcc_struct __anon1;
1768 } ecere_gcc_struct __anon2;
1769 } ecere_gcc_struct __anon1;
1772 extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
1774 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
1776 struct TemplateParameter;
1778 struct TemplateParameter
1780 struct TemplateParameter * prev;
1781 struct TemplateParameter * next;
1782 struct Location loc;
1784 struct Identifier * identifier;
1787 struct TemplateDatatype * dataType;
1789 } ecere_gcc_struct __anon1;
1790 struct TemplateArgument * defaultArgument;
1791 const char * dataTypeString;
1792 struct Type * baseType;
1802 struct Symbol * _class;
1805 struct __ecereNameSpace__ecere__sys__OldList members;
1807 } ecere_gcc_struct __anon1;
1810 struct Type * returnType;
1811 struct __ecereNameSpace__ecere__sys__OldList params;
1812 struct Symbol * thisClass;
1813 unsigned int staticMethod;
1814 struct TemplateParameter * thisClassTemplate;
1815 } ecere_gcc_struct __anon2;
1818 struct __ecereNameSpace__ecere__com__Method * method;
1819 struct __ecereNameSpace__ecere__com__Class * methodClass;
1820 struct __ecereNameSpace__ecere__com__Class * usedClass;
1821 } ecere_gcc_struct __anon3;
1824 struct Type * arrayType;
1826 struct Expression * arraySizeExp;
1827 unsigned int freeExp;
1828 struct Symbol * enumClass;
1829 } ecere_gcc_struct __anon4;
1831 struct TemplateParameter * templateParameter;
1832 } ecere_gcc_struct __anon1;
1837 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1839 int classObjectType;
1841 unsigned int offset;
1845 unsigned int isSigned : 1;
1846 unsigned int constant : 1;
1847 unsigned int truth : 1;
1848 unsigned int byReference : 1;
1849 unsigned int extraParam : 1;
1850 unsigned int directClassAccess : 1;
1851 unsigned int computing : 1;
1852 unsigned int keepCast : 1;
1853 unsigned int passAsTemplate : 1;
1854 unsigned int dllExport : 1;
1855 unsigned int attrStdcall : 1;
1856 unsigned int declaredWithStruct : 1;
1857 unsigned int typedByReference : 1;
1858 unsigned int casted : 1;
1859 unsigned int pointerAlignment : 1;
1860 unsigned int isLong : 1;
1861 unsigned int signedBeforePromotion : 1;
1866 struct Specifier * prev;
1867 struct Specifier * next;
1868 struct Location loc;
1875 struct ExtDecl * extDecl;
1877 struct Symbol * symbol;
1878 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1879 struct Specifier * nsSpec;
1880 } ecere_gcc_struct __anon1;
1883 struct Identifier * id;
1884 struct __ecereNameSpace__ecere__sys__OldList * list;
1885 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1886 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1887 unsigned int addNameSpace;
1888 struct Context * ctx;
1889 struct ExtDecl * extDeclStruct;
1890 } ecere_gcc_struct __anon2;
1891 struct Expression * expression;
1892 struct Specifier * _class;
1893 struct TemplateParameter * templateParameter;
1894 } ecere_gcc_struct __anon1;
1897 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1899 struct TemplatedType
1902 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1903 struct __ecereNameSpace__ecere__sys__BTNode * left;
1904 struct __ecereNameSpace__ecere__sys__BTNode * right;
1906 struct TemplateParameter * param;
1909 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1911 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1913 if(!param->baseType)
1915 if(param->dataTypeString)
1916 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1918 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1920 return param->baseType;
1922 return (((void *)0));
1925 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1927 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1929 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1933 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1944 if(type1->passAsTemplate && !type2->passAsTemplate)
1946 return type1->isSigned != type2->isSigned;
1948 return type1->__anon1._class != type2->__anon1._class;
1950 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1958 unsigned int GetOpInt(struct Operand * op2, int * value2)
1960 if(op2->kind == 3 && op2->type->isSigned)
1961 *value2 = op2->__anon1.i;
1962 else if(op2->kind == 3)
1963 *value2 = (int)op2->__anon1.ui;
1964 else if(op2->kind == 4 && op2->type->isSigned)
1965 *value2 = (int)op2->__anon1.i64;
1966 else if(op2->kind == 4)
1967 *value2 = (int)op2->__anon1.ui64;
1968 else if(op2->kind == 23 && op2->type->isSigned)
1969 *value2 = (int)op2->__anon1.i64;
1970 else if(op2->kind == 23)
1971 *value2 = (int)op2->__anon1.ui64;
1972 else if(op2->kind == 22 && op2->type->isSigned)
1973 *value2 = (int)op2->__anon1.i64;
1974 else if(op2->kind == 22)
1975 *value2 = (int)op2->__anon1.ui64;
1976 else if(op2->kind == 2 && op2->type->isSigned)
1977 *value2 = (int)op2->__anon1.s;
1978 else if(op2->kind == 2)
1979 *value2 = (int)op2->__anon1.us;
1980 else if(op2->kind == 1 && op2->type->isSigned)
1981 *value2 = (int)op2->__anon1.c;
1982 else if(op2->kind == 24 || op2->kind == 1)
1983 *value2 = (int)op2->__anon1.uc;
1984 else if(op2->kind == 6)
1985 *value2 = (int)op2->__anon1.f;
1986 else if(op2->kind == 7)
1987 *value2 = (int)op2->__anon1.d;
1988 else if(op2->kind == 13)
1989 *value2 = (int)op2->__anon1.ui64;
1995 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1997 if(op2->kind == 3 && op2->type->isSigned)
1998 *value2 = (unsigned int)op2->__anon1.i;
1999 else if(op2->kind == 3)
2000 *value2 = op2->__anon1.ui;
2001 else if(op2->kind == 4 && op2->type->isSigned)
2002 *value2 = (unsigned int)op2->__anon1.i64;
2003 else if(op2->kind == 4)
2004 *value2 = (unsigned int)op2->__anon1.ui64;
2005 else if(op2->kind == 23 && op2->type->isSigned)
2006 *value2 = (unsigned int)op2->__anon1.i64;
2007 else if(op2->kind == 23)
2008 *value2 = (unsigned int)op2->__anon1.ui64;
2009 else if(op2->kind == 22 && op2->type->isSigned)
2010 *value2 = (unsigned int)op2->__anon1.i64;
2011 else if(op2->kind == 22)
2012 *value2 = (unsigned int)op2->__anon1.ui64;
2013 else if(op2->kind == 2 && op2->type->isSigned)
2014 *value2 = (unsigned int)op2->__anon1.s;
2015 else if(op2->kind == 2)
2016 *value2 = (unsigned int)op2->__anon1.us;
2017 else if(op2->kind == 1 && op2->type->isSigned)
2018 *value2 = (unsigned int)op2->__anon1.c;
2019 else if(op2->kind == 24 || op2->kind == 1)
2020 *value2 = (unsigned int)op2->__anon1.uc;
2021 else if(op2->kind == 6)
2022 *value2 = (unsigned int)op2->__anon1.f;
2023 else if(op2->kind == 7)
2024 *value2 = (unsigned int)op2->__anon1.d;
2025 else if(op2->kind == 13)
2026 *value2 = (unsigned int)op2->__anon1.ui64;
2032 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2034 if(op2->kind == 3 && op2->type->isSigned)
2035 *value2 = (long long)op2->__anon1.i;
2036 else if(op2->kind == 3)
2037 *value2 = (long long)op2->__anon1.ui;
2038 else if(op2->kind == 4 && op2->type->isSigned)
2039 *value2 = op2->__anon1.i64;
2040 else if(op2->kind == 4)
2041 *value2 = (long long)op2->__anon1.ui64;
2042 else if(op2->kind == 23 && op2->type->isSigned)
2043 *value2 = op2->__anon1.i64;
2044 else if(op2->kind == 23)
2045 *value2 = (long long)op2->__anon1.ui64;
2046 else if(op2->kind == 22 && op2->type->isSigned)
2047 *value2 = op2->__anon1.i64;
2048 else if(op2->kind == 22)
2049 *value2 = (long long)op2->__anon1.ui64;
2050 else if(op2->kind == 2 && op2->type->isSigned)
2051 *value2 = (long long)op2->__anon1.s;
2052 else if(op2->kind == 2)
2053 *value2 = (long long)op2->__anon1.us;
2054 else if(op2->kind == 1 && op2->type->isSigned)
2055 *value2 = (long long)op2->__anon1.c;
2056 else if(op2->kind == 24 || op2->kind == 1)
2057 *value2 = (long long)op2->__anon1.uc;
2058 else if(op2->kind == 6)
2059 *value2 = (long long)op2->__anon1.f;
2060 else if(op2->kind == 7)
2061 *value2 = (long long)op2->__anon1.d;
2062 else if(op2->kind == 13)
2063 *value2 = (long long)op2->__anon1.ui64;
2069 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2071 if(op2->kind == 3 && op2->type->isSigned)
2072 *value2 = (uint64)op2->__anon1.i;
2073 else if(op2->kind == 3)
2074 *value2 = (uint64)op2->__anon1.ui;
2075 else if(op2->kind == 4 && op2->type->isSigned)
2076 *value2 = (uint64)op2->__anon1.i64;
2077 else if(op2->kind == 4)
2078 *value2 = op2->__anon1.ui64;
2079 else if(op2->kind == 23 && op2->type->isSigned)
2080 *value2 = (uint64)op2->__anon1.i64;
2081 else if(op2->kind == 23)
2082 *value2 = op2->__anon1.ui64;
2083 else if(op2->kind == 22 && op2->type->isSigned)
2084 *value2 = (uint64)op2->__anon1.i64;
2085 else if(op2->kind == 22)
2086 *value2 = op2->__anon1.ui64;
2087 else if(op2->kind == 2 && op2->type->isSigned)
2088 *value2 = (uint64)op2->__anon1.s;
2089 else if(op2->kind == 2)
2090 *value2 = (uint64)op2->__anon1.us;
2091 else if(op2->kind == 1 && op2->type->isSigned)
2092 *value2 = (uint64)op2->__anon1.c;
2093 else if(op2->kind == 24 || op2->kind == 1)
2094 *value2 = (uint64)op2->__anon1.uc;
2095 else if(op2->kind == 6)
2096 *value2 = (uint64)op2->__anon1.f;
2097 else if(op2->kind == 7)
2098 *value2 = (uint64)op2->__anon1.d;
2099 else if(op2->kind == 13)
2100 *value2 = op2->__anon1.ui64;
2106 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2108 if(op2->kind == 3 && op2->type->isSigned)
2109 *value2 = (intptr_t)op2->__anon1.i;
2110 else if(op2->kind == 3)
2111 *value2 = (intptr_t)op2->__anon1.ui;
2112 else if(op2->kind == 4 && op2->type->isSigned)
2113 *value2 = (intptr_t)op2->__anon1.i64;
2114 else if(op2->kind == 4)
2115 *value2 = (intptr_t)op2->__anon1.ui64;
2116 else if(op2->kind == 23 && op2->type->isSigned)
2117 *value2 = (intptr_t)op2->__anon1.i64;
2118 else if(op2->kind == 23)
2119 *value2 = (intptr_t)op2->__anon1.ui64;
2120 else if(op2->kind == 22 && op2->type->isSigned)
2121 *value2 = (intptr_t)op2->__anon1.i64;
2122 else if(op2->kind == 22)
2123 *value2 = (intptr_t)op2->__anon1.ui64;
2124 else if(op2->kind == 2 && op2->type->isSigned)
2125 *value2 = (intptr_t)op2->__anon1.s;
2126 else if(op2->kind == 2)
2127 *value2 = (intptr_t)op2->__anon1.us;
2128 else if(op2->kind == 1 && op2->type->isSigned)
2129 *value2 = (intptr_t)op2->__anon1.c;
2130 else if(op2->kind == 24 || op2->kind == 1)
2131 *value2 = (intptr_t)op2->__anon1.uc;
2132 else if(op2->kind == 6)
2133 *value2 = (intptr_t)op2->__anon1.f;
2134 else if(op2->kind == 7)
2135 *value2 = (intptr_t)op2->__anon1.d;
2136 else if(op2->kind == 13)
2137 *value2 = (intptr_t)op2->__anon1.ui64;
2143 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2145 if(op2->kind == 3 && op2->type->isSigned)
2146 *value2 = (uintptr_t)op2->__anon1.i;
2147 else if(op2->kind == 3)
2148 *value2 = (uintptr_t)op2->__anon1.ui;
2149 else if(op2->kind == 4 && op2->type->isSigned)
2150 *value2 = (uintptr_t)op2->__anon1.i64;
2151 else if(op2->kind == 4)
2152 *value2 = (uintptr_t)op2->__anon1.ui64;
2153 else if(op2->kind == 23 && op2->type->isSigned)
2154 *value2 = (uintptr_t)op2->__anon1.i64;
2155 else if(op2->kind == 23)
2156 *value2 = (uintptr_t)op2->__anon1.ui64;
2157 else if(op2->kind == 22 && op2->type->isSigned)
2158 *value2 = (uintptr_t)op2->__anon1.i64;
2159 else if(op2->kind == 22)
2160 *value2 = (uintptr_t)op2->__anon1.ui64;
2161 else if(op2->kind == 2 && op2->type->isSigned)
2162 *value2 = (uintptr_t)op2->__anon1.s;
2163 else if(op2->kind == 2)
2164 *value2 = (uintptr_t)op2->__anon1.us;
2165 else if(op2->kind == 1 && op2->type->isSigned)
2166 *value2 = (uintptr_t)op2->__anon1.c;
2167 else if(op2->kind == 24 || op2->kind == 1)
2168 *value2 = (uintptr_t)op2->__anon1.uc;
2169 else if(op2->kind == 6)
2170 *value2 = (uintptr_t)op2->__anon1.f;
2171 else if(op2->kind == 7)
2172 *value2 = (uintptr_t)op2->__anon1.d;
2173 else if(op2->kind == 13)
2174 *value2 = (uintptr_t)op2->__anon1.ui64;
2180 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2182 if(op2->kind == 3 && op2->type->isSigned)
2183 *value2 = (ssize_t)op2->__anon1.i;
2184 else if(op2->kind == 3)
2185 *value2 = (ssize_t)op2->__anon1.ui;
2186 else if(op2->kind == 4 && op2->type->isSigned)
2187 *value2 = (ssize_t)op2->__anon1.i64;
2188 else if(op2->kind == 4)
2189 *value2 = (ssize_t)op2->__anon1.ui64;
2190 else if(op2->kind == 23 && op2->type->isSigned)
2191 *value2 = (ssize_t)op2->__anon1.i64;
2192 else if(op2->kind == 23)
2193 *value2 = (ssize_t)op2->__anon1.ui64;
2194 else if(op2->kind == 22 && op2->type->isSigned)
2195 *value2 = (ssize_t)op2->__anon1.i64;
2196 else if(op2->kind == 22)
2197 *value2 = (ssize_t)op2->__anon1.ui64;
2198 else if(op2->kind == 2 && op2->type->isSigned)
2199 *value2 = (ssize_t)op2->__anon1.s;
2200 else if(op2->kind == 2)
2201 *value2 = (ssize_t)op2->__anon1.us;
2202 else if(op2->kind == 1 && op2->type->isSigned)
2203 *value2 = (ssize_t)op2->__anon1.c;
2204 else if(op2->kind == 24 || op2->kind == 1)
2205 *value2 = (ssize_t)op2->__anon1.uc;
2206 else if(op2->kind == 6)
2207 *value2 = (ssize_t)op2->__anon1.f;
2208 else if(op2->kind == 7)
2209 *value2 = (ssize_t)op2->__anon1.d;
2210 else if(op2->kind == 13)
2211 *value2 = (ssize_t)op2->__anon1.ui64;
2217 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2219 if(op2->kind == 3 && op2->type->isSigned)
2220 *value2 = (size_t)op2->__anon1.i;
2221 else if(op2->kind == 3)
2222 *value2 = (size_t)op2->__anon1.ui;
2223 else if(op2->kind == 4 && op2->type->isSigned)
2224 *value2 = (size_t)op2->__anon1.i64;
2225 else if(op2->kind == 4)
2226 *value2 = (size_t)op2->__anon1.ui64;
2227 else if(op2->kind == 23 && op2->type->isSigned)
2228 *value2 = (size_t)op2->__anon1.i64;
2229 else if(op2->kind == 23)
2230 *value2 = (size_t)op2->__anon1.ui64;
2231 else if(op2->kind == 22 && op2->type->isSigned)
2232 *value2 = (size_t)op2->__anon1.i64;
2233 else if(op2->kind == 22)
2234 *value2 = (size_t)op2->__anon1.ui64;
2235 else if(op2->kind == 2 && op2->type->isSigned)
2236 *value2 = (size_t)op2->__anon1.s;
2237 else if(op2->kind == 2)
2238 *value2 = (size_t)op2->__anon1.us;
2239 else if(op2->kind == 1 && op2->type->isSigned)
2240 *value2 = (size_t)op2->__anon1.c;
2241 else if(op2->kind == 24 || op2->kind == 1)
2242 *value2 = (size_t)op2->__anon1.uc;
2243 else if(op2->kind == 6)
2244 *value2 = (size_t)op2->__anon1.f;
2245 else if(op2->kind == 7)
2246 *value2 = (size_t)op2->__anon1.d;
2247 else if(op2->kind == 13)
2248 *value2 = (size_t)op2->__anon1.ui64;
2254 unsigned int GetOpShort(struct Operand * op2, short * value2)
2256 if(op2->kind == 3 && op2->type->isSigned)
2257 *value2 = (short)op2->__anon1.i;
2258 else if(op2->kind == 3)
2259 *value2 = (short)op2->__anon1.ui;
2260 else if(op2->kind == 4 && op2->type->isSigned)
2261 *value2 = (short)op2->__anon1.i64;
2262 else if(op2->kind == 4)
2263 *value2 = (short)op2->__anon1.ui64;
2264 else if(op2->kind == 23 && op2->type->isSigned)
2265 *value2 = (short)op2->__anon1.i64;
2266 else if(op2->kind == 23)
2267 *value2 = (short)op2->__anon1.ui64;
2268 else if(op2->kind == 22 && op2->type->isSigned)
2269 *value2 = (short)op2->__anon1.i64;
2270 else if(op2->kind == 22)
2271 *value2 = (short)op2->__anon1.ui64;
2272 else if(op2->kind == 2 && op2->type->isSigned)
2273 *value2 = op2->__anon1.s;
2274 else if(op2->kind == 2)
2275 *value2 = (short)op2->__anon1.us;
2276 else if(op2->kind == 1 && op2->type->isSigned)
2277 *value2 = (short)op2->__anon1.c;
2278 else if(op2->kind == 24 || op2->kind == 1)
2279 *value2 = (short)op2->__anon1.uc;
2280 else if(op2->kind == 6)
2281 *value2 = (short)op2->__anon1.f;
2282 else if(op2->kind == 7)
2283 *value2 = (short)op2->__anon1.d;
2284 else if(op2->kind == 13)
2285 *value2 = (short)op2->__anon1.ui64;
2291 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2293 if(op2->kind == 3 && op2->type->isSigned)
2294 *value2 = (unsigned short)op2->__anon1.i;
2295 else if(op2->kind == 3)
2296 *value2 = (unsigned short)op2->__anon1.ui;
2297 else if(op2->kind == 4 && op2->type->isSigned)
2298 *value2 = (unsigned short)op2->__anon1.i64;
2299 else if(op2->kind == 4)
2300 *value2 = (unsigned short)op2->__anon1.ui64;
2301 else if(op2->kind == 23 && op2->type->isSigned)
2302 *value2 = (unsigned short)op2->__anon1.i64;
2303 else if(op2->kind == 23)
2304 *value2 = (unsigned short)op2->__anon1.ui64;
2305 else if(op2->kind == 22 && op2->type->isSigned)
2306 *value2 = (unsigned short)op2->__anon1.i64;
2307 else if(op2->kind == 22)
2308 *value2 = (unsigned short)op2->__anon1.ui64;
2309 else if(op2->kind == 2 && op2->type->isSigned)
2310 *value2 = (unsigned short)op2->__anon1.s;
2311 else if(op2->kind == 2)
2312 *value2 = op2->__anon1.us;
2313 else if(op2->kind == 1 && op2->type->isSigned)
2314 *value2 = (unsigned short)op2->__anon1.c;
2315 else if(op2->kind == 24 || op2->kind == 1)
2316 *value2 = (unsigned short)op2->__anon1.uc;
2317 else if(op2->kind == 6)
2318 *value2 = (unsigned short)op2->__anon1.f;
2319 else if(op2->kind == 7)
2320 *value2 = (unsigned short)op2->__anon1.d;
2321 else if(op2->kind == 13)
2322 *value2 = (unsigned short)op2->__anon1.ui64;
2328 unsigned int GetOpChar(struct Operand * op2, char * value2)
2330 if(op2->kind == 3 && op2->type->isSigned)
2331 *value2 = (char)op2->__anon1.i;
2332 else if(op2->kind == 3)
2333 *value2 = (char)op2->__anon1.ui;
2334 else if(op2->kind == 4 && op2->type->isSigned)
2335 *value2 = (char)op2->__anon1.i64;
2336 else if(op2->kind == 4)
2337 *value2 = (char)op2->__anon1.ui64;
2338 else if(op2->kind == 23 && op2->type->isSigned)
2339 *value2 = (char)op2->__anon1.i64;
2340 else if(op2->kind == 23)
2341 *value2 = (char)op2->__anon1.ui64;
2342 else if(op2->kind == 22 && op2->type->isSigned)
2343 *value2 = (char)op2->__anon1.i64;
2344 else if(op2->kind == 22)
2345 *value2 = (char)op2->__anon1.ui64;
2346 else if(op2->kind == 2 && op2->type->isSigned)
2347 *value2 = (char)op2->__anon1.s;
2348 else if(op2->kind == 2)
2349 *value2 = (char)op2->__anon1.us;
2350 else if(op2->kind == 1 && op2->type->isSigned)
2351 *value2 = op2->__anon1.c;
2352 else if(op2->kind == 24 || op2->kind == 1)
2353 *value2 = (char)op2->__anon1.uc;
2354 else if(op2->kind == 6)
2355 *value2 = (char)op2->__anon1.f;
2356 else if(op2->kind == 7)
2357 *value2 = (char)op2->__anon1.d;
2358 else if(op2->kind == 13)
2359 *value2 = (char)op2->__anon1.ui64;
2365 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2367 if(op2->kind == 3 && op2->type->isSigned)
2368 *value2 = (unsigned char)op2->__anon1.i;
2369 else if(op2->kind == 3)
2370 *value2 = (unsigned char)op2->__anon1.ui;
2371 else if(op2->kind == 4 && op2->type->isSigned)
2372 *value2 = (unsigned char)op2->__anon1.i64;
2373 else if(op2->kind == 4)
2374 *value2 = (unsigned char)op2->__anon1.ui64;
2375 else if(op2->kind == 23 && op2->type->isSigned)
2376 *value2 = (unsigned char)op2->__anon1.i64;
2377 else if(op2->kind == 23)
2378 *value2 = (unsigned char)op2->__anon1.ui64;
2379 else if(op2->kind == 22 && op2->type->isSigned)
2380 *value2 = (unsigned char)op2->__anon1.i64;
2381 else if(op2->kind == 22)
2382 *value2 = (unsigned char)op2->__anon1.ui64;
2383 else if(op2->kind == 2 && op2->type->isSigned)
2384 *value2 = (unsigned char)op2->__anon1.s;
2385 else if(op2->kind == 2)
2386 *value2 = (unsigned char)op2->__anon1.us;
2387 else if(op2->kind == 1 && op2->type->isSigned)
2388 *value2 = (unsigned char)op2->__anon1.c;
2389 else if(op2->kind == 24 || op2->kind == 1)
2390 *value2 = op2->__anon1.uc;
2391 else if(op2->kind == 6)
2392 *value2 = (unsigned char)op2->__anon1.f;
2393 else if(op2->kind == 7)
2394 *value2 = (unsigned char)op2->__anon1.d;
2395 else if(op2->kind == 13)
2396 *value2 = (unsigned char)op2->__anon1.ui64;
2402 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2404 if(op2->kind == 3 && op2->type->isSigned)
2405 *value2 = (float)(float)op2->__anon1.i;
2406 else if(op2->kind == 3)
2407 *value2 = (float)(float)op2->__anon1.ui;
2408 else if(op2->kind == 4 && op2->type->isSigned)
2409 *value2 = (float)(float)op2->__anon1.i64;
2410 else if(op2->kind == 4)
2411 *value2 = (float)(float)op2->__anon1.ui64;
2412 else if(op2->kind == 23 && op2->type->isSigned)
2413 *value2 = (float)(float)op2->__anon1.i64;
2414 else if(op2->kind == 23)
2415 *value2 = (float)(float)op2->__anon1.ui64;
2416 else if(op2->kind == 22 && op2->type->isSigned)
2417 *value2 = (float)(float)op2->__anon1.i64;
2418 else if(op2->kind == 22)
2419 *value2 = (float)(float)op2->__anon1.ui64;
2420 else if(op2->kind == 2 && op2->type->isSigned)
2421 *value2 = (float)(float)op2->__anon1.s;
2422 else if(op2->kind == 2)
2423 *value2 = (float)(float)op2->__anon1.us;
2424 else if(op2->kind == 1 && op2->type->isSigned)
2425 *value2 = (float)(float)op2->__anon1.c;
2426 else if(op2->kind == 24 || op2->kind == 1)
2427 *value2 = (float)(float)op2->__anon1.uc;
2428 else if(op2->kind == 6)
2429 *value2 = (float)op2->__anon1.f;
2430 else if(op2->kind == 7)
2431 *value2 = (float)op2->__anon1.d;
2432 else if(op2->kind == 13)
2433 *value2 = (float)(float)op2->__anon1.ui64;
2439 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2441 if(op2->kind == 3 && op2->type->isSigned)
2442 *value2 = (double)(double)op2->__anon1.i;
2443 else if(op2->kind == 3)
2444 *value2 = (double)(double)op2->__anon1.ui;
2445 else if(op2->kind == 4 && op2->type->isSigned)
2446 *value2 = (double)(double)op2->__anon1.i64;
2447 else if(op2->kind == 4)
2448 *value2 = (double)(double)op2->__anon1.ui64;
2449 else if(op2->kind == 23 && op2->type->isSigned)
2450 *value2 = (double)(double)op2->__anon1.i64;
2451 else if(op2->kind == 23)
2452 *value2 = (double)(double)op2->__anon1.ui64;
2453 else if(op2->kind == 22 && op2->type->isSigned)
2454 *value2 = (double)(double)op2->__anon1.i64;
2455 else if(op2->kind == 22)
2456 *value2 = (double)(double)op2->__anon1.ui64;
2457 else if(op2->kind == 2 && op2->type->isSigned)
2458 *value2 = (double)(double)op2->__anon1.s;
2459 else if(op2->kind == 2)
2460 *value2 = (double)(double)op2->__anon1.us;
2461 else if(op2->kind == 1 && op2->type->isSigned)
2462 *value2 = (double)(double)op2->__anon1.c;
2463 else if(op2->kind == 24 || op2->kind == 1)
2464 *value2 = (double)(double)op2->__anon1.uc;
2465 else if(op2->kind == 6)
2466 *value2 = (double)op2->__anon1.f;
2467 else if(op2->kind == 7)
2468 *value2 = (double)op2->__anon1.d;
2469 else if(op2->kind == 13)
2470 *value2 = (double)(double)op2->__anon1.ui64;
2476 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2478 int value2 = op2->__anon1.i;
2481 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2484 exp->expType = op1->type;
2486 op1->type->refCount++;
2491 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2493 unsigned int value2 = op2->__anon1.ui;
2496 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2499 exp->expType = op1->type;
2501 op1->type->refCount++;
2506 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2508 long long value2 = op2->__anon1.i64;
2511 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2514 exp->expType = op1->type;
2516 op1->type->refCount++;
2521 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2523 uint64 value2 = op2->__anon1.ui64;
2526 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2529 exp->expType = op1->type;
2531 op1->type->refCount++;
2536 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2538 short value2 = op2->__anon1.s;
2541 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
2544 exp->expType = op1->type;
2546 op1->type->refCount++;
2551 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2553 unsigned short value2 = op2->__anon1.us;
2556 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
2559 exp->expType = op1->type;
2561 op1->type->refCount++;
2566 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2568 char value2 = op2->__anon1.c;
2571 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
2574 exp->expType = op1->type;
2576 op1->type->refCount++;
2581 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2583 unsigned char value2 = op2->__anon1.uc;
2586 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
2589 exp->expType = op1->type;
2591 op1->type->refCount++;
2596 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2598 float value2 = op2->__anon1.f;
2601 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2604 exp->expType = op1->type;
2606 op1->type->refCount++;
2611 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2613 double value2 = op2->__anon1.d;
2616 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2619 exp->expType = op1->type;
2621 op1->type->refCount++;
2626 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2628 int value2 = op2->__anon1.i;
2631 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2634 exp->expType = op1->type;
2636 op1->type->refCount++;
2641 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2643 unsigned int value2 = op2->__anon1.ui;
2646 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2649 exp->expType = op1->type;
2651 op1->type->refCount++;
2656 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2658 long long value2 = op2->__anon1.i64;
2661 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2664 exp->expType = op1->type;
2666 op1->type->refCount++;
2671 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2673 uint64 value2 = op2->__anon1.ui64;
2676 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2679 exp->expType = op1->type;
2681 op1->type->refCount++;
2686 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2688 short value2 = op2->__anon1.s;
2691 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
2694 exp->expType = op1->type;
2696 op1->type->refCount++;
2701 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2703 unsigned short value2 = op2->__anon1.us;
2706 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
2709 exp->expType = op1->type;
2711 op1->type->refCount++;
2716 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2718 char value2 = op2->__anon1.c;
2721 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
2724 exp->expType = op1->type;
2726 op1->type->refCount++;
2731 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2733 unsigned char value2 = op2->__anon1.uc;
2736 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
2739 exp->expType = op1->type;
2741 op1->type->refCount++;
2746 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2748 float value2 = op2->__anon1.f;
2751 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2754 exp->expType = op1->type;
2756 op1->type->refCount++;
2761 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2763 double value2 = op2->__anon1.d;
2766 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2769 exp->expType = op1->type;
2771 op1->type->refCount++;
2776 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2778 int value2 = op2->__anon1.i;
2781 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2784 exp->expType = op1->type;
2786 op1->type->refCount++;
2791 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2793 unsigned int value2 = op2->__anon1.ui;
2796 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2799 exp->expType = op1->type;
2801 op1->type->refCount++;
2806 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2808 long long value2 = op2->__anon1.i64;
2811 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2814 exp->expType = op1->type;
2816 op1->type->refCount++;
2821 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2823 uint64 value2 = op2->__anon1.ui64;
2826 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2829 exp->expType = op1->type;
2831 op1->type->refCount++;
2836 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2838 short value2 = op2->__anon1.s;
2841 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
2844 exp->expType = op1->type;
2846 op1->type->refCount++;
2851 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2853 unsigned short value2 = op2->__anon1.us;
2856 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
2859 exp->expType = op1->type;
2861 op1->type->refCount++;
2866 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2868 char value2 = op2->__anon1.c;
2871 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
2874 exp->expType = op1->type;
2876 op1->type->refCount++;
2881 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2883 unsigned char value2 = op2->__anon1.uc;
2886 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
2889 exp->expType = op1->type;
2891 op1->type->refCount++;
2896 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2898 float value2 = op2->__anon1.f;
2901 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2904 exp->expType = op1->type;
2906 op1->type->refCount++;
2911 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2913 double value2 = op2->__anon1.d;
2916 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2919 exp->expType = op1->type;
2921 op1->type->refCount++;
2926 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2928 int value2 = op2->__anon1.i;
2931 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
2934 exp->expType = op1->type;
2936 op1->type->refCount++;
2941 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2943 unsigned int value2 = op2->__anon1.ui;
2946 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
2949 exp->expType = op1->type;
2951 op1->type->refCount++;
2956 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2958 long long value2 = op2->__anon1.i64;
2961 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
2964 exp->expType = op1->type;
2966 op1->type->refCount++;
2971 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2973 uint64 value2 = op2->__anon1.ui64;
2976 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
2979 exp->expType = op1->type;
2981 op1->type->refCount++;
2986 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2988 short value2 = op2->__anon1.s;
2991 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : 0);
2994 exp->expType = op1->type;
2996 op1->type->refCount++;
3001 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3003 unsigned short value2 = op2->__anon1.us;
3006 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : 0);
3009 exp->expType = op1->type;
3011 op1->type->refCount++;
3016 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3018 char value2 = op2->__anon1.c;
3021 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : 0);
3024 exp->expType = op1->type;
3026 op1->type->refCount++;
3031 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3033 unsigned char value2 = op2->__anon1.uc;
3036 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : 0);
3039 exp->expType = op1->type;
3041 op1->type->refCount++;
3046 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3048 float value2 = op2->__anon1.f;
3051 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
3054 exp->expType = op1->type;
3056 op1->type->refCount++;
3061 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3063 double value2 = op2->__anon1.d;
3066 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
3069 exp->expType = op1->type;
3071 op1->type->refCount++;
3076 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3078 int value2 = op2->__anon1.i;
3081 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
3084 exp->expType = op1->type;
3086 op1->type->refCount++;
3091 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3093 unsigned int value2 = op2->__anon1.ui;
3096 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
3099 exp->expType = op1->type;
3101 op1->type->refCount++;
3106 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3108 long long value2 = op2->__anon1.i64;
3111 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
3114 exp->expType = op1->type;
3116 op1->type->refCount++;
3121 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3123 uint64 value2 = op2->__anon1.ui64;
3126 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
3129 exp->expType = op1->type;
3131 op1->type->refCount++;
3136 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3138 short value2 = op2->__anon1.s;
3141 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : 0);
3144 exp->expType = op1->type;
3146 op1->type->refCount++;
3151 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3153 unsigned short value2 = op2->__anon1.us;
3156 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : 0);
3159 exp->expType = op1->type;
3161 op1->type->refCount++;
3166 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3168 char value2 = op2->__anon1.c;
3171 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : 0);
3174 exp->expType = op1->type;
3176 op1->type->refCount++;
3181 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3183 unsigned char value2 = op2->__anon1.uc;
3186 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : 0);
3189 exp->expType = op1->type;
3191 op1->type->refCount++;
3196 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3199 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3202 exp->expType = op1->type;
3204 op1->type->refCount++;
3209 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3212 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3215 exp->expType = op1->type;
3217 op1->type->refCount++;
3222 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3225 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3228 exp->expType = op1->type;
3230 op1->type->refCount++;
3235 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3238 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3241 exp->expType = op1->type;
3243 op1->type->refCount++;
3248 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3251 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3254 exp->expType = op1->type;
3256 op1->type->refCount++;
3261 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3264 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3267 exp->expType = op1->type;
3269 op1->type->refCount++;
3274 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3277 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3280 exp->expType = op1->type;
3282 op1->type->refCount++;
3287 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3290 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3293 exp->expType = op1->type;
3295 op1->type->refCount++;
3300 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3303 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3306 exp->expType = op1->type;
3308 op1->type->refCount++;
3313 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3316 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3319 exp->expType = op1->type;
3321 op1->type->refCount++;
3326 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3329 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3332 exp->expType = op1->type;
3334 op1->type->refCount++;
3339 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3342 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3345 exp->expType = op1->type;
3347 op1->type->refCount++;
3352 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3355 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3358 exp->expType = op1->type;
3360 op1->type->refCount++;
3365 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3368 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3371 exp->expType = op1->type;
3373 op1->type->refCount++;
3378 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3381 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3384 exp->expType = op1->type;
3386 op1->type->refCount++;
3391 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3394 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3397 exp->expType = op1->type;
3399 op1->type->refCount++;
3404 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3407 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3410 exp->expType = op1->type;
3412 op1->type->refCount++;
3417 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3420 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3423 exp->expType = op1->type;
3425 op1->type->refCount++;
3430 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3433 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3436 exp->expType = op1->type;
3438 op1->type->refCount++;
3443 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3446 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3449 exp->expType = op1->type;
3451 op1->type->refCount++;
3456 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3459 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3462 exp->expType = op1->type;
3464 op1->type->refCount++;
3469 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3472 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3475 exp->expType = op1->type;
3477 op1->type->refCount++;
3482 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3485 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3488 exp->expType = op1->type;
3490 op1->type->refCount++;
3495 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3498 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3501 exp->expType = op1->type;
3503 op1->type->refCount++;
3508 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3511 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3514 exp->expType = op1->type;
3516 op1->type->refCount++;
3521 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3524 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3527 exp->expType = op1->type;
3529 op1->type->refCount++;
3534 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3537 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3540 exp->expType = op1->type;
3542 op1->type->refCount++;
3547 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3550 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3553 exp->expType = op1->type;
3555 op1->type->refCount++;
3560 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3563 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3566 exp->expType = op1->type;
3568 op1->type->refCount++;
3573 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3576 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3579 exp->expType = op1->type;
3581 op1->type->refCount++;
3586 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3588 int value2 = op2->__anon1.i;
3591 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3594 exp->expType = op1->type;
3596 op1->type->refCount++;
3601 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3603 unsigned int value2 = op2->__anon1.ui;
3606 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3609 exp->expType = op1->type;
3611 op1->type->refCount++;
3616 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3618 long long value2 = op2->__anon1.i64;
3621 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3624 exp->expType = op1->type;
3626 op1->type->refCount++;
3631 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3633 uint64 value2 = op2->__anon1.ui64;
3636 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3639 exp->expType = op1->type;
3641 op1->type->refCount++;
3646 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3648 short value2 = op2->__anon1.s;
3651 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3654 exp->expType = op1->type;
3656 op1->type->refCount++;
3661 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3663 unsigned short value2 = op2->__anon1.us;
3666 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3669 exp->expType = op1->type;
3671 op1->type->refCount++;
3676 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3678 char value2 = op2->__anon1.c;
3681 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3684 exp->expType = op1->type;
3686 op1->type->refCount++;
3691 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3693 unsigned char value2 = op2->__anon1.uc;
3696 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3699 exp->expType = op1->type;
3701 op1->type->refCount++;
3706 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3708 float value2 = op2->__anon1.f;
3711 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3714 exp->expType = op1->type;
3716 op1->type->refCount++;
3721 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3723 double value2 = op2->__anon1.d;
3726 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3729 exp->expType = op1->type;
3731 op1->type->refCount++;
3736 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3738 int value2 = op2->__anon1.i;
3741 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3744 exp->expType = op1->type;
3746 op1->type->refCount++;
3751 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3753 unsigned int value2 = op2->__anon1.ui;
3756 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3759 exp->expType = op1->type;
3761 op1->type->refCount++;
3766 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3768 long long value2 = op2->__anon1.i64;
3771 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3774 exp->expType = op1->type;
3776 op1->type->refCount++;
3781 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3783 uint64 value2 = op2->__anon1.ui64;
3786 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3789 exp->expType = op1->type;
3791 op1->type->refCount++;
3796 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3798 short value2 = op2->__anon1.s;
3801 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3804 exp->expType = op1->type;
3806 op1->type->refCount++;
3811 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3813 unsigned short value2 = op2->__anon1.us;
3816 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3819 exp->expType = op1->type;
3821 op1->type->refCount++;
3826 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3828 char value2 = op2->__anon1.c;
3831 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3834 exp->expType = op1->type;
3836 op1->type->refCount++;
3841 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3843 unsigned char value2 = op2->__anon1.uc;
3846 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3849 exp->expType = op1->type;
3851 op1->type->refCount++;
3856 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3858 float value2 = op2->__anon1.f;
3861 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3864 exp->expType = op1->type;
3866 op1->type->refCount++;
3871 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3873 double value2 = op2->__anon1.d;
3876 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3879 exp->expType = op1->type;
3881 op1->type->refCount++;
3886 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3888 int value2 = op2->__anon1.i;
3891 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3894 exp->expType = op1->type;
3896 op1->type->refCount++;
3901 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3903 unsigned int value2 = op2->__anon1.ui;
3906 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3909 exp->expType = op1->type;
3911 op1->type->refCount++;
3916 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3918 long long value2 = op2->__anon1.i64;
3921 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3924 exp->expType = op1->type;
3926 op1->type->refCount++;
3931 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3933 uint64 value2 = op2->__anon1.ui64;
3936 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3939 exp->expType = op1->type;
3941 op1->type->refCount++;
3946 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3948 short value2 = op2->__anon1.s;
3951 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3954 exp->expType = op1->type;
3956 op1->type->refCount++;
3961 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3963 unsigned short value2 = op2->__anon1.us;
3966 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3969 exp->expType = op1->type;
3971 op1->type->refCount++;
3976 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3978 char value2 = op2->__anon1.c;
3981 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3984 exp->expType = op1->type;
3986 op1->type->refCount++;
3991 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3993 unsigned char value2 = op2->__anon1.uc;
3996 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3999 exp->expType = op1->type;
4001 op1->type->refCount++;
4006 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4008 float value2 = op2->__anon1.f;
4011 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4014 exp->expType = op1->type;
4016 op1->type->refCount++;
4021 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4023 double value2 = op2->__anon1.d;
4026 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4029 exp->expType = op1->type;
4031 op1->type->refCount++;
4036 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4038 int value2 = op2->__anon1.i;
4041 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4044 exp->expType = op1->type;
4046 op1->type->refCount++;
4051 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4053 unsigned int value2 = op2->__anon1.ui;
4056 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4059 exp->expType = op1->type;
4061 op1->type->refCount++;
4066 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4068 long long value2 = op2->__anon1.i64;
4071 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4074 exp->expType = op1->type;
4076 op1->type->refCount++;
4081 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4083 uint64 value2 = op2->__anon1.ui64;
4086 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4089 exp->expType = op1->type;
4091 op1->type->refCount++;
4096 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4098 short value2 = op2->__anon1.s;
4101 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4104 exp->expType = op1->type;
4106 op1->type->refCount++;
4111 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4113 unsigned short value2 = op2->__anon1.us;
4116 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4119 exp->expType = op1->type;
4121 op1->type->refCount++;
4126 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4128 char value2 = op2->__anon1.c;
4131 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4134 exp->expType = op1->type;
4136 op1->type->refCount++;
4141 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4143 unsigned char value2 = op2->__anon1.uc;
4146 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4149 exp->expType = op1->type;
4151 op1->type->refCount++;
4156 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4158 float value2 = op2->__anon1.f;
4161 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4164 exp->expType = op1->type;
4166 op1->type->refCount++;
4171 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4173 double value2 = op2->__anon1.d;
4176 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4179 exp->expType = op1->type;
4181 op1->type->refCount++;
4186 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4188 int value2 = op2->__anon1.i;
4191 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
4194 exp->expType = op1->type;
4196 op1->type->refCount++;
4201 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4203 unsigned int value2 = op2->__anon1.ui;
4206 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
4209 exp->expType = op1->type;
4211 op1->type->refCount++;
4216 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4218 long long value2 = op2->__anon1.i64;
4221 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
4224 exp->expType = op1->type;
4226 op1->type->refCount++;
4231 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4233 uint64 value2 = op2->__anon1.ui64;
4236 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
4239 exp->expType = op1->type;
4241 op1->type->refCount++;
4246 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4248 short value2 = op2->__anon1.s;
4251 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s /= value2)) : 0);
4254 exp->expType = op1->type;
4256 op1->type->refCount++;
4261 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4263 unsigned short value2 = op2->__anon1.us;
4266 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us /= value2)) : 0);
4269 exp->expType = op1->type;
4271 op1->type->refCount++;
4276 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4278 char value2 = op2->__anon1.c;
4281 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c /= value2)) : 0);
4284 exp->expType = op1->type;
4286 op1->type->refCount++;
4291 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4293 unsigned char value2 = op2->__anon1.uc;
4296 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc /= value2)) : 0);
4299 exp->expType = op1->type;
4301 op1->type->refCount++;
4306 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4308 float value2 = op2->__anon1.f;
4311 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
4314 exp->expType = op1->type;
4316 op1->type->refCount++;
4321 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4323 double value2 = op2->__anon1.d;
4326 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
4329 exp->expType = op1->type;
4331 op1->type->refCount++;
4336 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4338 int value2 = op2->__anon1.i;
4341 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
4344 exp->expType = op1->type;
4346 op1->type->refCount++;
4351 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4353 unsigned int value2 = op2->__anon1.ui;
4356 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
4359 exp->expType = op1->type;
4361 op1->type->refCount++;
4366 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4368 long long value2 = op2->__anon1.i64;
4371 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
4374 exp->expType = op1->type;
4376 op1->type->refCount++;
4381 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4383 uint64 value2 = op2->__anon1.ui64;
4386 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
4389 exp->expType = op1->type;
4391 op1->type->refCount++;
4396 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4398 short value2 = op2->__anon1.s;
4401 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s %= value2)) : 0);
4404 exp->expType = op1->type;
4406 op1->type->refCount++;
4411 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4413 unsigned short value2 = op2->__anon1.us;
4416 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us %= value2)) : 0);
4419 exp->expType = op1->type;
4421 op1->type->refCount++;
4426 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4428 char value2 = op2->__anon1.c;
4431 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c %= value2)) : 0);
4434 exp->expType = op1->type;
4436 op1->type->refCount++;
4441 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4443 unsigned char value2 = op2->__anon1.uc;
4446 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc %= value2)) : 0);
4449 exp->expType = op1->type;
4451 op1->type->refCount++;
4456 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4458 int value2 = op2->__anon1.i;
4461 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4464 exp->expType = op1->type;
4466 op1->type->refCount++;
4471 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4473 unsigned int value2 = op2->__anon1.ui;
4476 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4479 exp->expType = op1->type;
4481 op1->type->refCount++;
4486 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4488 long long value2 = op2->__anon1.i64;
4491 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4494 exp->expType = op1->type;
4496 op1->type->refCount++;
4501 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4503 uint64 value2 = op2->__anon1.ui64;
4506 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4509 exp->expType = op1->type;
4511 op1->type->refCount++;
4516 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4518 short value2 = op2->__anon1.s;
4521 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
4524 exp->expType = op1->type;
4526 op1->type->refCount++;
4531 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4533 unsigned short value2 = op2->__anon1.us;
4536 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
4539 exp->expType = op1->type;
4541 op1->type->refCount++;
4546 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4548 char value2 = op2->__anon1.c;
4551 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
4554 exp->expType = op1->type;
4556 op1->type->refCount++;
4561 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4563 unsigned char value2 = op2->__anon1.uc;
4566 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
4569 exp->expType = op1->type;
4571 op1->type->refCount++;
4576 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4578 int value2 = op2->__anon1.i;
4581 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4584 exp->expType = op1->type;
4586 op1->type->refCount++;
4591 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4593 unsigned int value2 = op2->__anon1.ui;
4596 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4599 exp->expType = op1->type;
4601 op1->type->refCount++;
4606 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4608 long long value2 = op2->__anon1.i64;
4611 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4614 exp->expType = op1->type;
4616 op1->type->refCount++;
4621 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4623 uint64 value2 = op2->__anon1.ui64;
4626 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4629 exp->expType = op1->type;
4631 op1->type->refCount++;
4636 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4638 short value2 = op2->__anon1.s;
4641 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
4644 exp->expType = op1->type;
4646 op1->type->refCount++;
4651 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4653 unsigned short value2 = op2->__anon1.us;
4656 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
4659 exp->expType = op1->type;
4661 op1->type->refCount++;
4666 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4668 char value2 = op2->__anon1.c;
4671 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
4674 exp->expType = op1->type;
4676 op1->type->refCount++;
4681 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4683 unsigned char value2 = op2->__anon1.uc;
4686 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
4689 exp->expType = op1->type;
4691 op1->type->refCount++;
4696 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4698 int value2 = op2->__anon1.i;
4701 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4704 exp->expType = op1->type;
4706 op1->type->refCount++;
4711 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4713 unsigned int value2 = op2->__anon1.ui;
4716 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4719 exp->expType = op1->type;
4721 op1->type->refCount++;
4726 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4728 long long value2 = op2->__anon1.i64;
4731 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4734 exp->expType = op1->type;
4736 op1->type->refCount++;
4741 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4743 uint64 value2 = op2->__anon1.ui64;
4746 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4749 exp->expType = op1->type;
4751 op1->type->refCount++;
4756 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4758 short value2 = op2->__anon1.s;
4761 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
4764 exp->expType = op1->type;
4766 op1->type->refCount++;
4771 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4773 unsigned short value2 = op2->__anon1.us;
4776 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
4779 exp->expType = op1->type;
4781 op1->type->refCount++;
4786 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4788 char value2 = op2->__anon1.c;
4791 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
4794 exp->expType = op1->type;
4796 op1->type->refCount++;
4801 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4803 unsigned char value2 = op2->__anon1.uc;
4806 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
4809 exp->expType = op1->type;
4811 op1->type->refCount++;
4816 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4818 int value2 = op2->__anon1.i;
4821 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4824 exp->expType = op1->type;
4826 op1->type->refCount++;
4831 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4833 unsigned int value2 = op2->__anon1.ui;
4836 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4839 exp->expType = op1->type;
4841 op1->type->refCount++;
4846 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4848 long long value2 = op2->__anon1.i64;
4851 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4854 exp->expType = op1->type;
4856 op1->type->refCount++;
4861 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4863 uint64 value2 = op2->__anon1.ui64;
4866 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4869 exp->expType = op1->type;
4871 op1->type->refCount++;
4876 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4878 short value2 = op2->__anon1.s;
4881 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
4884 exp->expType = op1->type;
4886 op1->type->refCount++;
4891 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4893 unsigned short value2 = op2->__anon1.us;
4896 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
4899 exp->expType = op1->type;
4901 op1->type->refCount++;
4906 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4908 char value2 = op2->__anon1.c;
4911 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
4914 exp->expType = op1->type;
4916 op1->type->refCount++;
4921 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4923 unsigned char value2 = op2->__anon1.uc;
4926 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
4929 exp->expType = op1->type;
4931 op1->type->refCount++;
4936 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4938 int value2 = op2->__anon1.i;
4941 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4944 exp->expType = op1->type;
4946 op1->type->refCount++;
4951 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4953 unsigned int value2 = op2->__anon1.ui;
4956 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4959 exp->expType = op1->type;
4961 op1->type->refCount++;
4966 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4968 long long value2 = op2->__anon1.i64;
4971 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4974 exp->expType = op1->type;
4976 op1->type->refCount++;
4981 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4983 uint64 value2 = op2->__anon1.ui64;
4986 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4989 exp->expType = op1->type;
4991 op1->type->refCount++;
4996 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4998 short value2 = op2->__anon1.s;
5001 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
5004 exp->expType = op1->type;
5006 op1->type->refCount++;
5011 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5013 unsigned short value2 = op2->__anon1.us;
5016 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
5019 exp->expType = op1->type;
5021 op1->type->refCount++;
5026 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5028 char value2 = op2->__anon1.c;
5031 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
5034 exp->expType = op1->type;
5036 op1->type->refCount++;
5041 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5043 unsigned char value2 = op2->__anon1.uc;
5046 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
5049 exp->expType = op1->type;
5051 op1->type->refCount++;
5056 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5059 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5062 exp->expType = op1->type;
5064 op1->type->refCount++;
5069 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5072 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5075 exp->expType = op1->type;
5077 op1->type->refCount++;
5082 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5085 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5088 exp->expType = op1->type;
5090 op1->type->refCount++;
5095 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5098 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5101 exp->expType = op1->type;
5103 op1->type->refCount++;
5108 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5111 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5114 exp->expType = op1->type;
5116 op1->type->refCount++;
5121 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5124 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5127 exp->expType = op1->type;
5129 op1->type->refCount++;
5134 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5137 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5140 exp->expType = op1->type;
5142 op1->type->refCount++;
5147 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5150 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5153 exp->expType = op1->type;
5155 op1->type->refCount++;
5160 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5162 int value2 = op2->__anon1.i;
5165 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5168 exp->expType = op1->type;
5170 op1->type->refCount++;
5175 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5177 unsigned int value2 = op2->__anon1.ui;
5180 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5183 exp->expType = op1->type;
5185 op1->type->refCount++;
5190 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5192 long long value2 = op2->__anon1.i64;
5195 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5198 exp->expType = op1->type;
5200 op1->type->refCount++;
5205 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5207 uint64 value2 = op2->__anon1.ui64;
5210 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5213 exp->expType = op1->type;
5215 op1->type->refCount++;
5220 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5222 short value2 = op2->__anon1.s;
5225 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5228 exp->expType = op1->type;
5230 op1->type->refCount++;
5235 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5237 unsigned short value2 = op2->__anon1.us;
5240 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5243 exp->expType = op1->type;
5245 op1->type->refCount++;
5250 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5252 char value2 = op2->__anon1.c;
5255 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5258 exp->expType = op1->type;
5260 op1->type->refCount++;
5265 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5267 unsigned char value2 = op2->__anon1.uc;
5270 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5273 exp->expType = op1->type;
5275 op1->type->refCount++;
5280 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5282 int value2 = op2->__anon1.i;
5285 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5288 exp->expType = op1->type;
5290 op1->type->refCount++;
5295 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5297 unsigned int value2 = op2->__anon1.ui;
5300 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5303 exp->expType = op1->type;
5305 op1->type->refCount++;
5310 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5312 long long value2 = op2->__anon1.i64;
5315 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5318 exp->expType = op1->type;
5320 op1->type->refCount++;
5325 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5327 uint64 value2 = op2->__anon1.ui64;
5330 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5333 exp->expType = op1->type;
5335 op1->type->refCount++;
5340 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5342 short value2 = op2->__anon1.s;
5345 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5348 exp->expType = op1->type;
5350 op1->type->refCount++;
5355 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5357 unsigned short value2 = op2->__anon1.us;
5360 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5363 exp->expType = op1->type;
5365 op1->type->refCount++;
5370 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5372 char value2 = op2->__anon1.c;
5375 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5378 exp->expType = op1->type;
5380 op1->type->refCount++;
5385 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5387 unsigned char value2 = op2->__anon1.uc;
5390 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5393 exp->expType = op1->type;
5395 op1->type->refCount++;
5400 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5402 int value2 = op2->__anon1.i;
5405 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5408 exp->expType = op1->type;
5410 op1->type->refCount++;
5415 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5417 unsigned int value2 = op2->__anon1.ui;
5420 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5423 exp->expType = op1->type;
5425 op1->type->refCount++;
5430 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5432 long long value2 = op2->__anon1.i64;
5435 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5438 exp->expType = op1->type;
5440 op1->type->refCount++;
5445 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5447 uint64 value2 = op2->__anon1.ui64;
5450 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5453 exp->expType = op1->type;
5455 op1->type->refCount++;
5460 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5462 short value2 = op2->__anon1.s;
5465 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5468 exp->expType = op1->type;
5470 op1->type->refCount++;
5475 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5477 unsigned short value2 = op2->__anon1.us;
5480 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5483 exp->expType = op1->type;
5485 op1->type->refCount++;
5490 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5492 char value2 = op2->__anon1.c;
5495 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5498 exp->expType = op1->type;
5500 op1->type->refCount++;
5505 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5507 unsigned char value2 = op2->__anon1.uc;
5510 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5513 exp->expType = op1->type;
5515 op1->type->refCount++;
5520 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5522 int value2 = op2->__anon1.i;
5525 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5528 exp->expType = op1->type;
5530 op1->type->refCount++;
5535 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5537 unsigned int value2 = op2->__anon1.ui;
5540 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5543 exp->expType = op1->type;
5545 op1->type->refCount++;
5550 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5552 long long value2 = op2->__anon1.i64;
5555 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5558 exp->expType = op1->type;
5560 op1->type->refCount++;
5565 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5567 uint64 value2 = op2->__anon1.ui64;
5570 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5573 exp->expType = op1->type;
5575 op1->type->refCount++;
5580 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5582 short value2 = op2->__anon1.s;
5585 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5588 exp->expType = op1->type;
5590 op1->type->refCount++;
5595 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5597 unsigned short value2 = op2->__anon1.us;
5600 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5603 exp->expType = op1->type;
5605 op1->type->refCount++;
5610 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5612 char value2 = op2->__anon1.c;
5615 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5618 exp->expType = op1->type;
5620 op1->type->refCount++;
5625 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5627 unsigned char value2 = op2->__anon1.uc;
5630 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5633 exp->expType = op1->type;
5635 op1->type->refCount++;
5640 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5642 int value2 = op2->__anon1.i;
5645 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5648 exp->expType = op1->type;
5650 op1->type->refCount++;
5655 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5657 unsigned int value2 = op2->__anon1.ui;
5660 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5663 exp->expType = op1->type;
5665 op1->type->refCount++;
5670 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5672 long long value2 = op2->__anon1.i64;
5675 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5678 exp->expType = op1->type;
5680 op1->type->refCount++;
5685 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5687 uint64 value2 = op2->__anon1.ui64;
5690 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5693 exp->expType = op1->type;
5695 op1->type->refCount++;
5700 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5702 short value2 = op2->__anon1.s;
5705 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5708 exp->expType = op1->type;
5710 op1->type->refCount++;
5715 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5717 unsigned short value2 = op2->__anon1.us;
5720 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5723 exp->expType = op1->type;
5725 op1->type->refCount++;
5730 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5732 char value2 = op2->__anon1.c;
5735 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5738 exp->expType = op1->type;
5740 op1->type->refCount++;
5745 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5747 unsigned char value2 = op2->__anon1.uc;
5750 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5753 exp->expType = op1->type;
5755 op1->type->refCount++;
5760 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5763 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5766 exp->expType = op1->type;
5768 op1->type->refCount++;
5773 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5776 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5779 exp->expType = op1->type;
5781 op1->type->refCount++;
5786 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5789 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5792 exp->expType = op1->type;
5794 op1->type->refCount++;
5799 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5802 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5805 exp->expType = op1->type;
5807 op1->type->refCount++;
5812 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5815 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5818 exp->expType = op1->type;
5820 op1->type->refCount++;
5825 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5828 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5831 exp->expType = op1->type;
5833 op1->type->refCount++;
5838 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5841 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5844 exp->expType = op1->type;
5846 op1->type->refCount++;
5851 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5854 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5857 exp->expType = op1->type;
5859 op1->type->refCount++;
5864 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5866 int value2 = op2->__anon1.i;
5869 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5872 exp->expType = op1->type;
5874 op1->type->refCount++;
5879 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5881 unsigned int value2 = op2->__anon1.ui;
5884 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5887 exp->expType = op1->type;
5889 op1->type->refCount++;
5894 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5896 long long value2 = op2->__anon1.i64;
5899 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5902 exp->expType = op1->type;
5904 op1->type->refCount++;
5909 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5911 uint64 value2 = op2->__anon1.ui64;
5914 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5917 exp->expType = op1->type;
5919 op1->type->refCount++;
5924 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5926 short value2 = op2->__anon1.s;
5929 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5932 exp->expType = op1->type;
5934 op1->type->refCount++;
5939 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5941 unsigned short value2 = op2->__anon1.us;
5944 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5947 exp->expType = op1->type;
5949 op1->type->refCount++;
5954 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5956 char value2 = op2->__anon1.c;
5959 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5962 exp->expType = op1->type;
5964 op1->type->refCount++;
5969 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5971 unsigned char value2 = op2->__anon1.uc;
5974 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5977 exp->expType = op1->type;
5979 op1->type->refCount++;
5984 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5986 float value2 = op2->__anon1.f;
5989 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5992 exp->expType = op1->type;
5994 op1->type->refCount++;
5999 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6001 double value2 = op2->__anon1.d;
6004 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
6007 exp->expType = op1->type;
6009 op1->type->refCount++;
6014 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6016 int value2 = op2->__anon1.i;
6019 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6022 exp->expType = op1->type;
6024 op1->type->refCount++;
6029 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6031 unsigned int value2 = op2->__anon1.ui;
6034 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6037 exp->expType = op1->type;
6039 op1->type->refCount++;
6044 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6046 long long value2 = op2->__anon1.i64;
6049 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6052 exp->expType = op1->type;
6054 op1->type->refCount++;
6059 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6061 uint64 value2 = op2->__anon1.ui64;
6064 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6067 exp->expType = op1->type;
6069 op1->type->refCount++;
6074 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6076 short value2 = op2->__anon1.s;
6079 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6082 exp->expType = op1->type;
6084 op1->type->refCount++;
6089 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6091 unsigned short value2 = op2->__anon1.us;
6094 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6097 exp->expType = op1->type;
6099 op1->type->refCount++;
6104 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6106 char value2 = op2->__anon1.c;
6109 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6112 exp->expType = op1->type;
6114 op1->type->refCount++;
6119 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6121 unsigned char value2 = op2->__anon1.uc;
6124 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6127 exp->expType = op1->type;
6129 op1->type->refCount++;
6134 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6136 float value2 = op2->__anon1.f;
6139 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6142 exp->expType = op1->type;
6144 op1->type->refCount++;
6149 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6151 double value2 = op2->__anon1.d;
6154 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6157 exp->expType = op1->type;
6159 op1->type->refCount++;
6164 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6166 int value2 = op2->__anon1.i;
6169 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6172 exp->expType = op1->type;
6174 op1->type->refCount++;
6179 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6181 unsigned int value2 = op2->__anon1.ui;
6184 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6187 exp->expType = op1->type;
6189 op1->type->refCount++;
6194 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6196 long long value2 = op2->__anon1.i64;
6199 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6202 exp->expType = op1->type;
6204 op1->type->refCount++;
6209 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6211 uint64 value2 = op2->__anon1.ui64;
6214 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6217 exp->expType = op1->type;
6219 op1->type->refCount++;
6224 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6226 short value2 = op2->__anon1.s;
6229 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6232 exp->expType = op1->type;
6234 op1->type->refCount++;
6239 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6241 unsigned short value2 = op2->__anon1.us;
6244 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6247 exp->expType = op1->type;
6249 op1->type->refCount++;
6254 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6256 char value2 = op2->__anon1.c;
6259 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6262 exp->expType = op1->type;
6264 op1->type->refCount++;
6269 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6271 unsigned char value2 = op2->__anon1.uc;
6274 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6277 exp->expType = op1->type;
6279 op1->type->refCount++;
6284 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6286 float value2 = op2->__anon1.f;
6289 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6292 exp->expType = op1->type;
6294 op1->type->refCount++;
6299 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6301 double value2 = op2->__anon1.d;
6304 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6307 exp->expType = op1->type;
6309 op1->type->refCount++;
6314 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6316 int value2 = op2->__anon1.i;
6319 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6322 exp->expType = op1->type;
6324 op1->type->refCount++;
6329 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6331 unsigned int value2 = op2->__anon1.ui;
6334 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6337 exp->expType = op1->type;
6339 op1->type->refCount++;
6344 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6346 long long value2 = op2->__anon1.i64;
6349 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6352 exp->expType = op1->type;
6354 op1->type->refCount++;
6359 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6361 uint64 value2 = op2->__anon1.ui64;
6364 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6367 exp->expType = op1->type;
6369 op1->type->refCount++;
6374 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6376 short value2 = op2->__anon1.s;
6379 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6382 exp->expType = op1->type;
6384 op1->type->refCount++;
6389 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6391 unsigned short value2 = op2->__anon1.us;
6394 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6397 exp->expType = op1->type;
6399 op1->type->refCount++;
6404 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6406 char value2 = op2->__anon1.c;
6409 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6412 exp->expType = op1->type;
6414 op1->type->refCount++;
6419 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6421 unsigned char value2 = op2->__anon1.uc;
6424 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6427 exp->expType = op1->type;
6429 op1->type->refCount++;
6434 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6436 float value2 = op2->__anon1.f;
6439 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6442 exp->expType = op1->type;
6444 op1->type->refCount++;
6449 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6451 double value2 = op2->__anon1.d;
6454 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6457 exp->expType = op1->type;
6459 op1->type->refCount++;
6464 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6466 int value2 = op2->__anon1.i;
6469 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6472 exp->expType = op1->type;
6474 op1->type->refCount++;
6479 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6481 unsigned int value2 = op2->__anon1.ui;
6484 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6487 exp->expType = op1->type;
6489 op1->type->refCount++;
6494 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6496 long long value2 = op2->__anon1.i64;
6499 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6502 exp->expType = op1->type;
6504 op1->type->refCount++;
6509 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6511 uint64 value2 = op2->__anon1.ui64;
6514 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6517 exp->expType = op1->type;
6519 op1->type->refCount++;
6524 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6526 short value2 = op2->__anon1.s;
6529 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6532 exp->expType = op1->type;
6534 op1->type->refCount++;
6539 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6541 unsigned short value2 = op2->__anon1.us;
6544 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6547 exp->expType = op1->type;
6549 op1->type->refCount++;
6554 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6556 char value2 = op2->__anon1.c;
6559 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6562 exp->expType = op1->type;
6564 op1->type->refCount++;
6569 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6571 unsigned char value2 = op2->__anon1.uc;
6574 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6577 exp->expType = op1->type;
6579 op1->type->refCount++;
6584 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6586 float value2 = op2->__anon1.f;
6589 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6592 exp->expType = op1->type;
6594 op1->type->refCount++;
6599 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6601 double value2 = op2->__anon1.d;
6604 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6607 exp->expType = op1->type;
6609 op1->type->refCount++;
6614 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6616 int value2 = op2->__anon1.i;
6619 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6622 exp->expType = op1->type;
6624 op1->type->refCount++;
6629 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6631 unsigned int value2 = op2->__anon1.ui;
6634 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6637 exp->expType = op1->type;
6639 op1->type->refCount++;
6644 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6646 long long value2 = op2->__anon1.i64;
6649 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6652 exp->expType = op1->type;
6654 op1->type->refCount++;
6659 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6661 uint64 value2 = op2->__anon1.ui64;
6664 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6667 exp->expType = op1->type;
6669 op1->type->refCount++;
6674 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6676 short value2 = op2->__anon1.s;
6679 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6682 exp->expType = op1->type;
6684 op1->type->refCount++;
6689 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6691 unsigned short value2 = op2->__anon1.us;
6694 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6697 exp->expType = op1->type;
6699 op1->type->refCount++;
6704 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6706 char value2 = op2->__anon1.c;
6709 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6712 exp->expType = op1->type;
6714 op1->type->refCount++;
6719 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6721 unsigned char value2 = op2->__anon1.uc;
6724 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6727 exp->expType = op1->type;
6729 op1->type->refCount++;
6734 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6736 float value2 = op2->__anon1.f;
6739 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6742 exp->expType = op1->type;
6744 op1->type->refCount++;
6749 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6751 double value2 = op2->__anon1.d;
6754 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6757 exp->expType = op1->type;
6759 op1->type->refCount++;
6764 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6766 int value2 = op2->__anon1.i;
6769 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6772 exp->expType = op1->type;
6774 op1->type->refCount++;
6779 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6781 unsigned int value2 = op2->__anon1.ui;
6784 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6787 exp->expType = op1->type;
6789 op1->type->refCount++;
6794 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6796 long long value2 = op2->__anon1.i64;
6799 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6802 exp->expType = op1->type;
6804 op1->type->refCount++;
6809 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6811 uint64 value2 = op2->__anon1.ui64;
6814 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6817 exp->expType = op1->type;
6819 op1->type->refCount++;
6824 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6826 short value2 = op2->__anon1.s;
6829 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6832 exp->expType = op1->type;
6834 op1->type->refCount++;
6839 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6841 unsigned short value2 = op2->__anon1.us;
6844 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6847 exp->expType = op1->type;
6849 op1->type->refCount++;
6854 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6856 char value2 = op2->__anon1.c;
6859 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6862 exp->expType = op1->type;
6864 op1->type->refCount++;
6869 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6871 unsigned char value2 = op2->__anon1.uc;
6874 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6877 exp->expType = op1->type;
6879 op1->type->refCount++;
6884 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6886 float value2 = op2->__anon1.f;
6889 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6892 exp->expType = op1->type;
6894 op1->type->refCount++;
6899 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6901 double value2 = op2->__anon1.d;
6904 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6907 exp->expType = op1->type;
6909 op1->type->refCount++;
6914 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6916 int value2 = op2->__anon1.i;
6919 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6922 exp->expType = op1->type;
6924 op1->type->refCount++;
6929 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6931 unsigned int value2 = op2->__anon1.ui;
6934 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6937 exp->expType = op1->type;
6939 op1->type->refCount++;
6944 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6946 long long value2 = op2->__anon1.i64;
6949 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6952 exp->expType = op1->type;
6954 op1->type->refCount++;
6959 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6961 uint64 value2 = op2->__anon1.ui64;
6964 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6967 exp->expType = op1->type;
6969 op1->type->refCount++;
6974 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6976 short value2 = op2->__anon1.s;
6979 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6982 exp->expType = op1->type;
6984 op1->type->refCount++;
6989 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6991 unsigned short value2 = op2->__anon1.us;
6994 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6997 exp->expType = op1->type;
6999 op1->type->refCount++;
7004 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7006 char value2 = op2->__anon1.c;
7009 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
7012 exp->expType = op1->type;
7014 op1->type->refCount++;
7019 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7021 unsigned char value2 = op2->__anon1.uc;
7024 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7027 exp->expType = op1->type;
7029 op1->type->refCount++;
7034 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7036 float value2 = op2->__anon1.f;
7039 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7042 exp->expType = op1->type;
7044 op1->type->refCount++;
7049 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7051 double value2 = op2->__anon1.d;
7054 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7057 exp->expType = op1->type;
7059 op1->type->refCount++;
7064 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7067 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7070 exp->expType = op1->type;
7072 op1->type->refCount++;
7077 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7080 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7083 exp->expType = op1->type;
7085 op1->type->refCount++;
7090 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7093 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7096 exp->expType = op1->type;
7098 op1->type->refCount++;
7103 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7106 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7109 exp->expType = op1->type;
7111 op1->type->refCount++;
7116 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7119 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7122 exp->expType = op1->type;
7124 op1->type->refCount++;
7129 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7132 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7135 exp->expType = op1->type;
7137 op1->type->refCount++;
7142 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7145 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7148 exp->expType = op1->type;
7150 op1->type->refCount++;
7155 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7158 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7161 exp->expType = op1->type;
7163 op1->type->refCount++;
7168 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7170 if(type->name && type->name[0])
7173 strcat(string, type->name);
7176 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7182 strcat(string, name);
7187 static void PrintAttribs(struct Type * type, char * string)
7192 strcat(string, "dllexport ");
7193 if(type->attrStdcall)
7194 strcat(string, "stdcall ");
7198 static struct Type * FindMember(struct Type * type, char * string)
7200 struct Type * memberType;
7202 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7204 if(!memberType->name)
7206 struct Type * subType = FindMember(memberType, string);
7211 else if(!strcmp(memberType->name, string))
7214 return (((void *)0));
7217 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7219 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7221 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7223 unsigned int result = 0;
7228 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7229 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7233 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7234 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7237 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
7238 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7241 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
7242 result = GetOpFloat(op, &op->__anon1.f);
7245 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
7246 result = GetOpDouble(op, &op->__anon1.d);
7249 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
7250 result = GetOpUInt64(op, &op->__anon1.ui64);
7253 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
7254 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7257 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7258 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7261 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7262 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7268 struct OpTable floatOps =
7270 (void *)(FloatAdd), (void *)(FloatSub), (void *)(FloatMul), (void *)(FloatDiv), (((void *)0)), (void *)(FloatNeg), (void *)(FloatInc), (void *)(FloatDec), (void *)(FloatAsign), (void *)(FloatAddAsign), (void *)(FloatSubAsign), (void *)(FloatMulAsign), (void *)(FloatDivAsign), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (void *)(FloatEqu), (void *)(FloatNqu), (void *)(FloatAnd), (void *)(FloatOr), (void *)(FloatGrt), (void *)(FloatSma), (void *)(FloatGrtEqu), (void *)(FloatSmaEqu)
7273 struct OpTable doubleOps =
7275 (void *)(DoubleAdd), (void *)(DoubleSub), (void *)(DoubleMul), (void *)(DoubleDiv), (((void *)0)), (void *)(DoubleNeg), (void *)(DoubleInc), (void *)(DoubleDec), (void *)(DoubleAsign), (void *)(DoubleAddAsign), (void *)(DoubleSubAsign), (void *)(DoubleMulAsign), (void *)(DoubleDivAsign), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (void *)(DoubleEqu), (void *)(DoubleNqu), (void *)(DoubleAnd), (void *)(DoubleOr), (void *)(DoubleGrt), (void *)(DoubleSma), (void *)(DoubleGrtEqu), (void *)(DoubleSmaEqu)
7278 struct OpTable intOps =
7280 (void *)(IntAdd), (void *)(IntSub), (void *)(IntMul), (void *)(IntDiv), (void *)(IntMod), (void *)(IntNeg), (void *)(IntInc), (void *)(IntDec), (void *)(IntAsign), (void *)(IntAddAsign), (void *)(IntSubAsign), (void *)(IntMulAsign), (void *)(IntDivAsign), (void *)(IntModAsign), (void *)(IntBitAnd), (void *)(IntBitOr), (void *)(IntBitXor), (void *)(IntLShift), (void *)(IntRShift), (void *)(IntBitNot), (void *)(IntAndAsign), (void *)(IntOrAsign), (void *)(IntXorAsign), (void *)(IntLShiftAsign), (void *)(IntRShiftAsign), (void *)(IntNot), (void *)(IntEqu), (void *)(IntNqu), (void *)(IntAnd), (void *)(IntOr), (void *)(IntGrt), (void *)(IntSma), (void *)(IntGrtEqu), (void *)(IntSmaEqu), (void *)(IntCond)
7283 struct OpTable uintOps =
7285 (void *)(UIntAdd), (void *)(UIntSub), (void *)(UIntMul), (void *)(UIntDiv), (void *)(UIntMod), (void *)(UIntNeg), (void *)(UIntInc), (void *)(UIntDec), (void *)(UIntAsign), (void *)(UIntAddAsign), (void *)(UIntSubAsign), (void *)(UIntMulAsign), (void *)(UIntDivAsign), (void *)(UIntModAsign), (void *)(UIntBitAnd), (void *)(UIntBitOr), (void *)(UIntBitXor), (void *)(UIntLShift), (void *)(UIntRShift), (void *)(UIntBitNot), (void *)(UIntAndAsign), (void *)(UIntOrAsign), (void *)(UIntXorAsign), (void *)(UIntLShiftAsign), (void *)(UIntRShiftAsign), (void *)(UIntNot), (void *)(UIntEqu), (void *)(UIntNqu), (void *)(UIntAnd), (void *)(UIntOr), (void *)(UIntGrt), (void *)(UIntSma), (void *)(UIntGrtEqu), (void *)(UIntSmaEqu), (void *)(UIntCond)
7288 struct OpTable int64Ops =
7290 (void *)(Int64Add), (void *)(Int64Sub), (void *)(Int64Mul), (void *)(Int64Div), (void *)(Int64Mod), (void *)(Int64Neg), (void *)(Int64Inc), (void *)(Int64Dec), (void *)(Int64Asign), (void *)(Int64AddAsign), (void *)(Int64SubAsign), (void *)(Int64MulAsign), (void *)(Int64DivAsign), (void *)(Int64ModAsign), (void *)(Int64BitAnd), (void *)(Int64BitOr), (void *)(Int64BitXor), (void *)(Int64LShift), (void *)(Int64RShift), (void *)(Int64BitNot), (void *)(Int64AndAsign), (void *)(Int64OrAsign), (void *)(Int64XorAsign), (void *)(Int64LShiftAsign), (void *)(Int64RShiftAsign), (void *)(Int64Not), (void *)(Int64Equ), (void *)(Int64Nqu), (void *)(Int64And), (void *)(Int64Or), (void *)(Int64Grt), (void *)(Int64Sma), (void *)(Int64GrtEqu), (void *)(Int64SmaEqu), (void *)(Int64Cond)
7293 struct OpTable uint64Ops =
7295 (void *)(UInt64Add), (void *)(UInt64Sub), (void *)(UInt64Mul), (void *)(UInt64Div), (void *)(UInt64Mod), (void *)(UInt64Neg), (void *)(UInt64Inc), (void *)(UInt64Dec), (void *)(UInt64Asign), (void *)(UInt64AddAsign), (void *)(UInt64SubAsign), (void *)(UInt64MulAsign), (void *)(UInt64DivAsign), (void *)(UInt64ModAsign), (void *)(UInt64BitAnd), (void *)(UInt64BitOr), (void *)(UInt64BitXor), (void *)(UInt64LShift), (void *)(UInt64RShift), (void *)(UInt64BitNot), (void *)(UInt64AndAsign), (void *)(UInt64OrAsign), (void *)(UInt64XorAsign), (void *)(UInt64LShiftAsign), (void *)(UInt64RShiftAsign), (void *)(UInt64Not), (void *)(UInt64Equ), (void *)(UInt64Nqu), (void *)(UInt64And), (void *)(UInt64Or), (void *)(UInt64Grt), (void *)(UInt64Sma), (void *)(UInt64GrtEqu), (void *)(UInt64SmaEqu), (void *)(UInt64Cond)
7298 struct OpTable shortOps =
7300 (void *)(ShortAdd), (void *)(ShortSub), (void *)(ShortMul), (void *)(ShortDiv), (void *)(ShortMod), (void *)(ShortNeg), (void *)(ShortInc), (void *)(ShortDec), (void *)(ShortAsign), (void *)(ShortAddAsign), (void *)(ShortSubAsign), (void *)(ShortMulAsign), (void *)(ShortDivAsign), (void *)(ShortModAsign), (void *)(ShortBitAnd), (void *)(ShortBitOr), (void *)(ShortBitXor), (void *)(ShortLShift), (void *)(ShortRShift), (void *)(ShortBitNot), (void *)(ShortAndAsign), (void *)(ShortOrAsign), (void *)(ShortXorAsign), (void *)(ShortLShiftAsign), (void *)(ShortRShiftAsign), (void *)(ShortNot), (void *)(ShortEqu), (void *)(ShortNqu), (void *)(ShortAnd), (void *)(ShortOr), (void *)(ShortGrt), (void *)(ShortSma), (void *)(ShortGrtEqu), (void *)(ShortSmaEqu), (void *)(ShortCond)
7303 struct OpTable ushortOps =
7305 (void *)(UShortAdd), (void *)(UShortSub), (void *)(UShortMul), (void *)(UShortDiv), (void *)(UShortMod), (void *)(UShortNeg), (void *)(UShortInc), (void *)(UShortDec), (void *)(UShortAsign), (void *)(UShortAddAsign), (void *)(UShortSubAsign), (void *)(UShortMulAsign), (void *)(UShortDivAsign), (void *)(UShortModAsign), (void *)(UShortBitAnd), (void *)(UShortBitOr), (void *)(UShortBitXor), (void *)(UShortLShift), (void *)(UShortRShift), (void *)(UShortBitNot), (void *)(UShortAndAsign), (void *)(UShortOrAsign), (void *)(UShortXorAsign), (void *)(UShortLShiftAsign), (void *)(UShortRShiftAsign), (void *)(UShortNot), (void *)(UShortEqu), (void *)(UShortNqu), (void *)(UShortAnd), (void *)(UShortOr), (void *)(UShortGrt), (void *)(UShortSma), (void *)(UShortGrtEqu), (void *)(UShortSmaEqu), (void *)(UShortCond)
7308 struct OpTable charOps =
7310 (void *)(CharAdd), (void *)(CharSub), (void *)(CharMul), (void *)(CharDiv), (void *)(CharMod), (void *)(CharNeg), (void *)(CharInc), (void *)(CharDec), (void *)(CharAsign), (void *)(CharAddAsign), (void *)(CharSubAsign), (void *)(CharMulAsign), (void *)(CharDivAsign), (void *)(CharModAsign), (void *)(CharBitAnd), (void *)(CharBitOr), (void *)(CharBitXor), (void *)(CharLShift), (void *)(CharRShift), (void *)(CharBitNot), (void *)(CharAndAsign), (void *)(CharOrAsign), (void *)(CharXorAsign), (void *)(CharLShiftAsign), (void *)(CharRShiftAsign), (void *)(CharNot), (void *)(CharEqu), (void *)(CharNqu), (void *)(CharAnd), (void *)(CharOr), (void *)(CharGrt), (void *)(CharSma), (void *)(CharGrtEqu), (void *)(CharSmaEqu), (void *)(CharCond)
7313 struct OpTable ucharOps =
7315 (void *)(UCharAdd), (void *)(UCharSub), (void *)(UCharMul), (void *)(UCharDiv), (void *)(UCharMod), (void *)(UCharNeg), (void *)(UCharInc), (void *)(UCharDec), (void *)(UCharAsign), (void *)(UCharAddAsign), (void *)(UCharSubAsign), (void *)(UCharMulAsign), (void *)(UCharDivAsign), (void *)(UCharModAsign), (void *)(UCharBitAnd), (void *)(UCharBitOr), (void *)(UCharBitXor), (void *)(UCharLShift), (void *)(UCharRShift), (void *)(UCharBitNot), (void *)(UCharAndAsign), (void *)(UCharOrAsign), (void *)(UCharXorAsign), (void *)(UCharLShiftAsign), (void *)(UCharRShiftAsign), (void *)(UCharNot), (void *)(UCharEqu), (void *)(UCharNqu), (void *)(UCharAnd), (void *)(UCharOr), (void *)(UCharGrt), (void *)(UCharSma), (void *)(UCharGrtEqu), (void *)(UCharSmaEqu), (void *)(UCharCond)
7318 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7320 struct Type * memberType;
7322 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7324 if(!memberType->name)
7326 struct Type * subType = FindMember(memberType, string);
7330 *offset += memberType->offset;
7334 else if(!strcmp(memberType->name, string))
7336 *offset += memberType->offset;
7340 return (((void *)0));
7343 struct __ecereNameSpace__ecere__com__Module;
7345 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_FindProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
7347 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7349 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
7351 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
7353 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7355 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7360 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7361 struct __ecereNameSpace__ecere__sys__BTNode * left;
7362 struct __ecereNameSpace__ecere__sys__BTNode * right;
7364 struct __ecereNameSpace__ecere__com__Instance * module;
7365 char * dataTypeString;
7366 struct Type * dataType;
7371 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, unsigned int * offset, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
7373 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7375 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
7377 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7379 struct __ecereNameSpace__ecere__com__DefinedExpression;
7381 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7383 struct __ecereNameSpace__ecere__com__DefinedExpression
7385 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7386 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7389 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7392 struct __ecereNameSpace__ecere__sys__BinaryTree;
7394 struct __ecereNameSpace__ecere__sys__BinaryTree
7396 struct __ecereNameSpace__ecere__sys__BTNode * root;
7398 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7399 void (* FreeKey)(void * key);
7402 struct __ecereNameSpace__ecere__com__Class
7404 struct __ecereNameSpace__ecere__com__Class * prev;
7405 struct __ecereNameSpace__ecere__com__Class * next;
7411 unsigned int (* Constructor)(void * );
7412 void (* Destructor)(void * );
7415 struct __ecereNameSpace__ecere__com__Class * base;
7416 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7417 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7418 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7419 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7420 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7421 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7425 struct __ecereNameSpace__ecere__com__Instance * module;
7426 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7427 const char * dataTypeString;
7428 struct Type * dataType;
7430 int defaultAlignment;
7431 void (* Initialize)();
7433 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7434 const char * designerClass;
7435 unsigned int noExpansion;
7436 const char * defaultProperty;
7437 unsigned int comRedefinition;
7440 unsigned int internalDecl;
7442 unsigned int computeSize;
7443 short structAlignment;
7444 short pointerAlignment;
7445 int destructionWatchOffset;
7447 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7448 int inheritanceAccess;
7449 const char * fullName;
7451 struct __ecereNameSpace__ecere__sys__OldList conversions;
7452 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7453 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7454 struct __ecereNameSpace__ecere__com__Class * templateClass;
7455 struct __ecereNameSpace__ecere__sys__OldList templatized;
7457 unsigned int isInstanceClass;
7458 unsigned int byValueSystemClass;
7461 struct __ecereNameSpace__ecere__com__NameSpace
7464 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7465 struct __ecereNameSpace__ecere__com__NameSpace * left;
7466 struct __ecereNameSpace__ecere__com__NameSpace * right;
7468 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7469 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7470 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7471 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7472 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7475 struct __ecereNameSpace__ecere__com__DataMember
7477 struct __ecereNameSpace__ecere__com__DataMember * prev;
7478 struct __ecereNameSpace__ecere__com__DataMember * next;
7480 unsigned int isProperty;
7483 struct __ecereNameSpace__ecere__com__Class * _class;
7484 const char * dataTypeString;
7485 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7486 struct Type * dataType;
7490 struct __ecereNameSpace__ecere__sys__OldList members;
7491 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7493 short structAlignment;
7494 short pointerAlignment;
7497 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7499 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7501 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7503 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7505 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7507 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7509 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7513 if(type->kind == 11)
7515 struct Type * param;
7517 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7518 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7519 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7521 else if(type->kind == 13)
7522 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7523 else if(type->kind == 8)
7525 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7527 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7529 else if(type->kind == 9 || type->kind == 10)
7531 struct Type * member;
7533 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7534 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7536 else if(type->kind == 12)
7537 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7541 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7543 unsigned int status = 1;
7545 if(((source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered) || source->kind == 12 || source->kind == 13) && ((dest->kind == 8 && dest->__anon1._class && dest->__anon1._class->__anon1.registered) || dest->kind == 13))
7547 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7548 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7550 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7552 struct Type * sourceType = source, * destType = dest;
7554 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7555 sourceType = sourceType->__anon1.type;
7556 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7557 destType = destType->__anon1.type;
7558 if(!destType->constant && sourceType->constant)
7562 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7569 struct Operand GetOperand(struct Expression * exp)
7578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7581 struct Type * type = exp->expType;
7585 while(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
7587 if(!type->__anon1._class->__anon1.registered->dataType)
7588 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7589 type = type->__anon1._class->__anon1.registered->dataType;
7591 if(exp->type == 3 && op.kind == 13)
7593 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7597 else if(exp->isConstant && exp->type == 2)
7599 op.kind = type->kind;
7606 if(exp->__anon1.__anon1.constant[0] == '\'')
7608 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7611 else if(type->isSigned)
7613 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7618 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7624 if(exp->__anon1.__anon1.constant[0] == '\'')
7626 op.__anon1.s = exp->__anon1.__anon1.constant[1];
7629 else if(type->isSigned)
7631 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7636 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7642 if(exp->__anon1.__anon1.constant[0] == '\'')
7644 op.__anon1.i = exp->__anon1.__anon1.constant[1];
7647 else if(type->isSigned)
7649 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7654 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7662 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7667 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7675 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7680 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7688 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7693 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7699 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7700 op.__anon1.f = __ecereMethod_float_inf();
7701 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7702 op.__anon1.f = -__ecereMethod_float_inf();
7703 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7704 op.__anon1.f = __ecereMethod_float_nan();
7705 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7706 op.__anon1.f = -__ecereMethod_float_nan();
7708 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7712 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7713 op.__anon1.d = __ecereMethod_double_inf();
7714 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7715 op.__anon1.d = -__ecereMethod_double_inf();
7716 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7717 op.__anon1.d = __ecereMethod_double_nan();
7718 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7719 op.__anon1.d = -__ecereMethod_double_nan();
7721 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7727 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7737 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7741 switch(_class->typeSize)
7744 if(!strcmp(_class->dataTypeString, "uint64"))
7745 v = (long long)*(uint64 *)ptr;
7747 v = *(long long *)ptr;
7750 if(!strcmp(_class->dataTypeString, "uint"))
7751 v = (long long)*(unsigned int *)ptr;
7753 v = (long long)*(int *)ptr;
7756 if(!strcmp(_class->dataTypeString, "uint16"))
7757 v = (long long)*(unsigned short *)ptr;
7759 v = (long long)*(short *)ptr;
7762 if(!strcmp(_class->dataTypeString, "byte"))
7763 v = (long long)*(unsigned char *)ptr;
7765 v = (long long)*(char *)ptr;
7771 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7773 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7774 ListAdd(specs, MkSpecifier(UNSIGNED));
7779 if(type->__anon1._class->__anon1.registered)
7781 if(!type->__anon1._class->__anon1.registered->dataType)
7782 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7783 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7788 ListAdd(specs, MkSpecifier(DOUBLE));
7791 ListAdd(specs, MkSpecifier(FLOAT));
7794 ListAdd(specs, MkSpecifier(CHAR));
7797 ListAdd(specs, MkSpecifier(_BOOL));
7800 ListAdd(specs, MkSpecifier(SHORT));
7803 ListAdd(specs, MkSpecifier(INT64));
7806 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7809 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7813 ListAdd(specs, MkSpecifier(INT));
7818 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7822 if(printConst && type->constant)
7823 strcat(string, "const ");
7828 struct Symbol * c = type->__anon1._class;
7829 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7831 if(type->classObjectType == 2 && isObjectBaseClass)
7832 strcat(string, "typed_object");
7833 else if(type->classObjectType == 3 && isObjectBaseClass)
7834 strcat(string, "any_object");
7838 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7840 if(type->byReference)
7841 strcat(string, " &");
7845 strcat(string, "void");
7848 strcat(string, type->isSigned ? "int" : "uint");
7851 strcat(string, type->isSigned ? "int64" : "uint64");
7854 strcat(string, type->isSigned ? "intptr" : "uintptr");
7857 strcat(string, type->isSigned ? "intsize" : "uintsize");
7860 strcat(string, type->isSigned ? "char" : "byte");
7863 strcat(string, "_Bool");
7866 strcat(string, type->isSigned ? "short" : "uint16");
7869 strcat(string, "float");
7872 strcat(string, "double");
7875 if(type->__anon1.__anon1.enumName)
7877 strcat(string, "struct ");
7878 strcat(string, type->__anon1.__anon1.enumName);
7880 else if(type->typeName)
7881 strcat(string, type->typeName);
7884 struct Type * member;
7886 strcat(string, "struct { ");
7887 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7889 PrintType(member, string, 1, fullName);
7890 strcat(string, "; ");
7892 strcat(string, "}");
7896 if(type->__anon1.__anon1.enumName)
7898 strcat(string, "union ");
7899 strcat(string, type->__anon1.__anon1.enumName);
7901 else if(type->typeName)
7902 strcat(string, type->typeName);
7905 strcat(string, "union ");
7906 strcat(string, "(unnamed)");
7910 if(type->__anon1.__anon1.enumName)
7912 strcat(string, "enum ");
7913 strcat(string, type->__anon1.__anon1.enumName);
7915 else if(type->typeName)
7916 strcat(string, type->typeName);
7918 strcat(string, "int");
7921 strcat(string, "...");
7924 strcat(string, "subclass(");
7925 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7926 strcat(string, ")");
7929 strcat(string, type->__anon1.templateParameter->identifier->string);
7932 strcat(string, "thisclass");
7935 strcat(string, "__builtin_va_list");
7941 unsigned int RelatedUnits(struct __ecereNameSpace__ecere__com__Class * c1, struct __ecereNameSpace__ecere__com__Class * c2)
7943 if(c1->base->type == 3)
7945 if(c2->base->type == 3)
7950 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7954 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7956 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7958 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7960 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7962 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7964 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7966 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7968 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7970 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7972 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7974 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7976 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7978 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7980 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7982 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7984 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7986 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7988 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7990 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7992 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7994 struct __ecereNameSpace__ecere__com__Application
7997 const char * * argv;
7999 unsigned int isGUIApp;
8000 struct __ecereNameSpace__ecere__sys__OldList allModules;
8001 char * parsedCommand;
8002 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
8005 static void FindNextDataMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
8009 *curMember = (*curMember)->next;
8010 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
8012 *curMember = subMemberStack[--(*subMemberStackPos)];
8013 *curMember = (*curMember)->next;
8015 while((*curMember) && (*curMember)->isProperty)
8016 *curMember = (*curMember)->next;
8017 if(subMemberStackPos)
8019 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8021 subMemberStack[(*subMemberStackPos)++] = *curMember;
8022 *curMember = (*curMember)->members.first;
8023 while(*curMember && (*curMember)->isProperty)
8024 *curMember = (*curMember)->next;
8032 if(subMemberStackPos && *subMemberStackPos)
8034 *curMember = subMemberStack[--(*subMemberStackPos)];
8035 *curMember = (*curMember)->next;
8039 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8041 if(*curClass == _class)
8043 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8045 *curMember = (*curClass)->membersAndProperties.first;
8047 while((*curMember) && (*curMember)->isProperty)
8048 *curMember = (*curMember)->next;
8049 if(subMemberStackPos)
8051 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8053 subMemberStack[(*subMemberStackPos)++] = *curMember;
8054 *curMember = (*curMember)->members.first;
8055 while(*curMember && (*curMember)->isProperty)
8056 *curMember = (*curMember)->next;
8063 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8065 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8066 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8067 struct __ecereNameSpace__ecere__com__NameSpace * child;
8071 for(child = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->nameSpaces); child; child = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)child)))
8073 data = ScanGlobalData(child, name);
8081 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8083 int nsLen = strlen(nameSpace);
8084 struct Symbol * symbol;
8086 for(symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(tree, nameSpace); symbol; symbol = (struct Symbol *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)symbol)))
8088 char * s = symbol->string;
8090 if(!strncmp(s, nameSpace, nsLen))
8095 for(c = strlen(s) - 1; c >= 0; c--)
8098 namePart = s + c + 1;
8099 if(!strcmp(namePart, name))
8107 return (((void *)0));
8110 unsigned int GetInt(struct Expression * exp, int * value2)
8112 struct Operand op2 = GetOperand(exp);
8114 return GetOpInt(&op2, value2);
8117 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8119 struct Operand op2 = GetOperand(exp);
8121 return GetOpUInt(&op2, value2);
8124 unsigned int GetInt64(struct Expression * exp, long long * value2)
8126 struct Operand op2 = GetOperand(exp);
8128 return GetOpInt64(&op2, value2);
8131 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8133 struct Operand op2 = GetOperand(exp);
8135 return GetOpUInt64(&op2, value2);
8138 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8140 struct Operand op2 = GetOperand(exp);
8142 return GetOpIntPtr(&op2, value2);
8145 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8147 struct Operand op2 = GetOperand(exp);
8149 return GetOpUIntPtr(&op2, value2);
8152 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8154 struct Operand op2 = GetOperand(exp);
8156 return GetOpIntSize(&op2, value2);
8159 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8161 struct Operand op2 = GetOperand(exp);
8163 return GetOpUIntSize(&op2, value2);
8166 unsigned int GetShort(struct Expression * exp, short * value2)
8168 struct Operand op2 = GetOperand(exp);
8170 return GetOpShort(&op2, value2);
8173 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8175 struct Operand op2 = GetOperand(exp);
8177 return GetOpUShort(&op2, value2);
8180 unsigned int GetChar(struct Expression * exp, char * value2)
8182 struct Operand op2 = GetOperand(exp);
8184 return GetOpChar(&op2, value2);
8187 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8189 struct Operand op2 = GetOperand(exp);
8191 return GetOpUChar(&op2, value2);
8194 unsigned int GetFloat(struct Expression * exp, float * value2)
8196 struct Operand op2 = GetOperand(exp);
8198 return GetOpFloat(&op2, value2);
8201 unsigned int GetDouble(struct Expression * exp, double * value2)
8203 struct Operand op2 = GetOperand(exp);
8205 return GetOpDouble(&op2, value2);
8208 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8210 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8212 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8213 PrintAttribs(type, string);
8214 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8215 strcat(string, " const");
8216 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8217 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8218 strcat(string, " (");
8219 if(type->kind == 13)
8221 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8222 PrintAttribs(type->__anon1.type, string);
8224 if(type->kind == 13)
8226 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8227 strcat(string, "*");
8229 strcat(string, " *");
8231 if(printConst && type->constant && type->kind == 13)
8232 strcat(string, " const");
8235 PrintTypeSpecs(type, string, fullName, printConst);
8238 void PrintExpression(struct Expression * exp, char * string)
8241 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8243 unsigned int backOutputLineNumbers = outputLineNumbers;
8245 outputLineNumbers = 0;
8247 OutputExpression(exp, f);
8248 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8249 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8251 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8252 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8253 count = strlen(string);
8254 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8255 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8257 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8258 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8259 string[count] = '\0';
8260 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8261 outputLineNumbers = backOutputLineNumbers;
8265 struct Type * Dereference(struct Type * source)
8267 struct Type * type = (((void *)0));
8271 if(source->kind == 13 || source->kind == 12)
8273 type = source->__anon1.type;
8274 source->__anon1.type->refCount++;
8276 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8278 type = __extension__ ({
8279 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8281 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8284 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8290 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8295 static struct Type * Reference(struct Type * source)
8297 struct Type * type = (((void *)0));
8301 type = __extension__ ({
8302 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8304 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8311 void modifyPassAsTemplate(struct Type ** typePtr, unsigned int value)
8313 if(*typePtr && (*typePtr)->passAsTemplate != value)
8315 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type);
8317 CopyTypeInto(type, *typePtr);
8318 type->passAsTemplate = value;
8324 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8326 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8328 FreeExpContents(checkedExp);
8329 FreeType(checkedExp->expType);
8330 FreeType(checkedExp->destType);
8331 *checkedExp = *newExp;
8332 ((newExp ? __extension__ ({
8333 void * __ecerePtrToDelete = (newExp);
8335 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8336 }) : 0), newExp = 0);
8337 checkedExp->prev = prev;
8338 checkedExp->next = next;
8341 void FinishTemplatesContext(struct Context * context)
8343 PopContext(context);
8344 FreeContext(context);
8345 ((context ? __extension__ ({
8346 void * __ecerePtrToDelete = (context);
8348 __ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8349 }) : 0), context = 0);
8352 static __attribute__((unused)) void UnusedFunction()
8356 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass_int, (void *)&a, 0, 0, 0);
8359 struct Expression * ParseExpressionString(char * expression)
8362 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8363 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8364 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8366 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8367 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8368 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8369 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8371 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8372 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8374 parsedExpression = (((void *)0));
8376 expression_yyparse();
8377 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8378 return parsedExpression;
8381 struct __ecereNameSpace__ecere__com__Module
8383 struct __ecereNameSpace__ecere__com__Instance * application;
8384 struct __ecereNameSpace__ecere__sys__OldList classes;
8385 struct __ecereNameSpace__ecere__sys__OldList defines;
8386 struct __ecereNameSpace__ecere__sys__OldList functions;
8387 struct __ecereNameSpace__ecere__sys__OldList modules;
8388 struct __ecereNameSpace__ecere__com__Instance * prev;
8389 struct __ecereNameSpace__ecere__com__Instance * next;
8395 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8396 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8399 static struct GlobalData * FindGlobalData(char * name)
8402 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8404 nameSpace = globalData;
8405 for(c = 0; name[c]; c++)
8407 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8409 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8410 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8412 strncpy(spaceName, name + start, c - start);
8413 spaceName[c - start] = '\0';
8414 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8415 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8417 return (((void *)0));
8418 nameSpace = newSpace;
8426 return ScanGlobalData(nameSpace, name + start);
8428 return (((void *)0));
8431 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8434 char nameSpace[1024];
8435 const char * namePart;
8436 unsigned int gotColon = 0;
8438 nameSpace[0] = '\0';
8439 for(c = strlen(name) - 1; c >= 0; c--)
8445 namePart = name + c + 1;
8446 while(c >= 0 && name[c] == ':')
8450 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8454 memcpy(nameSpace, name, c + 1);
8455 nameSpace[c + 1] = 0;
8456 return ScanWithNameSpace(tree, nameSpace, namePart);
8460 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8466 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8470 return ScanWithNameSpace(tree, "", namePart);
8472 return (((void *)0));
8475 static void PrintArraySize(struct Type * arrayType, char * string)
8481 if(arrayType->__anon1.__anon4.enumClass)
8482 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8483 else if(arrayType->__anon1.__anon4.arraySizeExp)
8484 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8486 strcat(string, size);
8489 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8494 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8496 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8497 strcat(string, ")");
8498 if(type->kind == 12)
8499 PrintArraySize(type, string);
8500 else if(type->kind == 11)
8502 struct Type * param;
8504 strcat(string, "(");
8505 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8507 PrintType(param, string, 1, fullName);
8509 strcat(string, ", ");
8511 strcat(string, ")");
8513 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8514 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8517 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8519 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8520 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8521 strcat(string, " ");
8522 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8524 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8526 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8528 if(type->classObjectType == 1)
8529 strcat(string, "class");
8531 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8533 else if(_class && _class->string)
8535 char * s = _class->string;
8541 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8547 strcat(string, name);
8550 strcat(string, "::");
8552 if(printName && type->name)
8553 PrintName(type, string, fullName);
8554 PostPrintType(type, string, fullName);
8555 if(type->bitFieldCount)
8559 sprintf(count, ":%d", type->bitFieldCount);
8560 strcat(string, count);
8568 struct Conversion * prev, * next;
8569 struct __ecereNameSpace__ecere__com__Property * convert;
8571 struct Type * resultType;
8574 static void FreeConvert(struct Conversion * convert)
8576 if(convert->resultType)
8577 FreeType(convert->resultType);
8584 struct Enumerator * prev;
8585 struct Enumerator * next;
8586 struct Location loc;
8587 struct Identifier * id;
8588 struct Expression * exp;
8595 struct AsmField * prev;
8596 struct AsmField * next;
8597 struct Location loc;
8599 struct Expression * expression;
8600 struct Identifier * symbolic;
8603 struct ClassDefinition;
8607 struct Context * parent;
8608 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8609 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8610 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8611 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8614 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8615 struct ClassDefinition * classDef;
8616 unsigned int templateTypesOnly;
8617 unsigned int hasNameSpace;
8622 struct External * prev;
8623 struct External * next;
8624 struct Location loc;
8626 struct Symbol * symbol;
8629 struct FunctionDefinition * function;
8630 struct ClassDefinition * _class;
8631 struct Declaration * declaration;
8632 char * importString;
8633 struct Identifier * id;
8634 struct DBTableDef * table;
8635 } ecere_gcc_struct __anon1;
8637 struct External * fwdDecl;
8638 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8639 struct __ecereNameSpace__ecere__com__Instance * incoming;
8640 int nonBreakableIncoming;
8643 struct ClassDefinition
8645 struct ClassDefinition * prev;
8646 struct ClassDefinition * next;
8647 struct Location loc;
8648 struct Specifier * _class;
8649 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8650 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8651 struct Symbol * symbol;
8652 struct Location blockStart;
8653 struct Location nameLoc;
8655 unsigned int deleteWatchable;
8658 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8660 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8662 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8664 struct Symbol * symbol = data->symbol;
8666 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8671 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8674 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8677 struct Declaration * decl;
8678 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8679 struct Declarator * d;
8680 struct External * external;
8682 specifiers = MkList();
8683 declarators = MkList();
8684 ListAdd(specifiers, MkSpecifier(EXTERN));
8685 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8686 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8687 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8688 decl = MkDeclaration(specifiers, declarators);
8689 external = MkExternalDeclaration(decl);
8691 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8692 external->symbol = symbol;
8693 symbol->__anon2.__anon1.pointerExternal = external;
8694 DeclareType(external, data->dataType, 1, 1);
8697 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8698 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8701 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8703 struct Context * ctx;
8704 struct Symbol * symbol = (((void *)0));
8706 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8708 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8710 symbol = (((void *)0));
8715 strcpy(curName, thisNameSpace);
8716 strcat(curName, "::");
8717 strcat(curName, name);
8718 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8721 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8724 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8725 if(symbol || ctx == endContext)
8728 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8729 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8737 struct ClassDef * prev;
8738 struct ClassDef * next;
8739 struct Location loc;
8743 struct Declaration * decl;
8744 struct ClassFunction * function;
8745 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8746 struct PropertyDef * propertyDef;
8747 struct PropertyWatch * propertyWatch;
8749 struct Identifier * defaultProperty;
8752 struct Identifier * id;
8753 struct Initializer * initializer;
8754 } ecere_gcc_struct __anon1;
8755 } ecere_gcc_struct __anon1;
8762 struct PropertyDef * prev;
8763 struct PropertyDef * next;
8764 struct Location loc;
8765 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8766 struct Declarator * declarator;
8767 struct Identifier * id;
8768 struct Statement * getStmt;
8769 struct Statement * setStmt;
8770 struct Statement * issetStmt;
8771 struct Symbol * symbol;
8772 struct Expression * category;
8775 unsigned int conversion : 1;
8776 unsigned int isWatchable : 1;
8777 unsigned int isDBProp : 1;
8778 } ecere_gcc_struct __anon1;
8781 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8783 struct ClassDef * def;
8786 for(def = (*definitions).first; def; def = def->next)
8790 struct Declaration * decl = def->__anon1.decl;
8792 if(decl && decl->__anon1.__anon1.specifiers)
8794 struct Specifier * spec;
8795 unsigned int isStruct = 0;
8797 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8799 if(spec->type == 3 || spec->type == 4)
8801 if(spec->__anon1.__anon2.definitions)
8802 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8808 struct Declarator * d = (((void *)0));
8810 if(decl->__anon1.__anon1.declarators)
8812 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8814 struct Identifier * idDecl = GetDeclId(d);
8824 sprintf(id, "__anon%d", anonID++);
8825 if(!decl->__anon1.__anon1.declarators)
8826 decl->__anon1.__anon1.declarators = MkList();
8827 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8837 typedef union YYSTYPE
8842 struct Identifier * id;
8843 struct Expression * exp;
8844 struct Specifier * specifier;
8845 struct __ecereNameSpace__ecere__sys__OldList * list;
8846 struct Enumerator * enumerator;
8847 struct Declarator * declarator;
8848 struct Pointer * pointer;
8849 struct Initializer * initializer;
8850 struct InitDeclarator * initDeclarator;
8851 struct TypeName * typeName;
8852 struct Declaration * declaration;
8853 struct Statement * stmt;
8854 struct FunctionDefinition * function;
8855 struct External * external;
8856 struct Context * context;
8857 struct AsmField * asmField;
8858 struct Attrib * attrib;
8859 struct ExtDecl * extDecl;
8860 struct Attribute * attribute;
8861 struct Instantiation * instance;
8862 struct MembersInit * membersInit;
8863 struct MemberInit * memberInit;
8864 struct ClassFunction * classFunction;
8865 struct ClassDefinition * _class;
8866 struct ClassDef * classDef;
8867 struct PropertyDef * prop;
8869 struct Symbol * symbol;
8870 struct PropertyWatch * propertyWatch;
8871 struct TemplateParameter * templateParameter;
8872 struct TemplateArgument * templateArgument;
8873 struct TemplateDatatype * templateDatatype;
8874 struct DBTableEntry * dbtableEntry;
8875 struct DBIndexItem * dbindexItem;
8876 struct DBTableDef * dbtableDef;
8877 } ecere_gcc_struct YYSTYPE;
8879 extern YYSTYPE yylval;
8883 struct MemberInit * prev;
8884 struct MemberInit * next;
8885 struct Location loc;
8886 struct Location realLoc;
8887 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8888 struct Initializer * initializer;
8890 unsigned int variable;
8891 unsigned int takeOutExp;
8894 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8896 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8898 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8900 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8901 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8906 const char * dataTypeString;
8908 } ecere_gcc_struct __anon1;
8909 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8913 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8915 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8917 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8918 struct __ecereNameSpace__ecere__com__Class * sClass;
8920 for(sClass = _class; sClass; sClass = sClass->base)
8923 if(sClass->templateClass)
8924 sClass = sClass->templateClass;
8925 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8927 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8929 for(sClass = sClass->base; sClass; sClass = sClass->base)
8931 if(sClass->templateClass)
8932 sClass = sClass->templateClass;
8933 id += sClass->templateParams.count;
8944 arg = &_class->templateArgs[id];
8945 if(arg && param->type == 0)
8946 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8951 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8953 struct Context * context = PushContext();
8955 context->templateTypesOnly = 1;
8956 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8958 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8960 for(; param; param = param->next)
8962 if(param->type == 0 && param->identifier)
8964 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8966 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8972 struct __ecereNameSpace__ecere__com__Class * sClass;
8974 for(sClass = _class; sClass; sClass = sClass->base)
8976 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8978 for(p = sClass->templateParams.first; p; p = p->next)
8982 struct TemplateParameter * param = p->param;
8983 struct TemplatedType * type;
8987 p->param = param = __extension__ ({
8988 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8990 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8993 type = __extension__ ({
8994 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8996 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8998 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
9006 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
9008 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9010 unsigned int first = 1;
9012 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9014 char className[1024];
9016 strcpy(className, _class->fullName);
9017 for(param = _class->templateParams.first; param; param = param->next)
9021 strcat(className, "<");
9023 strcat(className, ", ");
9024 if(lastParam + 1 != p)
9026 strcat(className, param->name);
9027 strcat(className, " = ");
9029 strcat(className, param->name);
9037 int len = strlen(className);
9039 if(className[len - 1] == '>')
9040 className[len++] = ' ';
9041 className[len++] = '>';
9042 className[len++] = '\0';
9044 return __ecereNameSpace__ecere__sys__CopyString(className);
9047 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
9050 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9054 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9056 unsigned int first = 1;
9058 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9060 char className[1024];
9062 strcpy(className, _class->fullName);
9063 for(param = _class->templateParams.first; param; param = param->next)
9067 strcat(className, "<");
9069 strcat(className, ", ");
9070 if(lastParam + 1 != p)
9072 strcat(className, param->name);
9073 strcat(className, " = ");
9075 strcat(className, param->name);
9083 int len = strlen(className);
9085 if(className[len - 1] == '>')
9086 className[len++] = ' ';
9087 className[len++] = '>';
9088 className[len++] = '\0';
9090 type = MkClassType(className);
9094 type = MkClassType(_class->fullName);
9099 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9101 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9102 struct __ecereNameSpace__ecere__com__DataMember * member;
9103 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9105 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9106 DeclareMembers(neededBy, _class->base, 0);
9107 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9109 if(!member->isProperty)
9111 switch(member->type)
9115 if(!member->dataType && member->dataTypeString)
9116 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9117 if(member->dataType)
9118 DeclareType(neededBy, member->dataType, 1, 0);
9124 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9131 FinishTemplatesContext(context);
9132 return topMember ? topMember->memberID : _class->memberID;
9135 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9137 if(!method->dataType)
9139 struct Context * context = SetupTemplatesContext(method->_class);
9141 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9142 FinishTemplatesContext(context);
9143 if(method->type != 1 && method->dataType)
9145 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9147 if(!method->_class->symbol)
9148 method->_class->symbol = FindClass(method->_class->fullName);
9149 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9155 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9159 struct Context * context = SetupTemplatesContext(prop->_class);
9161 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9162 FinishTemplatesContext(context);
9166 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9168 if(specs != (((void *)0)) && _class)
9170 struct Specifier * spec;
9172 for(spec = specs->first; spec; spec = spec->next)
9174 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9177 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9178 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9184 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9186 struct Identifier * id = exp->__anon1.__anon1.identifier;
9187 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9188 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9189 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9190 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9192 if(_class && _class->type == 4)
9194 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9195 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9199 struct __ecereNameSpace__ecere__com__Class * baseClass;
9201 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9203 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9205 for(value = e->values.first; value; value = value->next)
9207 if(!strcmp(value->name, id->string))
9212 exp->isConstant = 1;
9213 if(inCompiler || inPreCompiler || inDebugger)
9217 FreeExpContents(exp);
9219 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9220 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9222 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9223 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9225 exp->expType = MkClassType(baseClass->fullName);
9233 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9235 ProcessMethodType(method);
9236 exp->expType = __extension__ ({
9237 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9239 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9243 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9246 ProcessPropertyType(prop);
9247 exp->expType = prop->dataType;
9249 prop->dataType->refCount++;
9252 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9254 if(!member->dataType)
9255 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9256 exp->expType = member->dataType;
9257 if(member->dataType)
9258 member->dataType->refCount++;
9261 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9263 if(!classProp->dataType)
9264 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9265 if(classProp->constant)
9267 FreeExpContents(exp);
9268 exp->isConstant = 1;
9269 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9272 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9279 sprintf(constant, "%d", (int)classProp->Get(_class));
9280 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9286 exp->expType = classProp->dataType;
9287 if(classProp->dataType)
9288 classProp->dataType->refCount++;
9294 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9296 struct Symbol * symbol = prop->symbol;
9297 unsigned int imported = 0;
9298 unsigned int dllImport = 0;
9299 struct External * structExternal = (((void *)0));
9300 struct External * instExternal = (((void *)0));
9302 strcpy(setName, "__ecereProp_");
9303 FullClassNameCat(setName, prop->_class->fullName, 0);
9304 strcat(setName, "_Set_");
9305 FullClassNameCat(setName, prop->name, 1);
9306 strcpy(getName, "__ecereProp_");
9307 FullClassNameCat(getName, prop->_class->fullName, 0);
9308 strcat(getName, "_Get_");
9309 FullClassNameCat(getName, prop->name, 1);
9310 if(!symbol || symbol->_import)
9314 struct Symbol * classSym;
9316 if(!prop->_class->symbol)
9317 prop->_class->symbol = FindClass(prop->_class->fullName);
9318 classSym = prop->_class->symbol;
9319 if(classSym && !classSym->_import)
9321 struct ModuleImport * module;
9323 if(prop->_class->module)
9324 module = FindModule(prop->_class->module);
9326 module = mainModule;
9327 classSym->_import = __extension__ ({
9328 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9330 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9332 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9334 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9335 symbol->_import = (struct ClassImport *)__extension__ ({
9336 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9338 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9341 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9344 if((prop->_class->module != privateModule || !strcmp(prop->_class->name, "float") || !strcmp(prop->_class->name, "double")) && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)prop->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9349 struct Context * context = SetupTemplatesContext(prop->_class);
9351 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9352 FinishTemplatesContext(context);
9354 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9356 if(prop->_class->type == 0 && prop->_class->structSize)
9357 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9358 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9360 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9362 struct Declaration * decl;
9363 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9364 struct Declarator * d;
9365 struct __ecereNameSpace__ecere__sys__OldList * params;
9366 struct Specifier * spec = (((void *)0));
9367 struct External * external;
9368 struct Declarator * typeDecl;
9369 unsigned int simple = 0;
9370 unsigned int needReference;
9372 specifiers = MkList();
9373 declarators = MkList();
9375 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9376 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9378 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9380 struct Context * context = SetupTemplatesContext(prop->_class);
9382 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9383 FinishTemplatesContext(context);
9385 needReference = !typeDecl || typeDecl->type == 1;
9386 for(spec = (*specifiers).first; spec; spec = spec->next)
9390 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9394 symbol->_class = classSym->__anon1.registered;
9395 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9402 d = PlugDeclarator(typeDecl, d);
9405 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9406 specifiers = MkList();
9408 d = MkDeclaratorFunction(d, params);
9410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9411 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9412 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9414 ListAdd(specifiers, MkSpecifier(VOID));
9415 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9416 decl = MkDeclaration(specifiers, declarators);
9417 external = MkExternalDeclaration(decl);
9419 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9421 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9423 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9424 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9425 external->symbol = symbol;
9426 symbol->__anon2.__anon2.externalGet = external;
9427 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9429 FreeDeclarator(typeDecl);
9431 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9433 struct Declaration * decl;
9434 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9435 struct Declarator * d;
9436 struct __ecereNameSpace__ecere__sys__OldList * params;
9437 struct Specifier * spec = (((void *)0));
9438 struct External * external;
9439 struct Declarator * typeDecl;
9440 unsigned int needReference;
9442 declarators = MkList();
9444 if(!prop->conversion || prop->_class->type == 1)
9446 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9448 specifiers = MkList();
9450 struct Context * context = SetupTemplatesContext(prop->_class);
9452 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9453 FinishTemplatesContext(context);
9455 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9456 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9457 ListAdd(params, MkTypeName(specifiers, d));
9458 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9460 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9461 d = MkDeclaratorFunction(d, params);
9462 needReference = !typeDecl || typeDecl->type == 1;
9463 for(spec = (*specifiers).first; spec; spec = spec->next)
9467 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9470 symbol->_class = classSym->__anon1.registered;
9474 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9475 specifiers = MkList();
9477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9478 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9479 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9480 if(!prop->conversion || prop->_class->type == 1)
9481 ListAdd(specifiers, MkSpecifier(VOID));
9483 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9484 decl = MkDeclaration(specifiers, declarators);
9485 external = MkExternalDeclaration(decl);
9487 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9489 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9491 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9493 external->symbol = symbol;
9494 symbol->__anon2.__anon2.externalSet = external;
9495 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9497 if(!symbol->__anon2.__anon2.externalPtr)
9499 struct Declaration * decl;
9500 struct External * external;
9501 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9502 char propName[1024];
9505 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9508 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9509 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9511 ListAdd(specifiers, MkSpecifierName("Property"));
9512 strcpy(propName, "__ecereProp_");
9513 FullClassNameCat(propName, prop->_class->fullName, 0);
9514 strcat(propName, "_");
9515 FullClassNameCat(propName, prop->name, 1);
9517 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9519 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9522 strcpy(propName, "__ecerePropM_");
9523 FullClassNameCat(propName, prop->_class->fullName, 0);
9524 strcat(propName, "_");
9525 FullClassNameCat(propName, prop->name, 1);
9526 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9528 decl = MkDeclaration(specifiers, list);
9530 external = MkExternalDeclaration(decl);
9531 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9532 external->symbol = symbol;
9533 symbol->__anon2.__anon2.externalPtr = external;
9535 if(inCompiler && neededBy)
9537 if(symbol->__anon2.__anon2.externalPtr)
9538 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9539 if(symbol->__anon2.__anon2.externalGet)
9540 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9541 if(symbol->__anon2.__anon2.externalSet)
9542 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9546 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9548 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9550 struct Symbol * symbol = method->symbol;
9552 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9554 unsigned int dllImport = 0;
9556 if(!method->dataType)
9557 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9559 if(!symbol || method->type == 1)
9561 struct Symbol * classSym;
9563 if(!method->_class->symbol)
9564 method->_class->symbol = FindClass(method->_class->fullName);
9565 classSym = method->_class->symbol;
9566 if(!classSym->_import)
9568 struct ModuleImport * module;
9570 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9571 module = FindModule(method->_class->module);
9573 module = mainModule;
9574 classSym->_import = __extension__ ({
9575 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9577 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9579 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9583 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9585 if(!symbol->_import)
9587 symbol->_import = (struct ClassImport *)__extension__ ({
9588 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9590 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9592 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9596 symbol->type = method->dataType;
9598 symbol->type->refCount++;
9601 if(!method->dataType->dllExport)
9603 if((method->_class->module != privateModule || !strcmp(method->_class->name, "float") || !strcmp(method->_class->name, "double")) && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9609 struct Declaration * decl;
9610 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9611 struct Declarator * d;
9612 struct Declarator * funcDecl;
9613 struct External * external;
9615 specifiers = MkList();
9616 declarators = MkList();
9618 ListAdd(specifiers, MkSpecifier(EXTERN));
9619 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9620 ListAdd(specifiers, MkSpecifier(STATIC));
9621 if(method->type == 1)
9623 ListAdd(specifiers, MkSpecifier(INT));
9624 d = MkDeclaratorIdentifier(MkIdentifier(name));
9628 d = MkDeclaratorIdentifier(MkIdentifier(name));
9630 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9632 struct Context * context = SetupTemplatesContext(method->_class);
9634 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9635 FinishTemplatesContext(context);
9637 funcDecl = GetFuncDecl(d);
9640 struct Specifier * spec, * next;
9642 for(spec = (*specifiers).first; spec; spec = next)
9647 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9648 FreeSpecifier(spec);
9652 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9654 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9656 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9657 struct TypeName * thisParam = MkTypeName(MkListOne(MkSpecifierName(method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->string : method->_class->fullName)), (_class && _class->type == 1000) ? MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("this"))) : MkDeclaratorIdentifier(MkIdentifier("this")));
9658 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9659 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9661 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9663 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9665 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9666 FreeTypeName(param);
9668 if(!funcDecl->__anon1.function.parameters)
9669 funcDecl->__anon1.function.parameters = MkList();
9670 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9674 ProcessDeclarator(d, 1);
9675 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9676 decl = MkDeclaration(specifiers, declarators);
9677 ReplaceThisClassSpecifiers(specifiers, method->_class);
9678 external = MkExternalDeclaration(decl);
9679 external->symbol = symbol;
9680 symbol->__anon2.__anon1.pointerExternal = external;
9681 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9682 DeclareStruct(external, method->_class->fullName, 1, 1);
9683 if(method->dataType)
9684 DeclareType(external, method->dataType, 1, 1);
9687 if(inCompiler && neededFor)
9689 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9691 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9695 struct __ecereNameSpace__ecere__com__GlobalFunction;
9697 struct __ecereNameSpace__ecere__com__GlobalFunction
9699 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9700 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9703 struct __ecereNameSpace__ecere__com__Instance * module;
9704 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9705 const char * dataTypeString;
9706 struct Type * dataType;
9710 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9712 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
9714 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9716 struct Symbol * symbol = function->symbol;
9718 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9720 unsigned int imported = 0;
9721 unsigned int dllImport = 0;
9723 if(!function->dataType)
9725 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9726 if(!function->dataType->__anon1.__anon2.thisClass)
9727 function->dataType->__anon1.__anon2.staticMethod = 1;
9733 struct ModuleImport * module = FindModule(function->module);
9735 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9738 if(!function->dataType->dllExport)
9740 symbol->_import = (struct ClassImport *)__extension__ ({
9741 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9743 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9745 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9749 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9750 if(!symbol->type->__anon1.__anon2.thisClass)
9751 symbol->type->__anon1.__anon2.staticMethod = 1;
9754 imported = symbol->_import ? 1 : 0;
9755 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9761 struct Declaration * decl;
9762 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9763 struct Declarator * d;
9764 struct Declarator * funcDecl;
9765 struct External * external;
9767 specifiers = MkList();
9768 declarators = MkList();
9769 ListAdd(specifiers, MkSpecifier(EXTERN));
9770 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9772 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9773 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9774 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9776 struct Specifier * spec;
9778 for(spec = (*specifiers).first; spec; spec = spec->next)
9779 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9781 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9782 FreeSpecifier(spec);
9786 funcDecl = GetFuncDecl(d);
9787 if(funcDecl && !funcDecl->__anon1.function.parameters)
9789 funcDecl->__anon1.function.parameters = MkList();
9790 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9792 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9794 struct Context * oldCtx = curContext;
9796 curContext = globalContext;
9797 decl = MkDeclaration(specifiers, declarators);
9798 curContext = oldCtx;
9800 external = MkExternalDeclaration(decl);
9801 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9802 external->symbol = symbol;
9803 symbol->__anon2.__anon1.pointerExternal = external;
9804 DeclareType(external, function->dataType, 1, 1);
9808 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9809 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9810 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1) ? 1 : 0;
9813 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9815 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9822 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9823 strcpy(name, "__ecereFunction_");
9824 FullClassNameCat(name, s, 0);
9825 DeclareFunction(neededBy, function, name);
9828 FindSymbol(s, globalContext, globalContext, 0, 0);
9831 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9833 char propName[1024], propNameM[1024];
9834 char getName[1024], setName[1024];
9835 struct __ecereNameSpace__ecere__sys__OldList * args;
9837 DeclareProperty(curExternal, prop, setName, getName);
9838 strcpy(propName, "__ecereProp_");
9839 FullClassNameCat(propName, prop->_class->fullName, 0);
9840 strcat(propName, "_");
9841 FullClassNameCat(propName, prop->name, 1);
9842 strcpy(propNameM, "__ecerePropM_");
9843 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9844 strcat(propNameM, "_");
9845 FullClassNameCat(propNameM, prop->name, 1);
9846 if(prop->isWatchable)
9849 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9850 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9851 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9853 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9854 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9855 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9856 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9860 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9861 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9862 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9864 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9865 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9866 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9867 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9869 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9870 curFunction->propSet->fireWatchersDone = 1;
9873 struct __ecereNameSpace__ecere__com__SubModule;
9875 struct __ecereNameSpace__ecere__com__SubModule
9877 struct __ecereNameSpace__ecere__com__SubModule * prev;
9878 struct __ecereNameSpace__ecere__com__SubModule * next;
9879 struct __ecereNameSpace__ecere__com__Instance * module;
9883 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9885 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9887 if(searchFor == searchIn)
9889 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9891 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9893 if(ModuleVisibility(subModule->module, searchFor))
9900 int ComputeTypeSize(struct Type * type);
9902 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9904 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9905 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9907 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))
9909 int unionMemberOffset = 0;
9914 member->memberOffset = 0;
9915 if(targetBits < sizeof(void *) * 8)
9916 member->structAlignment = 0;
9918 else if(targetBits < sizeof(void *) * 8)
9919 _class->structAlignment = 0;
9920 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
9921 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
9922 if(!member && _class->destructionWatchOffset)
9923 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
9925 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9927 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
9929 if(!dataMember->isProperty)
9931 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
9933 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9939 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9941 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
9943 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
9945 if(!isMember && _class->type == 2 && dataMember->dataType)
9947 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
9951 ComputeTypeSize(dataMember->dataType);
9952 if(bitMember->pos == -1)
9953 bitMember->pos = _class->memberOffset;
9954 if(!bitMember->size)
9955 bitMember->size = dataMember->dataType->size * 8;
9956 _class->memberOffset = bitMember->pos + bitMember->size;
9957 for(d = 0; d < bitMember->size; d++)
9963 bitMember->mask = mask << bitMember->pos;
9965 else if(dataMember->type == 0 && dataMember->dataType)
9970 if(dataMember->dataType->kind != 8 || ((!dataMember->dataType->__anon1._class || !dataMember->dataType->__anon1._class->__anon1.registered || dataMember->dataType->__anon1._class->__anon1.registered != _class || _class->type != 1)))
9971 ComputeTypeSize(dataMember->dataType);
9972 if(dataMember->dataType->bitFieldCount)
9974 bitFields += dataMember->dataType->bitFieldCount;
9981 int size = (bitFields + 7) / 8;
9985 int __simpleStruct0;
9989 short __simpleStruct0;
9991 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
9992 if(member->memberOffset % alignment)
9993 member->memberOffset += alignment - (member->memberOffset % alignment);
9995 dataMember->offset = member->memberOffset;
9996 if(member->type == 1)
9997 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10000 member->memberOffset += size;
10007 short __simpleStruct0;
10009 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10010 if(_class->memberOffset % alignment)
10011 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10013 dataMember->offset = _class->memberOffset;
10014 _class->memberOffset += size;
10018 size = dataMember->dataType->size;
10019 alignment = dataMember->dataType->alignment;
10023 int __simpleStruct0;
10027 short __simpleStruct0;
10029 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10030 if(member->memberOffset % alignment)
10031 member->memberOffset += alignment - (member->memberOffset % alignment);
10033 dataMember->offset = member->memberOffset;
10034 if(member->type == 1)
10035 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10038 member->memberOffset += size;
10045 short __simpleStruct0;
10047 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10048 if(_class->memberOffset % alignment)
10049 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10051 dataMember->offset = _class->memberOffset;
10052 _class->memberOffset += size;
10059 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10060 alignment = dataMember->structAlignment;
10063 int __simpleStruct0;
10067 short __simpleStruct0;
10069 if(member->memberOffset % alignment)
10070 member->memberOffset += alignment - (member->memberOffset % alignment);
10071 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10073 dataMember->offset = member->memberOffset;
10074 if(member->type == 1)
10075 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10077 member->memberOffset += dataMember->memberOffset;
10083 short __simpleStruct0;
10085 if(_class->memberOffset % alignment)
10086 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10087 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10089 dataMember->offset = _class->memberOffset;
10090 _class->memberOffset += dataMember->memberOffset;
10098 int size = (bitFields + 7) / 8;
10102 int __simpleStruct0;
10106 short __simpleStruct0;
10108 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10109 if(member->memberOffset % alignment)
10110 member->memberOffset += alignment - (member->memberOffset % alignment);
10112 if(member->type == 1)
10113 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10116 member->memberOffset += size;
10123 short __simpleStruct0;
10125 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10126 if(_class->memberOffset % alignment)
10127 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10129 _class->memberOffset += size;
10134 if(member && member->type == 1)
10136 member->memberOffset = unionMemberOffset;
10140 if(_class->type != 2)
10144 if(_class->structAlignment)
10146 if(_class->memberOffset % _class->structAlignment)
10147 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10149 _class->structSize = (_class->base ? (_class->base->templateClass ? (_class->base->type == 5 ? _class->base->templateClass->memberOffset : _class->base->templateClass->structSize) : (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize)) : 0) + _class->memberOffset + extra;
10152 struct __ecereNameSpace__ecere__com__Property * prop;
10154 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10156 if(prop->isProperty && prop->isWatchable)
10158 prop->watcherOffset = _class->structSize;
10159 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10164 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10166 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10168 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10170 if(deriv->computeSize)
10172 deriv->offset = (_class->type == 5 ? _class->memberOffset : _class->structSize);
10173 deriv->memberOffset = 0;
10174 deriv->structSize = deriv->offset;
10175 ComputeClassMembers(deriv, 0);
10183 FinishTemplatesContext(context);
10186 int AddMembers(struct External * neededBy, 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)
10188 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10189 unsigned int totalSize = 0;
10190 unsigned int maxSize = 0;
10193 struct __ecereNameSpace__ecere__com__DataMember * member;
10195 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10199 if(!isMember && _class->base)
10201 maxSize = _class->structSize;
10203 if(_class->type == 1 || _class->type == 5)
10204 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10207 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10209 if(maxSize > baseSize)
10210 maxSize -= baseSize;
10216 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10218 if(!member->isProperty)
10220 switch(member->type)
10224 if(member->dataTypeString)
10226 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10227 struct Declarator * decl;
10229 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10230 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10231 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10232 if(!member->dataType)
10233 member->dataType = ProcessType(specs, decl);
10234 ReplaceThisClassSpecifiers(specs, topClass);
10236 struct Type * type = ProcessType(specs, decl);
10238 DeclareType(neededBy, member->dataType, 1, 0);
10241 ComputeTypeSize(member->dataType);
10242 size = member->dataType->size;
10243 alignment = member->dataType->alignment;
10246 if(totalSize % alignment)
10247 totalSize += alignment - (totalSize % alignment);
10256 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10259 sprintf(id, "__anon%d", anonID++);
10261 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10262 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10263 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10264 alignment = member->structAlignment;
10267 if(totalSize % alignment)
10268 totalSize += alignment - (totalSize % alignment);
10278 unsigned int __simpleStruct0;
10280 if(topMember && topMember->type == 1)
10281 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10283 *retSize += totalSize;
10285 else if(totalSize < maxSize && _class->type != 1000)
10287 int autoPadding = 0;
10289 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10290 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10291 if(totalSize + autoPadding < maxSize)
10293 char sizeString[50];
10295 sprintf(sizeString, "%d", maxSize - totalSize);
10296 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10302 FinishTemplatesContext(context);
10303 return topMember ? topMember->memberID : _class->memberID;
10306 unsigned int MatchTypes(struct Type * source, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, struct __ecereNameSpace__ecere__com__Class * owningClassSource, struct __ecereNameSpace__ecere__com__Class * owningClassDest, unsigned int doConversion, unsigned int enumBaseType, unsigned int acceptReversedParams, unsigned int isConversionExploration, unsigned int warnConst)
10311 CheckConstCompatibility(source, dest, 1);
10312 if(source->kind == 20 && dest->kind != 20)
10314 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10319 if(dest->kind == 20 && source->kind != 20)
10321 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10326 if(dest->classObjectType == 2 && dest->kind != 11)
10328 if(source->classObjectType != 3)
10332 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10340 if(source->kind != 11 && source->classObjectType == 3)
10342 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10345 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10347 if((dest->__anon1.__anon1.enumName && source->__anon1.__anon1.enumName && !strcmp(dest->__anon1.__anon1.enumName, source->__anon1.__anon1.enumName)) || (source->__anon1.__anon1.members.first && source->__anon1.__anon1.members.first == dest->__anon1.__anon1.members.first))
10350 if(dest->kind == 14 && source->kind != 0)
10352 if(dest->kind == 13 && dest->__anon1.type->kind == 0 && ((source->kind == 8 && (!source->__anon1._class || !source->__anon1._class->__anon1.registered || source->__anon1._class->__anon1.registered->type == 1 || source->__anon1._class->__anon1.registered->type == 0 || source->__anon1._class->__anon1.registered->type == 5 || source->__anon1._class->__anon1.registered->type == 1000)) || source->kind == 19 || source->kind == 13 || source->kind == 12 || source->kind == 11 || source->kind == 21))
10354 if(!isConversionExploration && source->kind == 13 && source->__anon1.type->kind == 0 && ((dest->kind == 8 && (!dest->__anon1._class || !dest->__anon1._class->__anon1.registered || dest->__anon1._class->__anon1.registered->type == 1 || dest->__anon1._class->__anon1.registered->type == 0 || dest->__anon1._class->__anon1.registered->type == 5 || dest->__anon1._class->__anon1.registered->type == 1000)) || dest->kind == 19 || dest->kind == 13 || dest->kind == 12 || dest->kind == 11 || dest->kind == 21))
10356 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10358 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10360 if(conversions != (((void *)0)))
10362 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10367 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10369 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10371 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10373 if(sourceBase == destBase)
10377 else if(source->__anon1._class && dest->__anon1._class && (dest->classObjectType == source->classObjectType || !dest->classObjectType) && (enumBaseType || (!source->__anon1._class->__anon1.registered || source->__anon1._class->__anon1.registered->type != 4) || (!dest->__anon1._class->__anon1.registered || dest->__anon1._class->__anon1.registered->type != 4)) && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, dest->__anon1._class->__anon1.registered))
10381 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && source->__anon1._class && source->__anon1._class->__anon1.registered && (dest->casted || (enumBaseType && dest->__anon1._class->__anon1.registered->type == 4 && (source->kind == 8 || source->__anon1._class->__anon1.registered->type != 4))))
10383 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10390 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10394 if(source->kind == 8)
10396 struct __ecereNameSpace__ecere__com__Class * _class;
10398 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10400 struct __ecereNameSpace__ecere__com__Property * convert;
10402 for(convert = _class->conversions.first; convert; convert = convert->next)
10404 if(convert->memberAccess == 1 || _class->module == privateModule)
10406 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10408 if(!convert->dataType)
10409 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10410 if((!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), (convert->dataType->kind == 8 && !strcmp(convert->dataTypeString, "String")) ? 1 : 0, convert->dataType->kind == 8, 0, 1, warnConst))
10412 if(!conversions && !convert->Get)
10414 else if(conversions != (((void *)0)))
10416 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (dest->kind != 8 || dest->__anon1._class->__anon1.registered != _class->base))
10420 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10422 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10431 if(dest->kind == 8)
10433 struct __ecereNameSpace__ecere__com__Class * _class;
10435 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10437 struct __ecereNameSpace__ecere__com__Property * convert;
10439 for(convert = _class->conversions.first; convert; convert = convert->next)
10441 if(convert->memberAccess == 1 || _class->module == privateModule)
10443 struct Type * constType = (((void *)0));
10444 unsigned int success = 0;
10446 if(!convert->dataType)
10447 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10448 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10450 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10452 constType = __extension__ ({
10453 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10455 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10457 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10458 ptrType->constant = 1;
10460 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10462 if(!conversions && !convert->Set)
10464 else if(conversions != (((void *)0)))
10466 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (source->kind != 8 || source->__anon1._class->__anon1.registered != _class->base))
10470 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10472 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
10478 FreeType(constType);
10484 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
10486 if(!dest->__anon1._class->__anon1.registered->dataType)
10487 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
10488 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
10490 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
10497 if(source->kind == 8)
10499 struct __ecereNameSpace__ecere__com__Class * _class;
10501 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10503 struct __ecereNameSpace__ecere__com__Property * convert;
10505 for(convert = _class->conversions.first; convert; convert = convert->next)
10507 if(convert->memberAccess == 1 || _class->module == privateModule)
10509 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10511 if(!convert->dataType)
10512 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10513 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0, 1, warnConst))
10515 if(!conversions && !convert->Get)
10517 else if(conversions != (((void *)0)))
10519 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (dest->kind != 8 || dest->__anon1._class->__anon1.registered != _class->base))
10523 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10525 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10533 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
10535 if(!source->__anon1._class->__anon1.registered->dataType)
10536 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
10537 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
10539 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
10541 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
10547 if(source->kind == 8 || source->kind == 19)
10549 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
10551 else if(dest->kind == 7 && source->kind == 6)
10553 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
10555 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
10557 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
10559 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
10561 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
10563 else if(source->kind == 15 && (dest->kind == 3 || dest->kind == 2 || dest->kind == 1 || source->kind == 24 || dest->kind == 5 || dest->kind == 4 || dest->kind == 22 || dest->kind == 23))
10565 else if(dest->kind == 15 && !isConversionExploration && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
10567 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && ((source->kind == 11 || (source->kind == 13 && source->__anon1.type->kind == 11) || source->kind == 16)))
10569 struct Type * paramSource, * paramDest;
10571 if(dest->kind == 16)
10572 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
10573 if(source->kind == 16)
10574 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
10575 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
10576 dest = dest->__anon1.type;
10577 if(source->kind == 13 && source->__anon1.type->kind == 11)
10578 source = source->__anon1.type;
10579 if(dest->kind == 16)
10580 dest = dest->__anon1.__anon3.method->dataType;
10581 if(source->kind == 16)
10582 source = source->__anon1.__anon3.method->dataType;
10583 paramSource = source->__anon1.__anon2.params.first;
10584 if(paramSource && paramSource->kind == 0)
10585 paramSource = (((void *)0));
10586 paramDest = dest->__anon1.__anon2.params.first;
10587 if(paramDest && paramDest->kind == 0)
10588 paramDest = (((void *)0));
10589 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
10591 if(!paramDest || (!(paramDest->kind == 13 && paramDest->__anon1.type && paramDest->__anon1.type->kind == 0) && (paramDest->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, paramDest->__anon1._class->__anon1.registered))))
10593 if(paramDest && paramDest->kind == 8)
10594 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
10596 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
10599 paramDest = paramDest->next;
10601 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
10603 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
10605 if(dest->__anon1.__anon2.thisClass)
10607 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
10609 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
10615 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
10617 if(owningClassDest)
10618 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
10620 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
10624 paramSource = paramSource->next;
10628 if(dest->__anon1.__anon2.thisClass)
10630 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
10632 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
10638 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
10640 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
10646 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
10648 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
10652 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
10653 for(; paramDest; paramDest = paramDest->next)
10657 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
10661 struct Type * paramDestType = paramDest;
10662 struct Type * paramSourceType = paramSource;
10663 struct Type * type = paramDestType;
10665 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
10668 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
10669 struct __ecereNameSpace__ecere__com__Class * sClass;
10671 for(sClass = owningClassSource; sClass; sClass = sClass->base)
10674 if(sClass->templateClass)
10675 sClass = sClass->templateClass;
10676 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
10678 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
10680 for(sClass = sClass->base; sClass; sClass = sClass->base)
10682 if(sClass->templateClass)
10683 sClass = sClass->templateClass;
10684 id += sClass->templateParams.count;
10695 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
10697 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
10700 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst)))
10705 PrintType(paramDest, type, 0, 1);
10706 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
10707 if(paramDestType != paramDest)
10708 FreeType(paramDestType);
10711 if(paramDestType != paramDest)
10712 FreeType(paramDestType);
10714 paramSource = paramSource->next;
10718 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
10723 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
10727 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
10729 if(!(dest->__anon1.type && dest->__anon1.type->kind == 13 && source->__anon1.type->kind == 8 && source->__anon1.type->__anon1._class && source->__anon1.type->__anon1._class->__anon1.registered && (source->__anon1.type->__anon1._class->__anon1.registered->type != 0 && source->__anon1.type->__anon1._class->__anon1.registered->type != 5) && !source->__anon1.type->byReference))
10731 ComputeTypeSize(source->__anon1.type);
10732 ComputeTypeSize(dest->__anon1.type);
10733 if(source->__anon1.type->size == dest->__anon1.type->size && MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
10741 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
10743 if(exp->__anon1.op.op == SIZEOF)
10745 FreeExpContents(exp);
10747 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
10751 if(!exp->__anon1.op.exp1)
10753 switch(exp->__anon1.op.op)
10757 struct Expression * exp2 = exp->__anon1.op.exp2;
10759 exp->__anon1.op.exp2 = (((void *)0));
10760 FreeExpContents(exp);
10761 FreeType(exp->expType);
10762 FreeType(exp->destType);
10764 ((exp2 ? __extension__ ({
10765 void * __ecerePtrToDelete = (exp2);
10767 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
10768 }) : 0), exp2 = 0);
10774 FreeExpContents(exp);
10775 op1->ops.Neg(exp, op1);
10779 if(op1->ops.BitNot)
10781 FreeExpContents(exp);
10782 op1->ops.BitNot(exp, op1);
10788 FreeExpContents(exp);
10789 op1->ops.Not(exp, op1);
10796 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
10798 if(Promote(op2, op1->kind, op1->type->isSigned))
10799 op2->kind = op1->kind, op2->ops = op1->ops;
10800 else if(Promote(op1, op2->kind, op2->type->isSigned))
10801 op1->kind = op2->kind, op1->ops = op2->ops;
10803 switch(exp->__anon1.op.op)
10808 FreeExpContents(exp);
10809 op1->ops.Add(exp, op1, op2);
10815 FreeExpContents(exp);
10816 op1->ops.Sub(exp, op1, op2);
10822 FreeExpContents(exp);
10823 op1->ops.Mul(exp, op1, op2);
10829 FreeExpContents(exp);
10830 op1->ops.Div(exp, op1, op2);
10836 FreeExpContents(exp);
10837 op1->ops.Mod(exp, op1, op2);
10841 if(exp->__anon1.op.exp2)
10843 if(op1->ops.BitAnd)
10845 FreeExpContents(exp);
10846 op1->ops.BitAnd(exp, op1, op2);
10853 FreeExpContents(exp);
10854 op1->ops.BitOr(exp, op1, op2);
10858 if(op1->ops.BitXor)
10860 FreeExpContents(exp);
10861 op1->ops.BitXor(exp, op1, op2);
10865 if(op1->ops.LShift)
10867 FreeExpContents(exp);
10868 op1->ops.LShift(exp, op1, op2);
10872 if(op1->ops.RShift)
10874 FreeExpContents(exp);
10875 op1->ops.RShift(exp, op1, op2);
10881 FreeExpContents(exp);
10882 op1->ops.Equ(exp, op1, op2);
10888 FreeExpContents(exp);
10889 op1->ops.Nqu(exp, op1, op2);
10895 FreeExpContents(exp);
10896 op1->ops.And(exp, op1, op2);
10902 FreeExpContents(exp);
10903 op1->ops.Or(exp, op1, op2);
10909 FreeExpContents(exp);
10910 op1->ops.Grt(exp, op1, op2);
10916 FreeExpContents(exp);
10917 op1->ops.Sma(exp, op1, op2);
10921 if(op1->ops.GrtEqu)
10923 FreeExpContents(exp);
10924 op1->ops.GrtEqu(exp, op1, op2);
10928 if(op1->ops.SmaEqu)
10930 FreeExpContents(exp);
10931 op1->ops.SmaEqu(exp, op1, op2);
10939 void ApplyAnyObjectLogic(struct Expression * e)
10941 struct Type * destType = e->destType;
10943 if(destType && (destType->classObjectType == 3))
10945 if(e && e->expType)
10947 struct Type * type = e->expType;
10948 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
10950 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10952 _class = type->__anon1._class->__anon1.registered;
10954 else if(type->kind == 19)
10956 _class = FindClass("ecere::com::Class")->__anon1.registered;
10960 char string[1024] = "";
10961 struct Symbol * classSym;
10963 PrintTypeNoConst(type, string, 0, 1);
10964 classSym = FindClass(string);
10966 _class = classSym->__anon1.registered;
10968 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->__anon1._class || !type->__anon1._class->__anon1.registered || type->__anon1._class->__anon1.registered->type == 1))) || destType->byReference)))
10970 if(!_class || strcmp(_class->fullName, "char *"))
10972 struct Expression * checkedExp = e, * newExp;
10974 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
10976 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
10978 if(checkedExp->type == 23)
10980 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
10983 checkedExp = (*checkedExp->__anon1.list).last;
10985 else if(checkedExp->type == 11)
10986 checkedExp = checkedExp->__anon1.cast.exp;
10988 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
10990 newExp = checkedExp->__anon1.op.exp2;
10991 checkedExp->__anon1.op.exp2 = (((void *)0));
10992 FreeExpContents(checkedExp);
10993 if(e->expType && e->expType->passAsTemplate)
10997 ComputeTypeSize(e->expType);
10998 sprintf(size, "%d", e->expType->size);
10999 newExp = MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), newExp), '+', MkExpCall(MkExpIdentifier(MkIdentifier("__ENDIAN_PAD")), MkListOne(MkExpConstant(size))))));
11001 ReplaceExpContents(checkedExp, newExp);
11002 e->byReference = 1;
11004 else if(!e->byReference || (_class && _class->type == 5))
11006 struct Expression * checkedExp;
11009 unsigned int hasAddress = e->type == 0 || (e->type == 8 && e->__anon1.member.memberType == 3) || (e->type == 9 && e->__anon1.member.memberType == 3) || (e->type == 4 && !e->__anon1.op.exp1 && e->__anon1.op.op == '*') || e->type == 6;
11011 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11013 struct Context * context = PushContext();
11014 struct Declarator * decl;
11015 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11016 char typeString[1024];
11017 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11019 typeString[0] = '\0';
11021 newExp->prev = (((void *)0));
11022 newExp->next = (((void *)0));
11023 newExp->expType = (((void *)0));
11024 PrintTypeNoConst(e->expType, typeString, 0, 1);
11025 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11026 newExp->destType = ProcessType(specs, decl);
11027 curContext = context;
11031 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
11034 sprintf(name, "__internalValue%03X", internalValueCounter++);
11035 if(!curCompound->__anon1.compound.declarations)
11036 curCompound->__anon1.compound.declarations = MkList();
11037 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
11038 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
11039 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
11040 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
11043 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
11045 struct Type * type = e->destType;
11047 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11048 CopyTypeInto(e->destType, type);
11049 e->destType->refCount = 1;
11050 e->destType->classObjectType = 0;
11053 e->__anon1.compound->__anon1.compound.context = context;
11054 PopContext(context);
11055 curContext = context->parent;
11059 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11061 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11063 if(checkedExp->type == 23)
11065 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11068 checkedExp = (*checkedExp->__anon1.list).last;
11070 else if(checkedExp->type == 11)
11071 checkedExp = checkedExp->__anon1.cast.exp;
11074 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11076 *operand = *checkedExp;
11077 __ecereMethod_Expression_Clear(checkedExp);
11078 checkedExp->destType = ProcessTypeString("void *", 0);
11079 checkedExp->expType = checkedExp->destType;
11080 checkedExp->destType->refCount++;
11081 checkedExp->type = 4;
11082 checkedExp->__anon1.op.op = '&';
11083 checkedExp->__anon1.op.exp1 = (((void *)0));
11084 checkedExp->__anon1.op.exp2 = operand;
11093 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->__anon1._class && e->expType->__anon1._class->__anon1.registered && (e->expType->__anon1._class->__anon1.registered->type == 2 || e->expType->__anon1._class->__anon1.registered->type == 4 || e->expType->__anon1._class->__anon1.registered->type == 3))))
11095 if(e->expType->classObjectType && destType && destType->classObjectType)
11101 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11104 thisExp->prev = (((void *)0));
11105 thisExp->next = (((void *)0));
11106 __ecereMethod_Expression_Clear(e);
11108 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
11109 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
11110 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
11112 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11113 CopyTypeInto(e->expType, thisExp->expType);
11114 e->expType->byReference = 0;
11115 e->expType->refCount = 1;
11116 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && (e->expType->__anon1._class->__anon1.registered->type == 2 || e->expType->__anon1._class->__anon1.registered->type == 4 || e->expType->__anon1._class->__anon1.registered->type == 3))
11118 e->expType->classObjectType = 0;
11123 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
11125 if(destType->kind == 14)
11127 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
11129 else if(!(destType->truth && e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && e->expType->__anon1._class->__anon1.registered->type == 1))
11131 unsigned int byReference = e->expType->byReference;
11132 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11133 struct Declarator * decl;
11134 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11135 char typeString[1024];
11136 struct Type * type;
11137 int backupClassObjectType;
11138 unsigned int backupByReference;
11140 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
11144 backupClassObjectType = type->classObjectType;
11145 backupByReference = type->byReference;
11146 type->classObjectType = 0;
11147 type->byReference = 0;
11148 typeString[0] = '\0';
11149 PrintType(type, typeString, 0, 1);
11150 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11151 type->classObjectType = backupClassObjectType;
11152 type->byReference = backupByReference;
11154 thisExp->prev = (((void *)0));
11155 thisExp->next = (((void *)0));
11156 __ecereMethod_Expression_Clear(e);
11157 if((type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1000 || type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 4 || type->__anon1._class->__anon1.registered->type == 3)) || (type->kind != 13 && type->kind != 22 && type->kind != 12 && type->kind != 8) || (!destType->byReference && byReference && (destType->kind != 13 || type->kind != 13)))
11159 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
11162 destType->refCount++;
11164 e->__anon1.op.op = '*';
11165 e->__anon1.op.exp1 = (((void *)0));
11166 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
11167 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11168 CopyTypeInto(t, thisExp->destType);
11169 t->passAsTemplate = 0;
11170 FreeType(thisExp->destType);
11171 thisExp->destType = t;
11172 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11173 CopyTypeInto(t, destType);
11174 t->passAsTemplate = passAsTemplate;
11175 FreeType(destType);
11177 destType->refCount = 0;
11178 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11179 CopyTypeInto(e->expType, type);
11180 if(type->passAsTemplate)
11182 e->expType->classObjectType = 0;
11183 e->expType->passAsTemplate = 0;
11185 e->expType->byReference = 0;
11186 e->expType->refCount = 1;
11191 e->__anon1.cast.typeName = MkTypeName(specs, decl);
11192 e->__anon1.cast.exp = thisExp;
11193 e->byReference = 1;
11198 FreeType(e->destType);
11199 e->destType = destType;
11200 destType->refCount++;
11205 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
11207 struct __ecereNameSpace__ecere__com__Class * _class;
11208 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
11210 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
11211 ComputeModuleClasses(subModule->data);
11212 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
11213 ComputeClassMembers(_class, 0);
11216 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
11218 struct External * external = (((void *)0));
11219 struct Symbol * classSym = FindClass(name);
11220 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
11222 if(!inCompiler || !classSym)
11223 return (((void *)0));
11224 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
11225 return (((void *)0));
11226 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
11227 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
11228 external = classSym->__anon2.__anon1.structExternal;
11229 if(external && external->__anon1.declaration)
11231 struct Specifier * spec;
11233 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
11234 if(spec->type == 3 || spec->type == 4)
11236 curDeclarations = spec->__anon1.__anon2.definitions;
11240 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
11242 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
11243 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
11244 char structName[1024];
11245 unsigned int addedPadding = 0;
11246 struct Specifier * curSpec = (((void *)0));
11248 classSym->declaring++;
11249 if(strchr(classSym->string, '<'))
11251 if(classSym->__anon1.registered->templateClass)
11252 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
11253 classSym->declaring--;
11257 FullClassNameCat(structName, name, 0);
11258 classSym->declaredStructSym = 1;
11259 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
11261 unsigned int add = 0;
11265 external = MkExternalDeclaration((((void *)0)));
11266 classSym->__anon2.__anon1.structExternal = external;
11267 external->symbol = classSym;
11272 declarations = MkList();
11273 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
11275 if(external->__anon1.declaration)
11277 struct Specifier * spec;
11279 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
11280 if(spec->type == 3 || spec->type == 4)
11283 curDeclarations = spec->__anon1.__anon2.definitions;
11287 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
11289 FreeList(declarations, (void *)(FreeClassDef));
11290 declarations = (((void *)0));
11292 if(classSym->__anon1.registered->type != 5 && !declarations)
11294 FreeExternal(external);
11295 external = (((void *)0));
11296 classSym->__anon2.__anon1.structExternal = (((void *)0));
11301 curSpec->__anon1.__anon2.definitions = declarations;
11304 specifiers = MkList();
11305 declarators = MkList();
11306 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
11307 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
11310 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
11313 classSym->declaring--;
11315 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
11317 classSym->declaredStructSym = 1;
11318 if(classSym->__anon1.registered)
11319 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
11320 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
11322 struct Specifier * spec;
11324 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
11326 if(spec->__anon1.__anon2.definitions)
11327 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
11331 if(inCompiler && neededBy && (external || !classSym->imported))
11335 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
11336 external->symbol = classSym;
11337 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
11339 if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
11341 char structName[1024];
11342 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
11345 FullClassNameCat(structName, name, 0);
11346 specifiers = MkList();
11347 declarators = MkList();
11348 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
11349 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
11353 struct External * e = external->fwdDecl ? external->fwdDecl : external;
11355 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
11356 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
11359 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
11364 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
11366 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
11368 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
11370 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
11372 if(_class->type == 4)
11374 struct __ecereNameSpace__ecere__sys__OldList converts =
11378 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11381 if(!_class->symbol)
11382 _class->symbol = FindClass(_class->fullName);
11383 type->__anon1._class = _class->symbol;
11384 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), dest->kind != 8 || !dest->__anon1._class || strcmp(dest->__anon1._class->string, "bool"), 0, 0, 0, 0))
11386 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
11387 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11391 struct __ecereNameSpace__ecere__com__Class * baseClass;
11393 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
11395 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
11397 for(value = e->values.first; value; value = value->next)
11399 if(!strcmp(value->name, string))
11404 FreeType(sourceExp->expType);
11405 sourceExp->isConstant = 1;
11406 sourceExp->expType = MkClassType(baseClass->fullName);
11407 if(inCompiler || inPreCompiler || inDebugger)
11409 char constant[256];
11411 FreeExpContents(sourceExp);
11412 sourceExp->type = 2;
11413 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
11414 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
11416 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
11417 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
11419 while(converts.first)
11421 struct Conversion * convert = converts.first;
11423 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
11424 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
11426 ((type ? __extension__ ({
11427 void * __ecerePtrToDelete = (type);
11429 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11430 }) : 0), type = 0);
11437 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
11438 ((type ? __extension__ ({
11439 void * __ecerePtrToDelete = (type);
11441 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11442 }) : 0), type = 0);
11445 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->nameSpaces); nameSpace != (((void *)0)); nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
11446 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
11451 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
11453 struct __ecereNameSpace__ecere__com__Instance * module;
11455 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->systemNameSpace, sourceExp, dest, string, conversions))
11457 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace, sourceExp, dest, string, conversions))
11459 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
11461 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->next)
11463 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
11469 void ProcessExpressionType(struct Expression * exp);
11471 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
11473 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
11475 struct Identifier * id = exp->__anon1.__anon1.identifier;
11476 struct Context * ctx;
11477 struct Symbol * symbol = (((void *)0));
11479 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
11481 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
11485 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
11490 if(!symbol && ((!id->_class || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))) || (id->classSym && __ecereNameSpace__ecere__com__eClass_IsDerived(_class, id->classSym->__anon1.registered))))
11492 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
11493 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
11494 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
11495 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
11499 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
11501 if(!prop && !method)
11502 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
11503 if(!prop && !method && !member)
11505 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
11507 if(prop || method || member || classProp)
11510 exp->__anon1.member.member = id;
11511 exp->__anon1.member.memberType = 0;
11512 exp->__anon1.member.exp = QMkExpId("this");
11513 exp->addedThis = 1;
11515 else if(_class && _class->templateParams.first)
11517 struct __ecereNameSpace__ecere__com__Class * sClass;
11519 for(sClass = _class; sClass; sClass = sClass->base)
11521 if(sClass->templateParams.first)
11523 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
11525 for(param = sClass->templateParams.first; param; param = param->next)
11527 if(param->type == 2 && !strcmp(param->name, id->string))
11529 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
11533 struct Declarator * decl;
11534 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11536 FreeIdentifier(exp->__anon1.member.member);
11537 ProcessExpressionType(argExp);
11538 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
11539 exp->expType = ProcessType(specs, decl);
11541 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
11552 int ComputeTypeSize(struct Type * type)
11554 unsigned int size = type ? type->size : 0;
11556 if(!size && type && !type->computing)
11558 type->computing = 1;
11562 type->alignment = size = sizeof(char);
11565 type->alignment = size = sizeof(char);
11568 type->alignment = size = sizeof(int);
11571 type->alignment = size = sizeof(long long);
11574 type->alignment = size = targetBits / 8;
11575 type->pointerAlignment = 1;
11578 type->alignment = size = targetBits / 8;
11579 type->pointerAlignment = 1;
11582 type->alignment = size = sizeof(long);
11585 type->alignment = size = sizeof(short);
11588 type->alignment = size = sizeof(float);
11591 type->alignment = size = sizeof(double);
11595 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
11597 if(_class && _class->type == 1)
11599 ComputeClassMembers(_class, 0);
11600 type->alignment = _class->structAlignment;
11601 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
11602 size = _class->structSize;
11603 if(type->alignment && size % type->alignment)
11604 size += type->alignment - (size % type->alignment);
11606 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
11608 if(!_class->dataType)
11609 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11610 size = type->alignment = ComputeTypeSize(_class->dataType);
11614 size = type->alignment = targetBits / 8;
11615 type->pointerAlignment = 1;
11621 size = type->alignment = targetBits / 8;
11622 type->pointerAlignment = 1;
11625 if(type->__anon1.__anon4.arraySizeExp)
11627 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
11628 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
11629 if(!type->__anon1.__anon4.arraySizeExp->isConstant || (type->__anon1.__anon4.arraySizeExp->expType->kind != 3 && type->__anon1.__anon4.arraySizeExp->expType->kind != 2 && type->__anon1.__anon4.arraySizeExp->expType->kind != 1 && type->__anon1.__anon4.arraySizeExp->expType->kind != 5 && type->__anon1.__anon4.arraySizeExp->expType->kind != 4 && type->__anon1.__anon4.arraySizeExp->expType->kind != 23 && type->__anon1.__anon4.arraySizeExp->expType->kind != 22 && type->__anon1.__anon4.arraySizeExp->expType->kind != 15 && (type->__anon1.__anon4.arraySizeExp->expType->kind != 8 || !type->__anon1.__anon4.arraySizeExp->expType->__anon1._class->__anon1.registered || type->__anon1.__anon4.arraySizeExp->expType->__anon1._class->__anon1.registered->type != 4)))
11631 struct Location oldLoc = yylloc;
11632 char expression[10240];
11634 expression[0] = '\0';
11635 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
11636 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
11638 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
11639 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
11642 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
11644 else if(type->__anon1.__anon4.enumClass)
11646 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
11648 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
11651 type->__anon1.__anon4.arraySize = 0;
11655 type->__anon1.__anon4.arraySize = 0;
11657 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
11658 if(type->__anon1.type)
11660 type->alignment = type->__anon1.type->alignment;
11661 type->pointerAlignment = type->__anon1.type->pointerAlignment;
11666 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
11668 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
11670 if(symbol && symbol->type)
11672 ComputeTypeSize(symbol->type);
11673 size = symbol->type->size;
11678 struct Type * member;
11680 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
11682 int __simpleStruct0, __simpleStruct1;
11683 unsigned int addSize = ComputeTypeSize(member);
11685 member->offset = size;
11686 if(member->alignment && size % member->alignment)
11687 member->offset += member->alignment - (size % member->alignment);
11688 size = member->offset;
11689 if(member->pointerAlignment && type->size <= 4)
11690 type->pointerAlignment = 1;
11691 else if(!member->pointerAlignment && member->alignment >= 8)
11692 type->pointerAlignment = 0;
11693 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
11696 if(type->alignment && size % type->alignment)
11697 size += type->alignment - (size % type->alignment);
11703 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
11705 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
11707 if(symbol && symbol->type)
11709 ComputeTypeSize(symbol->type);
11710 size = symbol->type->size;
11711 type->alignment = symbol->type->alignment;
11716 struct Type * member;
11718 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
11720 int __simpleStruct0, __simpleStruct1;
11721 unsigned int addSize = ComputeTypeSize(member);
11723 member->offset = size;
11724 if(member->alignment && size % member->alignment)
11725 member->offset += member->alignment - (size % member->alignment);
11726 size = member->offset;
11727 if(member->pointerAlignment && type->size <= 4)
11728 type->pointerAlignment = 1;
11729 else if(!member->pointerAlignment && member->alignment >= 8)
11730 type->pointerAlignment = 0;
11731 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
11732 size = ((size > addSize) ? size : addSize);
11734 if(type->alignment && size % type->alignment)
11735 size += type->alignment - (size % type->alignment);
11741 struct TemplateParameter * param = type->__anon1.templateParameter;
11742 struct Type * baseType = ProcessTemplateParameterType(param);
11746 size = ComputeTypeSize(baseType);
11747 type->alignment = baseType->alignment;
11748 type->pointerAlignment = baseType->pointerAlignment;
11751 type->alignment = size = sizeof(uint64);
11756 type->alignment = size = sizeof(enum
11764 type->alignment = size = targetBits / 8;
11765 type->pointerAlignment = 1;
11770 type->computing = 0;
11775 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
11777 struct Type * source;
11778 struct Type * realDest = dest;
11779 struct Type * backupSourceExpType = (((void *)0));
11780 struct Expression * nbExp = GetNonBracketsExp(sourceExp);
11781 struct Expression * computedExp = nbExp;
11784 if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11786 computedExp = CopyExpression(nbExp);
11787 ComputeExpression(computedExp);
11789 source = sourceExp->expType;
11790 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
11792 if(computedExp != nbExp)
11794 FreeExpression(computedExp);
11795 computedExp = nbExp;
11800 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
11802 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
11804 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
11806 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
11808 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
11810 if(sourceBase == destBase)
11812 if(computedExp != nbExp)
11814 FreeExpression(computedExp);
11815 computedExp = nbExp;
11824 struct __ecereNameSpace__ecere__sys__OldList * specs;
11825 unsigned int flag = 0;
11826 long long value = (((int)0x7fffffff));
11828 source->refCount++;
11829 if(computedExp->type == 2)
11831 if(source->isSigned)
11832 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
11834 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
11836 else if(computedExp->type == 4 && computedExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
11838 if(source->isSigned)
11839 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
11841 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
11843 if(computedExp != nbExp)
11845 FreeExpression(computedExp);
11846 computedExp = nbExp;
11848 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
11851 source = __extension__ ({
11852 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11854 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
11857 if(dest->kind == 8)
11859 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
11861 if(_class && _class->type == 3)
11863 if(source->kind != 8)
11865 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11866 struct Type * tempDest, * tempSource;
11868 for(; _class->base->type != 1000; _class = _class->base)
11871 tempDest = tempType;
11872 tempType->kind = 8;
11873 if(!_class->symbol)
11874 _class->symbol = FindClass(_class->fullName);
11875 tempType->__anon1._class = _class->symbol;
11876 tempType->truth = dest->truth;
11877 if(tempType->__anon1._class)
11878 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
11879 backupSourceExpType = sourceExp->expType;
11880 if(dest->passAsTemplate)
11882 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11883 CopyTypeInto(sourceExp->expType, dest);
11884 sourceExp->expType->passAsTemplate = 0;
11888 sourceExp->expType = dest;
11892 ((tempType ? __extension__ ({
11893 void * __ecerePtrToDelete = (tempType);
11895 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11896 }) : 0), tempType = 0);
11899 if(_class && _class->type == 2 && source->kind != 8)
11901 if(!dest->__anon1._class->__anon1.registered->dataType)
11902 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11903 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11906 FreeType(sourceExp->expType);
11907 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
11908 source->refCount++;
11911 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
11913 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11914 struct Declarator * decl;
11917 ReadString(string, sourceExp->__anon1.__anon2.string);
11918 decl = SpecDeclFromString(string, specs, (((void *)0)));
11919 FreeExpContents(sourceExp);
11920 FreeType(sourceExp->expType);
11921 sourceExp->type = 24;
11922 sourceExp->__anon1._classExp.specifiers = specs;
11923 sourceExp->__anon1._classExp.decl = decl;
11924 sourceExp->expType = dest;
11928 if(backupSourceExpType)
11929 FreeType(backupSourceExpType);
11933 else if(source->kind == 8)
11935 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
11937 if(_class && (_class->type == 3 || _class->type == 2))
11939 if(dest->kind != 8)
11941 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11942 struct Type * tempDest, * tempSource;
11944 if(!source->__anon1._class->__anon1.registered->dataType)
11945 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11946 for(; _class->base->type != 1000; _class = _class->base)
11949 tempSource = tempType;
11950 tempType->kind = 8;
11951 tempType->__anon1._class = FindClass(_class->fullName);
11952 tempType->truth = source->truth;
11953 tempType->classObjectType = source->classObjectType;
11954 if(tempType->__anon1._class)
11955 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
11956 if(conversions && conversions->last)
11958 ((struct Conversion *)conversions->last)->resultType = dest;
11960 modifyPassAsTemplate(&((struct Conversion *)conversions->last)->resultType, 0);
11962 FreeType(sourceExp->expType);
11963 sourceExp->expType = MkClassType(_class->fullName);
11964 sourceExp->expType->truth = source->truth;
11965 sourceExp->expType->classObjectType = source->classObjectType;
11966 if(!sourceExp->destType)
11968 FreeType(sourceExp->destType);
11969 sourceExp->destType = sourceExp->expType;
11970 if(sourceExp->expType)
11971 sourceExp->expType->refCount++;
11973 if(!_class->dataType)
11974 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11976 dest = MkClassType(source->__anon1._class->string);
11977 dest->truth = source->truth;
11978 dest->classObjectType = source->classObjectType;
11980 source = _class->dataType;
11981 source->refCount++;
11982 ((tempType ? __extension__ ({
11983 void * __ecerePtrToDelete = (tempType);
11985 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11986 }) : 0), tempType = 0);
11992 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11999 if(dest->kind == 8)
12001 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
12002 unsigned int fittingValue = 0;
12004 if(_class && _class->type == 4)
12006 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12007 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12009 if(c && value >= 0 && value <= c->largest)
12012 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
12014 if(_class->type == 0 || _class->type == 5)
12016 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12018 *newExp = *sourceExp;
12019 if(sourceExp->destType)
12020 sourceExp->destType->refCount++;
12021 if(sourceExp->expType)
12022 sourceExp->expType->refCount++;
12023 sourceExp->type = 11;
12024 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
12025 sourceExp->__anon1.cast.exp = newExp;
12026 FreeType(sourceExp->expType);
12027 sourceExp->expType = (((void *)0));
12028 ProcessExpressionType(sourceExp);
12031 FreeType(sourceExp->expType);
12032 sourceExp->expType = dest;
12037 if(backupSourceExpType)
12038 FreeType(backupSourceExpType);
12041 if(!_class->dataType)
12042 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12044 dest = _class->dataType;
12047 if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24))
12049 specs = MkListOne(MkSpecifier(DOUBLE));
12051 else if(dest->kind == 6 && (source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 7))
12053 specs = MkListOne(MkSpecifier(FLOAT));
12055 else if(dest->kind == 4 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
12058 if(!dest->isSigned)
12059 ListAdd(specs, MkSpecifier(UNSIGNED));
12060 ListAdd(specs, MkSpecifier(INT64));
12062 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
12065 if(!dest->isSigned)
12066 ListAdd(specs, MkSpecifier(UNSIGNED));
12067 ListAdd(specs, MkSpecifier(INT));
12069 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
12072 if(!dest->isSigned)
12073 ListAdd(specs, MkSpecifier(UNSIGNED));
12074 ListAdd(specs, MkSpecifier(SHORT));
12076 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
12079 if(!dest->isSigned)
12080 ListAdd(specs, MkSpecifier(UNSIGNED));
12081 ListAdd(specs, MkSpecifier(CHAR));
12087 if(backupSourceExpType)
12089 if(sourceExp->expType)
12090 FreeType(sourceExp->expType);
12091 sourceExp->expType = backupSourceExpType;
12096 else if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || source->kind == 4 || source->kind == 3 || source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1))
12098 specs = MkListOne(MkSpecifier(DOUBLE));
12100 else if(dest->kind == 6 && (source->kind == 6 || source->kind == 15 || source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
12102 specs = MkListOne(MkSpecifier(FLOAT));
12104 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
12107 ListAdd(specs, MkSpecifier(BOOL));
12109 else if(dest->kind == 1 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (dest->isSigned ? (value >= -128 && value <= 127) : (value >= 0 && value <= 255)))
12111 if(source->kind == 3)
12115 if(backupSourceExpType)
12116 FreeType(backupSourceExpType);
12122 if(!dest->isSigned)
12123 ListAdd(specs, MkSpecifier(UNSIGNED));
12124 ListAdd(specs, MkSpecifier(CHAR));
12127 else if(dest->kind == 2 && (source->kind == 15 || source->kind == 24 || source->kind == 1 || source->kind == 2 || (source->kind == 3 && (dest->isSigned ? (value >= -32768 && value <= 32767) : (value >= 0 && value <= 65535)))))
12129 if(source->kind == 3)
12133 if(backupSourceExpType)
12134 FreeType(backupSourceExpType);
12140 if(!dest->isSigned)
12141 ListAdd(specs, MkSpecifier(UNSIGNED));
12142 ListAdd(specs, MkSpecifier(SHORT));
12145 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
12148 if(!dest->isSigned)
12149 ListAdd(specs, MkSpecifier(UNSIGNED));
12150 ListAdd(specs, MkSpecifier(INT));
12152 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
12155 if(!dest->isSigned)
12156 ListAdd(specs, MkSpecifier(UNSIGNED));
12157 ListAdd(specs, MkSpecifier(INT64));
12159 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
12161 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
12167 if(backupSourceExpType)
12169 if(sourceExp->expType)
12170 FreeType(sourceExp->expType);
12171 sourceExp->expType = backupSourceExpType;
12175 if(!flag && !sourceExp->opDestType)
12177 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12179 *newExp = *sourceExp;
12180 newExp->prev = (((void *)0));
12181 newExp->next = (((void *)0));
12182 if(sourceExp->destType)
12183 sourceExp->destType->refCount++;
12184 if(sourceExp->expType)
12185 sourceExp->expType->refCount++;
12186 sourceExp->type = 11;
12187 if(realDest->kind == 8)
12189 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
12190 FreeList(specs, (void *)(FreeSpecifier));
12193 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
12194 if(newExp->type == 4)
12196 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12199 sourceExp->__anon1.cast.exp = newExp;
12200 FreeType(sourceExp->expType);
12201 sourceExp->expType = (((void *)0));
12202 ProcessExpressionType(sourceExp);
12205 FreeList(specs, (void *)(FreeSpecifier));
12208 if(backupSourceExpType)
12209 FreeType(backupSourceExpType);
12214 if(computedExp != nbExp)
12216 FreeExpression(computedExp);
12217 computedExp = nbExp;
12219 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
12220 sourceExp = (*sourceExp->__anon1.list).last;
12221 if(sourceExp->type == 0)
12223 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
12225 if(dest->kind == 8)
12227 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
12229 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
12230 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12234 for(; _class && _class->type == 4; _class = _class->base)
12236 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12237 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12239 for(value = e->values.first; value; value = value->next)
12241 if(!strcmp(value->name, id->string))
12246 FreeType(sourceExp->expType);
12247 sourceExp->isConstant = 1;
12248 sourceExp->expType = MkClassType(_class->fullName);
12249 if(inCompiler || inPreCompiler || inDebugger)
12251 FreeExpContents(sourceExp);
12252 sourceExp->type = 2;
12253 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
12254 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
12256 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
12265 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
12276 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
12278 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
12280 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
12282 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
12283 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
12286 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12287 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
12288 struct Type * type;
12289 void * ptr = inst->data + dataMember->offset + offset;
12290 char * result = (((void *)0));
12292 exp->loc = member->loc = inst->loc;
12293 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
12294 if(!dataMember->dataType)
12295 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12296 type = dataMember->dataType;
12297 if(type->kind == 8)
12299 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12301 if(_class->type == 4)
12303 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12307 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12308 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
12310 for(item = e->values.first; item; item = item->next)
12312 if(item->data == GetEnumValue(_class, ptr))
12314 result = item->name;
12320 exp->__anon1.__anon1.identifier = MkIdentifier(result);
12322 exp->destType = MkClassType(_class->fullName);
12323 ProcessExpressionType(exp);
12327 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
12329 if(!_class->dataType)
12330 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12331 type = _class->dataType;
12340 FreeExpContents(exp);
12341 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
12347 FreeExpContents(exp);
12348 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
12354 FreeExpContents(exp);
12355 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
12361 FreeExpContents(exp);
12362 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
12368 FreeExpContents(exp);
12369 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
12375 FreeExpContents(exp);
12376 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
12381 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
12384 ListAdd(memberList, member);
12386 if(parentDataMember->type == 1)
12391 void CheckTemplateTypes(struct Expression * exp)
12393 struct Expression * nbExp = GetNonBracketsExp(exp);
12395 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12397 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12398 struct Context * context;
12399 int kind = exp->expType->kind;
12403 exp->destType->refCount++;
12405 exp->expType->refCount++;
12406 newExp->prev = (((void *)0));
12407 newExp->next = (((void *)0));
12408 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
12410 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
12412 if(c->type == 2 || c->type == 4 || c->type == 3)
12415 c->dataType = ProcessTypeString(c->dataTypeString, 0);
12416 kind = c->dataType->kind;
12422 if(exp->destType->classObjectType)
12425 exp->destType->refCount--;
12427 exp->expType->refCount--;
12428 ((newExp ? __extension__ ({
12429 void * __ecerePtrToDelete = (newExp);
12431 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12432 }) : 0), newExp = 0);
12436 struct __ecereNameSpace__ecere__sys__OldList * specs;
12437 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12438 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12440 context = PushContext();
12441 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12442 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12443 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12445 modifyPassAsTemplate(&exp->expType, 1);
12446 modifyPassAsTemplate(&newExp->destType, 0);
12447 modifyPassAsTemplate(&newExp->expType, 0);
12448 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12449 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12450 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12451 exp->__anon1.compound->__anon1.compound.context = context;
12452 PopContext(context);
12456 if(exp->destType->classObjectType)
12459 exp->destType->refCount--;
12461 exp->expType->refCount--;
12462 ((newExp ? __extension__ ({
12463 void * __ecerePtrToDelete = (newExp);
12465 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12466 }) : 0), newExp = 0);
12470 struct __ecereNameSpace__ecere__sys__OldList * specs;
12471 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12472 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12474 context = PushContext();
12475 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(FLOAT)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("f"))), (((void *)0)))));
12476 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12477 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12479 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12480 modifyPassAsTemplate(&exp->expType, 1);
12481 modifyPassAsTemplate(&newExp->destType, 0);
12482 modifyPassAsTemplate(&newExp->expType, 0);
12483 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("f")), '=', newExp))));
12484 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12485 exp->__anon1.compound->__anon1.compound.context = context;
12486 PopContext(context);
12493 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12494 if((exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1) || __ecereProp_Type_Get_isPointerType(exp->expType))
12495 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
12497 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12502 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12504 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12505 struct Context * context;
12506 int kind = exp->expType->kind;
12510 exp->destType->refCount++;
12512 exp->expType->refCount++;
12513 newExp->prev = (((void *)0));
12514 newExp->next = (((void *)0));
12515 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
12517 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
12519 if(c->type == 2 || c->type == 4 || c->type == 3)
12522 c->dataType = ProcessTypeString(c->dataTypeString, 0);
12523 kind = c->dataType->kind;
12529 if(exp->destType->classObjectType)
12532 exp->destType->refCount--;
12534 exp->expType->refCount--;
12535 ((newExp ? __extension__ ({
12536 void * __ecerePtrToDelete = (newExp);
12538 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12539 }) : 0), newExp = 0);
12543 struct __ecereNameSpace__ecere__sys__OldList * specs;
12544 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12545 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12547 context = PushContext();
12548 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12549 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12550 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12552 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12553 modifyPassAsTemplate(&exp->expType, 0);
12554 modifyPassAsTemplate(&newExp->destType, 1);
12555 modifyPassAsTemplate(&newExp->expType, 1);
12556 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12557 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12558 exp->__anon1.compound->__anon1.compound.context = context;
12559 PopContext(context);
12563 if(exp->destType->classObjectType)
12566 exp->destType->refCount--;
12568 exp->expType->refCount--;
12569 ((newExp ? __extension__ ({
12570 void * __ecerePtrToDelete = (newExp);
12572 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12573 }) : 0), newExp = 0);
12577 struct __ecereNameSpace__ecere__sys__OldList * specs;
12578 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12579 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12581 context = PushContext();
12582 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(FLOAT)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("f"))), (((void *)0)))));
12583 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12584 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12586 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12587 modifyPassAsTemplate(&exp->expType, 0);
12588 modifyPassAsTemplate(&newExp->destType, 1);
12589 modifyPassAsTemplate(&newExp->expType, 1);
12590 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12591 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("f")))));
12592 exp->__anon1.compound->__anon1.compound.context = context;
12593 PopContext(context);
12598 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12601 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
12602 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), newExp)));
12603 ProcessExpressionType((*exp->__anon1.list).first);
12609 if(__ecereProp_Type_Get_isPointerType(exp->expType))
12611 exp->needTemplateCast = 2;
12612 newExp->needCast = 1;
12613 newExp->needTemplateCast = 2;
12614 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
12616 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12617 exp->needTemplateCast = 2;
12618 newExp->needCast = 1;
12619 newExp->needTemplateCast = 2;
12620 ProcessExpressionType((*exp->__anon1.list).first);
12626 if(exp->expType->kind == 20)
12628 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
12632 FreeType(exp->destType);
12633 FreeType(exp->expType);
12634 ((newExp ? __extension__ ({
12635 void * __ecerePtrToDelete = (newExp);
12637 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12638 }) : 0), newExp = 0);
12643 char typeString[1024];
12644 struct Declarator * decl;
12645 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12647 typeString[0] = '\0';
12648 PrintType(exp->expType, typeString, 0, 0);
12649 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12651 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
12652 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12653 exp->__anon1.cast.exp->needCast = 1;
12654 exp->needTemplateCast = 2;
12655 newExp->needTemplateCast = 2;
12663 static void ProcessInitializer(struct Initializer * init, struct Type * type)
12668 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
12670 if(init->__anon1.exp && !init->__anon1.exp->destType)
12672 FreeType(init->__anon1.exp->destType);
12673 init->__anon1.exp->destType = type;
12677 if(init->__anon1.exp)
12679 ProcessExpressionType(init->__anon1.exp);
12680 init->isConstant = init->__anon1.exp->isConstant;
12686 struct Expression * exp = init->__anon1.exp;
12687 struct Instantiation * inst = exp->__anon1.instance;
12688 struct MembersInit * members;
12691 init->__anon1.list = MkList();
12694 for(members = (*inst->members).first; members; members = members->next)
12696 if(members->type == 0)
12698 struct MemberInit * member;
12700 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
12702 ListAdd(init->__anon1.list, member->initializer);
12703 member->initializer = (((void *)0));
12708 FreeExpression(exp);
12712 struct Initializer * i;
12713 struct Type * initializerType = (((void *)0));
12714 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
12715 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
12716 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
12717 int subMemberStackPos = 0;
12719 if(type && type->kind == 12)
12720 initializerType = Dereference(type);
12721 else if(type && (type->kind == 9 || type->kind == 10))
12722 initializerType = type->__anon1.__anon1.members.first;
12723 for(i = (*init->__anon1.list).first; i; i = i->next)
12725 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
12727 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
12730 if(!curMember->dataType)
12731 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
12732 initializerType = curMember->dataType;
12735 ProcessInitializer(i, initializerType);
12736 if(initializerType && type && (type->kind == 9 || type->kind == 10))
12737 initializerType = initializerType->next;
12739 init->isConstant = 0;
12741 if(type && type->kind == 12)
12742 FreeType(initializerType);
12743 if(type && type->kind != 12 && type->kind != 9 && type->kind != 10 && (type->kind != 8 || !type->__anon1._class->__anon1.registered || type->__anon1._class->__anon1.registered->type != 1))
12745 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
12752 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12754 unsigned int result = 1;
12758 struct __ecereNameSpace__ecere__sys__OldList converts =
12762 struct Conversion * convert;
12764 if(destType->kind == 0)
12766 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12770 for(convert = converts.first; convert; convert = convert->next)
12772 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12776 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12777 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12780 newExp->prev = (((void *)0));
12781 newExp->next = (((void *)0));
12782 newExp->destType = (((void *)0));
12786 exp->addedThis = 1;
12787 exp->__anon1.member.exp = newExp;
12788 FreeType(exp->__anon1.member.exp->expType);
12789 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12790 exp->__anon1.member.exp->expType->classObjectType = objectType;
12791 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12792 exp->__anon1.member.memberType = 1;
12793 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12796 exp->expType->refCount++;
12797 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12803 exp->addedThis = 1;
12804 exp->__anon1.member.exp = newExp;
12805 if(newExp->expType && newExp->expType->kind == 8 && newExp->expType->__anon1._class && newExp->expType->__anon1._class->__anon1.registered && newExp->expType->__anon1._class->__anon1.registered->type == 5)
12807 newExp->byReference = 1;
12809 FreeType(exp->__anon1.member.exp->expType);
12810 exp->__anon1.member.exp->expType = (((void *)0));
12811 if(convert->convert->dataType)
12813 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12814 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12815 exp->__anon1.member.exp->expType->refCount = 1;
12816 exp->__anon1.member.exp->expType->classObjectType = objectType;
12817 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12819 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12820 exp->__anon1.member.memberType = 4;
12821 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12823 if(convert->resultType)
12824 convert->resultType->refCount++;
12830 FreeType(exp->expType);
12833 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12834 if(exp->destType->casted)
12837 exp->expType->refCount++;
12841 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12842 if(exp->destType->casted)
12844 if(convert->resultType)
12845 convert->resultType->refCount++;
12849 if(exp->isConstant && inCompiler)
12850 ComputeExpression(exp);
12851 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12853 if(!result && exp->expType && converts.count)
12855 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12857 if(!result && exp->expType && exp->destType)
12859 if((exp->destType->kind == 8 && exp->expType->kind == 13 && exp->expType->__anon1.type->kind == 8 && exp->expType->__anon1.type->__anon1._class == exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered->type == 1) || (exp->expType->kind == 8 && exp->destType->kind == 13 && exp->destType->__anon1.type->kind == 8 && exp->destType->__anon1.type->__anon1._class == exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1))
12866 void PopulateInstance(struct Instantiation * inst)
12868 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
12869 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
12870 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
12871 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
12874 inst->members = MkListOne(MkMembersInitList(memberList));
12876 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
12877 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
12879 if(!dataMember->isProperty)
12881 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
12882 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
12885 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12886 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
12887 struct Type * type;
12888 void * ptr = inst->data + dataMember->offset;
12889 char * result = (((void *)0));
12891 exp->loc = member->loc = inst->loc;
12892 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
12893 if(!dataMember->dataType)
12894 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12895 type = dataMember->dataType;
12896 if(type->kind == 8)
12898 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12900 if(_class->type == 4)
12902 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12906 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12907 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
12909 for(item = e->values.first; item; item = item->next)
12911 if(item->data == GetEnumValue(_class, ptr))
12913 result = item->name;
12920 exp->__anon1.__anon1.identifier = MkIdentifier(result);
12922 exp->destType = MkClassType(_class->fullName);
12923 ProcessExpressionType(exp);
12926 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
12928 if(!_class->dataType)
12929 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12930 type = _class->dataType;
12939 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
12945 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
12951 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
12957 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
12963 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
12968 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
12971 ListAdd(memberList, member);
12977 void ProcessMemberInitData(struct MemberInit * member, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
12979 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12980 unsigned int found = 0;
12981 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12982 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12983 unsigned int freeType = 0;
12985 yylloc = member->loc;
12990 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12994 dataMember = *curMember;
13000 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
13001 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
13002 int _subMemberStackPos = 0;
13005 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
13008 dataMember = thisMember;
13009 if(curMember && thisMember->memberAccess == 1)
13011 *curMember = thisMember;
13012 *curClass = thisMember->_class;
13013 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
13014 *subMemberStackPos = _subMemberStackPos;
13020 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
13021 if(method && method->type == 1)
13024 method = (((void *)0));
13029 struct Type * type = (((void *)0));
13033 if(!dataMember->dataType && dataMember->dataTypeString)
13035 struct Context * context = SetupTemplatesContext(_class);
13037 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
13038 FinishTemplatesContext(context);
13040 type = dataMember->dataType;
13044 if(!method->dataType)
13045 ProcessMethodType(method);
13046 type = method->dataType;
13048 if(ident && ident->next)
13050 for(ident = ident->next; ident && type; ident = ident->next)
13052 if(type->kind == 8)
13054 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
13056 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
13058 type = dataMember->dataType;
13060 else if(type->kind == 9 || type->kind == 10)
13062 struct Type * memberType;
13064 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13066 if(!strcmp(memberType->name, ident->string))
13075 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
13078 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
13079 struct __ecereNameSpace__ecere__com__Class * sClass;
13081 for(sClass = _class; sClass; sClass = sClass->base)
13084 if(sClass->templateClass)
13085 sClass = sClass->templateClass;
13086 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
13088 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
13090 for(sClass = sClass->base; sClass; sClass = sClass->base)
13092 if(sClass->templateClass)
13093 sClass = sClass->templateClass;
13094 id += sClass->templateParams.count;
13105 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
13107 if(arg.__anon1.__anon1.dataTypeString)
13109 unsigned int constant = type->constant;
13111 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
13112 if(type->kind == 8 && constant)
13113 type->constant = 1;
13114 else if(type->kind == 13)
13116 struct Type * t = type->__anon1.type;
13118 while(t->kind == 13)
13119 t = t->__anon1.type;
13121 t->constant = constant;
13124 if(type && _class->templateClass)
13125 type->passAsTemplate = 1;
13132 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
13134 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
13135 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
13136 int paramCount = 0;
13137 int lastParam = -1;
13138 char templateString[1024];
13139 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
13141 sprintf(templateString, "%s<", expClass->templateClass->fullName);
13142 for(cClass = expClass; cClass; cClass = cClass->base)
13146 if(cClass->templateClass)
13147 cClass = cClass->templateClass;
13148 for(param = cClass->templateParams.first; param; param = param->next)
13151 struct __ecereNameSpace__ecere__com__Class * sClass;
13152 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
13154 for(sClass = cClass->base; sClass; sClass = sClass->base)
13156 if(sClass->templateClass)
13157 sClass = sClass->templateClass;
13158 id += sClass->templateParams.count;
13160 arg = expClass->templateArgs[id];
13161 for(sClass = _class; sClass; sClass = sClass->base)
13163 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
13165 struct __ecereNameSpace__ecere__com__Class * nextClass;
13167 if(sClass->templateClass)
13168 sClass = sClass->templateClass;
13169 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
13171 if(nextClass->templateClass)
13172 nextClass = nextClass->templateClass;
13173 p += nextClass->templateParams.count;
13175 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
13177 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
13179 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
13181 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
13182 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
13189 char argument[256];
13191 argument[0] = '\0';
13192 switch(param->type)
13196 char expString[1024];
13197 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13198 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
13199 struct Expression * exp;
13200 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
13202 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
13203 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
13204 ProcessExpressionType(exp);
13205 ComputeExpression(exp);
13206 expString[0] = '\0';
13207 PrintExpression(exp, expString);
13208 strcat(argument, expString);
13209 FreeExpression(exp);
13214 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
13219 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
13220 strcat(argument, arg.__anon1.__anon1.dataTypeString);
13227 strcat(templateString, ", ");
13228 if(lastParam != p - 1)
13230 strcat(templateString, param->name);
13231 strcat(templateString, " = ");
13233 strcat(templateString, argument);
13242 int len = strlen(templateString);
13244 if(templateString[len - 1] == '<')
13248 if(templateString[len - 1] == '>')
13249 templateString[len++] = ' ';
13250 templateString[len++] = '>';
13252 templateString[len++] = '\0';
13255 struct Context * context = SetupTemplatesContext(_class);
13259 type = ProcessTypeString(templateString, 0);
13261 FinishTemplatesContext(context);
13264 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
13266 ProcessExpressionType(member->initializer->__anon1.exp);
13267 if(!member->initializer->__anon1.exp->expType)
13271 char expString[10240];
13273 expString[0] = '\0';
13274 PrintExpression(member->initializer->__anon1.exp, expString);
13275 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
13276 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
13279 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
13281 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
13284 else if(member->initializer)
13286 ProcessInitializer(member->initializer, type);
13293 if(_class && _class->type == 3)
13295 if(member->initializer)
13297 struct Type * type = MkClassType(_class->fullName);
13299 ProcessInitializer(member->initializer, type);
13305 if(member->initializer)
13307 ProcessInitializer(member->initializer, (((void *)0)));
13313 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
13317 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
13319 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
13323 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
13328 void ComputeInstantiation(struct Expression * exp)
13330 struct Instantiation * inst = exp->__anon1.instance;
13331 struct MembersInit * members;
13332 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
13333 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
13334 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
13335 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
13336 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
13337 int subMemberStackPos = 0;
13340 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
13344 if(_class->type == 0 || _class->type == 5)
13346 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
13347 if(_class->type == 0)
13348 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
13351 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13355 for(members = (*inst->members).first; members; members = members->next)
13357 switch(members->type)
13361 if(members->__anon1.dataMembers)
13363 struct MemberInit * member;
13365 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
13367 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
13368 unsigned int found = 0;
13369 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13370 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
13371 unsigned int dataMemberOffset;
13375 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
13378 if(curMember->isProperty)
13379 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
13382 dataMember = curMember;
13383 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
13384 if(_class->type == 0)
13385 dataMemberOffset += _class->base->structSize;
13392 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
13396 if(prop->memberAccess == 1)
13398 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
13399 curClass = prop->_class;
13404 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
13405 int _subMemberStackPos = 0;
13407 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
13411 if(dataMember->memberAccess == 1)
13413 curMember = dataMember;
13414 curClass = dataMember->_class;
13415 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
13416 subMemberStackPos = _subMemberStackPos;
13421 if(found && member->initializer && member->initializer->type == 0)
13423 struct Expression * value = member->initializer->__anon1.exp;
13424 struct Type * type = (((void *)0));
13425 unsigned int deepMember = 0;
13429 type = prop->dataType;
13431 else if(dataMember)
13433 if(!dataMember->dataType)
13434 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
13435 type = dataMember->dataType;
13437 if(ident && ident->next)
13440 for(ident = ident->next; ident && type; ident = ident->next)
13442 if(type->kind == 8)
13444 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
13446 type = prop->dataType;
13449 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
13451 type = dataMember->dataType;
13454 else if(type->kind == 9 || type->kind == 10)
13456 struct Type * memberType;
13458 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13460 if(!strcmp(memberType->name, ident->string))
13471 FreeType(value->destType);
13472 value->destType = type;
13475 ComputeExpression(value);
13477 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
13479 if(type->kind == 8)
13481 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13483 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
13485 if(!_class->dataType)
13486 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13487 type = _class->dataType;
13492 void * ptr = inst->data + dataMemberOffset;
13494 if(value->type == 2)
13500 GetInt(value, (int *)ptr);
13505 GetInt64(value, (long long *)ptr);
13510 GetIntPtr(value, (intptr_t *)ptr);
13515 GetIntSize(value, (ssize_t *)ptr);
13520 GetFloat(value, (float *)ptr);
13525 GetDouble(value, (double *)ptr);
13530 else if(value->type == 1)
13532 if(type->kind == 8)
13534 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13536 if(_class->type == 1)
13538 ComputeTypeSize(type);
13539 if(value->__anon1.instance->data)
13540 memcpy(ptr, value->__anon1.instance->data, type->size);
13545 else if(prop && prop->Set != (void *)(intptr_t)1)
13547 if(value->type == 1 && value->__anon1.instance->data)
13549 if(type->kind == 8)
13551 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13553 if(_class && (_class->type != 0 || __ecereNameSpace__ecere__com__eClass_IsDerived(((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)value->__anon1.instance->data))->_class, _class)))
13555 void (* Set)(void *, void *) = (void *)prop->Set;
13557 Set(inst->data, value->__anon1.instance->data);
13558 PopulateInstance(inst);
13562 else if(value->type == 2)
13568 void (* Set)(void *, double) = (void *)prop->Set;
13570 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
13575 void (* Set)(void *, float) = (void *)prop->Set;
13577 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
13582 void (* Set)(void *, int) = (void *)prop->Set;
13584 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
13589 void (* Set)(void *, long long) = (void *)prop->Set;
13591 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13596 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13598 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13603 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13605 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13610 else if(value->type == 3)
13614 ReadString(temp, value->__anon1.__anon2.string);
13615 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
13619 else if(!deepMember && type && _class->type == 3)
13623 if(value->type == 2)
13625 if(type->kind == 8)
13627 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13629 if(_class->type == 3)
13631 if(!_class->dataType)
13632 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13633 type = _class->dataType;
13641 float (* Set)(float) = (void *)prop->Set;
13643 GetFloat(member->initializer->__anon1.exp, &fValue);
13644 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
13651 double (* Set)(double) = (void *)prop->Set;
13653 GetDouble(member->initializer->__anon1.exp, &dValue);
13654 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
13662 else if(!deepMember && type && _class->type == 2)
13666 if(value->type == 1 && value->__anon1.instance->data)
13668 unsigned int (* Set)(void *) = (void *)prop->Set;
13670 bits = Set(value->__anon1.instance->data);
13672 else if(value->type == 2)
13676 else if(dataMember)
13678 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
13679 struct Type * type;
13682 bits = (bits & ~bitMember->mask);
13683 if(!bitMember->dataType)
13684 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
13685 type = bitMember->dataType;
13686 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13688 if(!type->__anon1._class->__anon1.registered->dataType)
13689 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
13690 type = type->__anon1._class->__anon1.registered->dataType;
13699 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
13707 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
13716 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
13724 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
13732 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
13740 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
13745 bits |= part << bitMember->pos;
13751 if(_class && _class->type == 3)
13753 ComputeExpression(member->initializer->__anon1.exp);
13754 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
13756 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
13766 if(_class && _class->type == 2)
13768 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13773 FreeInstance(inst);
13777 void ComputeExpression(struct Expression * exp)
13783 struct Identifier * id = exp->__anon1.__anon1.identifier;
13785 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
13787 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
13789 if(c && c->type == 4)
13791 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13795 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13796 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13798 for(value = e->values.first; value; value = value->next)
13800 if(!strcmp(value->name, id->string))
13805 const char * dts = c->dataTypeString;
13807 FreeExpContents(exp);
13809 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13818 ComputeInstantiation(exp);
13823 struct Expression * exp1, * exp2 = (((void *)0));
13824 struct Operand op1 =
13831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13834 struct Operand op2 =
13841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13845 if(exp->__anon1.op.exp2)
13847 struct Expression * e = exp->__anon1.op.exp2;
13849 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13851 if(e->type == 5 || e->type == 32 || e->type == 23)
13854 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13856 e = (*e->__anon1.list).last;
13859 if(exp->__anon1.op.op == 261 && e && e->expType)
13861 if(e->type == 3 && e->__anon1.__anon2.string)
13863 char * string = e->__anon1.__anon2.string;
13864 int len = strlen(string);
13865 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13867 len = UnescapeString(tmp, string + 1, len - 2);
13868 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13869 FreeExpContents(exp);
13871 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13875 struct Type * type = e->expType;
13878 FreeExpContents(exp);
13880 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13886 ComputeExpression(exp->__anon1.op.exp2);
13888 if(exp->__anon1.op.exp1)
13890 ComputeExpression(exp->__anon1.op.exp1);
13891 exp1 = exp->__anon1.op.exp1;
13892 exp2 = exp->__anon1.op.exp2;
13893 op1 = GetOperand(exp1);
13895 op1.type->refCount++;
13898 op2 = GetOperand(exp2);
13900 op2.type->refCount++;
13905 exp1 = exp->__anon1.op.exp2;
13906 op1 = GetOperand(exp1);
13908 op1.type->refCount++;
13910 CallOperator(exp, exp1, exp2, &op1, &op2);
13912 FreeType(op1.type);
13914 FreeType(op2.type);
13920 struct Expression * e, * n;
13922 for(e = (*exp->__anon1.list).first; e; e = n)
13927 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13928 struct Expression * prev = exp->prev;
13929 struct Expression * next = exp->next;
13931 if(exp->expType && exp->expType->kind == 8 && (!e->expType || e->expType->kind != 8))
13933 FreeType(e->expType);
13934 e->expType = exp->expType;
13935 e->expType->refCount++;
13937 ComputeExpression(e);
13938 FreeType(exp->expType);
13939 FreeType(exp->destType);
13943 ((e ? __extension__ ({
13944 void * __ecerePtrToDelete = (e);
13946 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13948 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13959 struct Expression * memberExp = exp->__anon1.member.exp;
13960 struct Identifier * memberID = exp->__anon1.member.member;
13961 struct Type * type;
13963 ComputeExpression(exp->__anon1.member.exp);
13964 type = exp->__anon1.member.exp->expType;
13967 struct __ecereNameSpace__ecere__com__Class * _class = (exp->__anon1.member.member && exp->__anon1.member.member->classSym) ? exp->__anon1.member.member->classSym->__anon1.registered : (((type->kind == 8 || type->kind == 19) && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0)));
13968 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13969 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13970 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13972 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13973 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13977 struct Symbol * classSym;
13980 PrintTypeNoConst(type, string, 0, 1);
13981 classSym = FindClass(string);
13982 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13984 if(exp->__anon1.member.member)
13986 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13988 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13990 if(!prop && !member && _class && exp->__anon1.member.member)
13992 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13994 convertTo = _class;
13995 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13996 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
14002 struct Type * type = prop->dataType;
14004 if(_class->type == 3)
14006 if(type->kind == 8)
14008 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14010 if(_class->type == 3)
14012 if(!_class->dataType)
14013 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14014 type = _class->dataType;
14022 float (* Get)(float) = (void *)prop->Get;
14024 GetFloat(exp->__anon1.member.exp, &value);
14025 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
14032 double (* Get)(double);
14034 GetDouble(exp->__anon1.member.exp, &value);
14036 Get = (void *)prop->Set;
14038 Get = (void *)prop->Get;
14039 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
14049 struct Expression * value = exp->__anon1.member.exp;
14050 struct Type * type;
14052 if(!prop->dataType)
14053 ProcessPropertyType(prop);
14054 type = prop->dataType;
14058 else if(_class->type == 1)
14064 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
14066 if(propertyClass->type == 1 && value->type == 1)
14068 void (* Set)(void *, void *) = (void *)prop->Set;
14070 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14071 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14072 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14073 exp->__anon1.instance->loc = exp->loc;
14075 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
14076 PopulateInstance(exp->__anon1.instance);
14083 void (* Set)(void *, int) = (void *)prop->Set;
14085 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14086 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14087 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14088 exp->__anon1.instance->loc = exp->loc;
14090 GetInt(value, &intValue);
14091 Set(exp->__anon1.instance->data, intValue);
14092 PopulateInstance(exp->__anon1.instance);
14097 long long intValue;
14098 void (* Set)(void *, long long) = (void *)prop->Set;
14100 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14101 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14102 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14103 exp->__anon1.instance->loc = exp->loc;
14105 GetInt64(value, &intValue);
14106 Set(exp->__anon1.instance->data, intValue);
14107 PopulateInstance(exp->__anon1.instance);
14113 void (* Set)(void *, intptr_t) = (void *)prop->Set;
14115 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14116 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14117 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14118 exp->__anon1.instance->loc = exp->loc;
14120 GetIntPtr(value, &intValue);
14121 Set(exp->__anon1.instance->data, intValue);
14122 PopulateInstance(exp->__anon1.instance);
14128 void (* Set)(void *, ssize_t) = (void *)prop->Set;
14130 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14131 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14132 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14133 exp->__anon1.instance->loc = exp->loc;
14135 GetIntSize(value, &intValue);
14136 Set(exp->__anon1.instance->data, intValue);
14137 PopulateInstance(exp->__anon1.instance);
14143 void (* Set)(void *, float) = (void *)prop->Set;
14145 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14146 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14147 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14148 exp->__anon1.instance->loc = exp->loc;
14150 GetFloat(value, &floatValue);
14151 Set(exp->__anon1.instance->data, floatValue);
14152 PopulateInstance(exp->__anon1.instance);
14157 double doubleValue;
14158 void (* Set)(void *, double) = (void *)prop->Set;
14160 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14161 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14162 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14163 exp->__anon1.instance->loc = exp->loc;
14165 GetDouble(value, &doubleValue);
14166 Set(exp->__anon1.instance->data, doubleValue);
14167 PopulateInstance(exp->__anon1.instance);
14172 else if(_class->type == 2)
14178 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
14180 if(propertyClass->type == 1 && value->__anon1.instance->data)
14182 unsigned int (* Set)(void *) = (void *)prop->Set;
14183 unsigned int bits = Set(value->__anon1.instance->data);
14185 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
14189 else if(_class->type == 2)
14191 unsigned int value;
14192 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
14195 GetUInt(exp->__anon1.member.exp, &value);
14197 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
14206 if(_class->type == 2)
14208 unsigned int value;
14210 GetUInt(exp->__anon1.member.exp, &value);
14215 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14217 if(_class->type == 1)
14219 void (* Get)(unsigned int, void *) = (void *)prop->Get;
14221 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14222 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14223 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14224 exp->__anon1.instance->loc = exp->loc;
14226 Get(value, exp->__anon1.instance->data);
14227 PopulateInstance(exp->__anon1.instance);
14229 else if(_class->type == 2)
14231 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
14232 uint64 bits = Get(value);
14234 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
14241 else if(_class->type == 1)
14243 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
14249 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14251 if(_class->type == 1 && value)
14253 void (* Get)(void *, void *) = (void *)prop->Get;
14255 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14256 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14257 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14258 exp->__anon1.instance->loc = exp->loc;
14260 Get(value, exp->__anon1.instance->data);
14261 PopulateInstance(exp->__anon1.instance);
14272 exp->isConstant = 0;
14281 FreeExpression(memberExp);
14282 FreeIdentifier(memberID);
14288 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
14290 FreeExpContents(exp);
14291 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
14298 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
14300 if(classSym && classSym->__anon1.registered)
14302 if(classSym->__anon1.registered->fixed)
14304 FreeSpecifier(exp->__anon1._class);
14305 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
14310 char className[1024];
14312 strcpy(className, "__ecereClass_");
14313 FullClassNameCat(className, classSym->string, 1);
14314 DeclareClass(curExternal, classSym, className);
14315 FreeExpContents(exp);
14317 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
14318 exp->__anon1.member.member = MkIdentifier("structSize");
14325 struct Type * type;
14326 struct Expression * e = exp;
14328 if(exp->type == 11)
14330 if(exp->__anon1.cast.exp)
14331 ComputeExpression(exp->__anon1.cast.exp);
14332 e = exp->__anon1.cast.exp;
14334 if(e && exp->expType)
14336 type = exp->expType;
14337 if(type->kind == 8)
14339 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14341 if(_class && (_class->type == 3 || _class->type == 2))
14343 if(!_class->dataType)
14344 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14345 type = _class->dataType;
14356 if(GetChar(e, &value))
14358 FreeExpContents(exp);
14359 exp->__anon1.__anon1.constant = PrintChar(value);
14365 unsigned char value = 0;
14367 if(GetUChar(e, &value))
14369 FreeExpContents(exp);
14370 exp->__anon1.__anon1.constant = PrintUChar(value);
14380 if(GetShort(e, &value))
14382 FreeExpContents(exp);
14383 exp->__anon1.__anon1.constant = PrintShort(value);
14389 unsigned short value = 0;
14391 if(GetUShort(e, &value))
14393 FreeExpContents(exp);
14394 exp->__anon1.__anon1.constant = PrintUShort(value);
14404 if(GetInt(e, &value))
14406 FreeExpContents(exp);
14407 exp->__anon1.__anon1.constant = PrintInt(value);
14413 unsigned int value = 0;
14415 if(GetUInt(e, &value))
14417 FreeExpContents(exp);
14418 exp->__anon1.__anon1.constant = PrintUInt(value);
14426 long long value = 0;
14428 if(GetInt64(e, &value))
14430 FreeExpContents(exp);
14431 exp->__anon1.__anon1.constant = PrintInt64(value);
14439 if(GetUInt64(e, &value))
14441 FreeExpContents(exp);
14442 exp->__anon1.__anon1.constant = PrintUInt64(value);
14450 intptr_t value = 0;
14452 if(GetIntPtr(e, &value))
14454 FreeExpContents(exp);
14455 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
14461 uintptr_t value = 0;
14463 if(GetUIntPtr(e, &value))
14465 FreeExpContents(exp);
14466 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
14476 if(GetIntSize(e, &value))
14478 FreeExpContents(exp);
14479 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
14487 if(GetUIntSize(e, &value))
14489 FreeExpContents(exp);
14490 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
14499 if(GetFloat(e, &value))
14501 FreeExpContents(exp);
14502 exp->__anon1.__anon1.constant = PrintFloat(value);
14511 if(GetDouble(e, &value))
14513 FreeExpContents(exp);
14514 exp->__anon1.__anon1.constant = PrintDouble(value);
14525 struct Operand op1 =
14532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
14535 struct Operand op2 =
14542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
14545 struct Operand op3 =
14552 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
14556 if(exp->__anon1.cond.exp)
14557 ComputeExpression((*exp->__anon1.cond.exp).last);
14558 if(exp->__anon1.cond.elseExp)
14559 ComputeExpression(exp->__anon1.cond.elseExp);
14560 if(exp->__anon1.cond.cond)
14561 ComputeExpression(exp->__anon1.cond.cond);
14562 op1 = GetOperand(exp->__anon1.cond.cond);
14564 op1.type->refCount++;
14565 op2 = GetOperand((*exp->__anon1.cond.exp).last);
14567 op2.type->refCount++;
14568 op3 = GetOperand(exp->__anon1.cond.elseExp);
14570 op3.type->refCount++;
14573 FreeExpContents(exp);
14574 op1.ops.Cond(exp, &op1, &op2, &op3);
14577 FreeType(op1.type);
14579 FreeType(op2.type);
14581 FreeType(op3.type);
14587 static void ProcessFunction(struct FunctionDefinition * function);
14589 void ProcessInstantiationType(struct Instantiation * inst)
14591 yylloc = inst->loc;
14594 struct MembersInit * members;
14595 struct Symbol * classSym;
14596 struct __ecereNameSpace__ecere__com__Class * _class;
14598 classSym = inst->_class->__anon1.__anon1.symbol;
14599 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14600 if(!_class || _class->type != 5)
14601 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14602 afterExternal = afterExternal ? afterExternal : curExternal;
14604 ProcessExpressionType(inst->exp);
14605 inst->isConstant = 1;
14608 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14609 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14610 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14611 int subMemberStackPos = 0;
14613 for(members = (*inst->members).first; members; members = members->next)
14615 switch(members->type)
14620 static unsigned int instMethodID = 0;
14621 struct External * external = curExternal;
14622 struct Context * context = curContext;
14623 struct Declarator * declarator = members->__anon1.function->declarator;
14624 struct Identifier * nameID = GetDeclId(declarator);
14625 char * unmangled = nameID ? nameID->string : (((void *)0));
14626 struct Expression * exp;
14627 struct External * createdExternal = (((void *)0));
14633 strcpy(name, "__ecereInstMeth_");
14634 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14636 strcat(name, nameID->string);
14638 sprintf(number, "_%08d", instMethodID++);
14639 strcat(name, number);
14640 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14644 struct Symbol * symbol = declarator->symbol;
14645 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14647 if(method && method->type == 1)
14649 symbol->__anon1.method = method;
14650 ProcessMethodType(method);
14651 if(!symbol->type->__anon1.__anon2.thisClass)
14653 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14655 if(!currentClass->symbol)
14656 currentClass->symbol = FindClass(currentClass->fullName);
14657 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14661 if(!_class->symbol)
14662 _class->symbol = FindClass(_class->fullName);
14663 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14666 DeclareType(curExternal, symbol->type, 1, 1);
14670 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14673 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14676 FreeSpecifier(nameID->_class);
14677 nameID->_class = (((void *)0));
14679 curExternal = createdExternal;
14682 if(createdExternal->__anon1.function)
14683 ProcessFunction(createdExternal->__anon1.function);
14685 else if(declarator)
14687 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14688 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14690 curExternal = external;
14691 curContext = context;
14694 FreeClassFunction(members->__anon1.function);
14695 exp = QMkExpId(name);
14697 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14698 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14704 if(members->__anon1.dataMembers && classSym)
14706 struct MemberInit * member;
14707 struct Location oldyyloc = yylloc;
14709 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14711 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14712 if(member->initializer && !member->initializer->isConstant)
14713 inst->isConstant = 0;
14725 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14727 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14733 if(spec->__anon1.specifier == THISCLASS)
14738 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14739 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14740 ProcessSpecifier(spec, declareStruct, 0);
14747 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14750 DeclareType(curExternal, symbol->type, 1, 1);
14751 else if(spec->__anon1.__anon1.symbol)
14753 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14755 if(warnClasses && !c)
14756 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14757 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14763 struct Enumerator * e;
14765 if(spec->__anon1.__anon2.list)
14767 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14770 ProcessExpressionType(e->exp);
14779 if(spec->__anon1.__anon2.definitions)
14781 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14783 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14790 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14795 if(decl->__anon1.identifier->classSym)
14797 FreeSpecifier(decl->__anon1.identifier->_class);
14798 decl->__anon1.identifier->_class = (((void *)0));
14802 if(decl->__anon1.array.exp)
14803 ProcessExpressionType(decl->__anon1.array.exp);
14811 struct Identifier * id = (((void *)0));
14812 struct Specifier * classSpec = (((void *)0));
14814 if(decl->type == 4)
14816 id = GetDeclId(decl);
14817 if(id && id->_class)
14819 classSpec = id->_class;
14820 id->_class = (((void *)0));
14823 if(decl->declarator)
14824 ProcessDeclarator(decl->declarator, isFunction);
14825 if(decl->type == 4)
14829 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14831 if(!decl->__anon1.function.parameters)
14832 decl->__anon1.function.parameters = MkList();
14833 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14835 if(decl->__anon1.function.parameters)
14837 struct TypeName * param;
14839 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14841 if(param->qualifiers)
14843 struct Specifier * spec;
14845 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14847 if(spec->type == 0)
14849 if(spec->__anon1.specifier == TYPED_OBJECT)
14851 struct Declarator * d = param->declarator;
14852 struct TypeName * newParam = (newParam = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), newParam->qualifiers = MkListOne(MkSpecifier(VOID)), newParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d), newParam);
14854 if(!d || d->type != 5)
14855 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14856 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14857 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14858 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14859 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14860 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14864 else if(spec->__anon1.specifier == ANY_OBJECT)
14866 struct Declarator * d = param->declarator;
14868 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14869 param->qualifiers = MkListOne(MkSpecifier(VOID));
14870 if(!d || d->type != 5)
14871 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14872 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14875 else if(spec->__anon1.specifier == THISCLASS)
14880 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14881 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14882 ProcessSpecifier(spec, 0, 0);
14887 else if(spec->type == 1)
14889 ProcessSpecifier(spec, isFunction, 1);
14891 else if((spec->type == 3 || spec->type == 4) && !spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && spec->__anon1.__anon2.id->string)
14893 struct Declarator * d = param->declarator;
14895 if(!d || d->type != 5)
14896 DeclareStruct(curExternal, spec->__anon1.__anon2.id->string, 0, 1);
14900 if(param->declarator)
14901 ProcessDeclarator(param->declarator, 0);
14910 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14912 yylloc = decl->loc;
14917 unsigned int declareStruct = 0;
14919 if(decl->__anon1.__anon1.declarators)
14921 struct InitDeclarator * d;
14923 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14925 struct Type * type, * subType;
14927 ProcessDeclarator(d->declarator, 0);
14928 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14931 ProcessInitializer(d->initializer, type);
14932 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14934 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14936 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14938 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14939 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14940 if(decl->__anon1.__anon1.specifiers)
14941 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14942 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14945 decl->__anon1.inst = inst;
14949 for(subType = type; subType; )
14951 if(subType->kind == 8)
14956 else if(subType->kind == 13)
14958 else if(subType->kind == 12)
14959 subType = subType->__anon1.__anon4.arrayType;
14968 if(decl->__anon1.__anon1.specifiers)
14970 struct Specifier * s;
14972 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14974 ProcessSpecifier(s, declareStruct, 1);
14981 ProcessInstantiationType(decl->__anon1.inst);
14986 struct Specifier * spec;
14987 struct Declarator * d;
14988 unsigned int declareStruct = 0;
14990 if(decl->__anon1.__anon1.declarators)
14992 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14994 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14995 struct Type * subType;
14997 ProcessDeclarator(d, 0);
14998 for(subType = type; subType; )
15000 if(subType->kind == 8)
15005 else if(subType->kind == 13)
15007 else if(subType->kind == 12)
15008 subType = subType->__anon1.__anon4.arrayType;
15015 if(decl->__anon1.__anon1.specifiers)
15017 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
15018 ProcessSpecifier(spec, declareStruct, warnClasses);
15025 static void ProcessStatement(struct Statement * stmt)
15027 yylloc = stmt->loc;
15031 ProcessStatement(stmt->__anon1.labeled.stmt);
15034 if(stmt->__anon1.caseStmt.exp)
15036 FreeType(stmt->__anon1.caseStmt.exp->destType);
15037 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
15039 curSwitchType->refCount++;
15040 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
15041 ComputeExpression(stmt->__anon1.caseStmt.exp);
15043 if(stmt->__anon1.caseStmt.stmt)
15044 ProcessStatement(stmt->__anon1.caseStmt.stmt);
15048 if(stmt->__anon1.compound.context)
15050 struct Declaration * decl;
15051 struct Statement * s;
15052 struct Statement * prevCompound = curCompound;
15053 struct Context * prevContext = curContext;
15055 if(!stmt->__anon1.compound.isSwitch)
15056 curCompound = stmt;
15057 curContext = stmt->__anon1.compound.context;
15058 if(stmt->__anon1.compound.declarations)
15060 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
15061 ProcessDeclaration(decl, 1);
15063 if(stmt->__anon1.compound.statements)
15065 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
15066 ProcessStatement(s);
15068 curContext = prevContext;
15069 curCompound = prevCompound;
15075 struct Expression * exp;
15077 if(stmt->__anon1.expressions)
15079 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15080 ProcessExpressionType(exp);
15086 struct Expression * exp;
15088 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
15089 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
15090 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
15091 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
15093 ProcessExpressionType(exp);
15095 if(stmt->__anon1.ifStmt.stmt)
15096 ProcessStatement(stmt->__anon1.ifStmt.stmt);
15097 if(stmt->__anon1.ifStmt.elseStmt)
15098 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
15103 struct Type * oldSwitchType = curSwitchType;
15105 if(stmt->__anon1.switchStmt.exp)
15107 struct Expression * exp;
15109 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
15113 ProcessExpressionType(exp);
15116 curSwitchType = exp->expType;
15119 ProcessStatement(stmt->__anon1.switchStmt.stmt);
15120 curSwitchType = oldSwitchType;
15125 if(stmt->__anon1.whileStmt.exp)
15127 struct Expression * exp;
15129 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
15130 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
15131 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
15132 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
15134 ProcessExpressionType(exp);
15137 if(stmt->__anon1.whileStmt.stmt)
15138 ProcessStatement(stmt->__anon1.whileStmt.stmt);
15143 if(stmt->__anon1.doWhile.exp)
15145 struct Expression * exp;
15147 if((*stmt->__anon1.doWhile.exp).last)
15149 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
15150 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
15151 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
15153 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
15155 ProcessExpressionType(exp);
15158 if(stmt->__anon1.doWhile.stmt)
15159 ProcessStatement(stmt->__anon1.doWhile.stmt);
15164 struct Expression * exp;
15166 if(stmt->__anon1.forStmt.init)
15167 ProcessStatement(stmt->__anon1.forStmt.init);
15168 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
15170 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
15171 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
15172 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
15174 if(stmt->__anon1.forStmt.check)
15175 ProcessStatement(stmt->__anon1.forStmt.check);
15176 if(stmt->__anon1.forStmt.increment)
15178 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
15179 ProcessExpressionType(exp);
15181 if(stmt->__anon1.forStmt.stmt)
15182 ProcessStatement(stmt->__anon1.forStmt.stmt);
15187 struct Identifier * id = stmt->__anon1.forEachStmt.id;
15188 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
15189 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
15190 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
15191 char iteratorType[1024];
15192 struct Type * source;
15193 struct Expression * e;
15194 unsigned int isBuiltin = exp && (*exp).last && (((struct Expression *)(*exp).last)->type == 35 || (((struct Expression *)(*exp).last)->type == 11 && ((struct Expression *)(*exp).last)->__anon1.cast.exp->type == 35));
15195 struct Expression * arrayExp;
15196 const char * typeString = (((void *)0));
15197 int builtinCount = 0;
15199 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15203 FreeType(e->destType);
15204 e->destType = ProcessTypeString("Container", 0);
15206 if(!isBuiltin || e->next)
15207 ProcessExpressionType(e);
15209 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15210 if(isBuiltin || (source && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, containerClass)))
15212 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15213 struct Symbol * symbol;
15214 struct Expression * expIt = (((void *)0));
15215 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15216 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15217 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15218 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15223 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15224 stmt->__anon1.compound.context->parent = curContext;
15225 curContext = stmt->__anon1.compound.context;
15227 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15229 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15231 isCustomAVLTree = 1;
15232 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15235 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15237 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15239 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15242 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15244 if(inCompiler && isArray)
15246 struct Declarator * decl;
15247 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15249 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15250 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15251 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15255 struct Type * type = (((void *)0));
15256 char typeStringBuf[1024];
15258 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15259 if(((struct Expression *)(*exp).last)->type == 11)
15261 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15264 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15266 if(arrayExp->destType && arrayExp->destType->kind == 8 && arrayExp->destType->__anon1._class && arrayExp->destType->__anon1._class->__anon1.registered && arrayExp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(arrayExp->destType->__anon1._class->__anon1.registered, containerClass) && arrayExp->destType->__anon1._class->__anon1.registered->templateArgs)
15268 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15270 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15272 else if(arrayExp->__anon1.list)
15274 struct Expression * e;
15276 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15278 ProcessExpressionType(e);
15288 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15292 e->expType = (((void *)0));
15293 e = (*arrayExp->__anon1.list).first;
15294 ProcessExpressionType(e);
15297 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15299 FreeType(e->expType);
15300 e->expType = (((void *)0));
15302 type = (((void *)0));
15310 FreeType(e->expType);
15311 e->expType = (((void *)0));
15317 typeStringBuf[0] = '\0';
15318 PrintType(type, typeStringBuf, 0, 1);
15319 typeString = typeStringBuf;
15327 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15328 struct Declarator * decl;
15329 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15331 if(arrayExp->__anon1.list)
15333 struct Expression * e;
15335 builtinCount = (*arrayExp->__anon1.list).count;
15336 type = ProcessTypeString(typeString, 0);
15337 while((e = (*arrayExp->__anon1.list).first))
15339 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15340 e->destType = type;
15342 ProcessExpressionType(e);
15344 ListAdd(initializers, MkInitializerAssignment(e));
15347 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15349 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15350 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15351 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15352 FreeList(exp, (void *)(FreeExpression));
15354 else if(arrayExp->__anon1.list)
15356 struct Expression * e;
15358 type = ProcessTypeString(typeString, 0);
15359 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15361 e->destType = type;
15363 ProcessExpressionType(e);
15370 arrayExp->expType = ProcessTypeString("Container", 0);
15371 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15374 else if(inCompiler && isLinkList && !isList)
15376 struct Declarator * decl;
15377 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15379 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15380 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15381 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15383 else if(inCompiler && _class->templateArgs)
15386 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15388 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15389 stmt->__anon1.compound.declarations = MkListOne(MkDeclarationInst(MkInstantiationNamed(MkListOne(MkSpecifierName(iteratorType)), MkExpIdentifier(id), MkListOne(MkMembersInitList(MkListOne(MkMemberInit(isMap ? MkListOne(MkIdentifier("map")) : (((void *)0)), MkInitializerAssignment(MkExpBrackets(exp)))))))));
15393 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15396 switch(block->type)
15399 if(block->__anon1.compound.context)
15400 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15403 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15404 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15405 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15406 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15409 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15410 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15413 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15414 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15417 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15418 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15421 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15422 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15425 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15426 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15432 block = MkIfStmt(filter, block, (((void *)0)));
15436 stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("array")), '+', MkExpMember(MkExpIdentifier(MkIdentifier("__internalArray")), MkIdentifier("count")))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
15437 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15438 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15439 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15445 sprintf(count, "%d", builtinCount);
15446 stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpIdentifier(MkIdentifier("__internalArray"))))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '<', MkExpOp(MkExpIdentifier(MkIdentifier("__internalArray")), '+', MkExpConstant(count))))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), INC_OP, (((void *)0)))), block));
15447 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15448 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15449 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15451 else if(isLinkList && !isList)
15453 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15454 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15456 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15458 stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("next")))), block));
15462 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15463 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15465 stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpCast(MkTypeName(specs, decl), MkExpCall(MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("GetNext")), MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("IteratorPointer")), (((void *)0))), MkExpIdentifier(CopyIdentifier(id)))))))), block));
15467 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15468 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15469 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15473 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15475 ProcessExpressionType(expIt);
15476 if((*stmt->__anon1.compound.declarations).first)
15477 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15479 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15480 ProcessStatement(stmt);
15483 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15485 curContext = stmt->__anon1.compound.context->parent;
15490 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15502 struct Expression * exp;
15504 if(stmt->__anon1.expressions)
15506 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15510 if(curFunction && !curFunction->type)
15511 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15512 FreeType(exp->destType);
15513 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15515 exp->destType->refCount++;
15517 ProcessExpressionType(exp);
15524 ProcessDeclaration(stmt->__anon1.decl, 1);
15529 struct AsmField * field;
15531 if(stmt->__anon1.asmStmt.inputFields)
15533 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15534 if(field->expression)
15535 ProcessExpressionType(field->expression);
15537 if(stmt->__anon1.asmStmt.outputFields)
15539 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15540 if(field->expression)
15541 ProcessExpressionType(field->expression);
15543 if(stmt->__anon1.asmStmt.clobberedFields)
15545 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15547 if(field->expression)
15548 ProcessExpressionType(field->expression);
15555 struct PropertyWatch * propWatch;
15556 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15557 struct Expression * object = stmt->__anon1._watch.object;
15558 struct Expression * watcher = stmt->__anon1._watch.watcher;
15561 ProcessExpressionType(watcher);
15563 ProcessExpressionType(object);
15566 if(watcher || thisClass)
15568 struct External * external = curExternal;
15569 struct Context * context = curContext;
15572 stmt->__anon1.expressions = MkList();
15573 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15575 struct ClassFunction * func;
15576 char watcherName[1024];
15577 struct __ecereNameSpace__ecere__com__Class * watcherClass = watcher ? ((watcher->expType && watcher->expType->kind == 8 && watcher->expType->__anon1._class) ? watcher->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15578 struct External * createdExternal;
15580 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15581 if(propWatch->deleteWatch)
15582 strcat(watcherName, "_delete");
15585 struct Identifier * propID;
15587 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15589 strcat(watcherName, "_");
15590 strcat(watcherName, propID->string);
15593 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15595 func = MkClassFunction(MkListOne(MkSpecifier(VOID)), (((void *)0)), MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifierName(object->expType->__anon1._class->string)), MkDeclaratorIdentifier(MkIdentifier("value"))))), (((void *)0)));
15596 ProcessClassFunctionBody(func, propWatch->compound);
15597 propWatch->compound = (((void *)0));
15598 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15599 FreeClassFunction(func);
15600 curExternal = createdExternal;
15601 ProcessFunction(createdExternal->__anon1.function);
15602 if(propWatch->deleteWatch)
15604 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15606 ListAdd(args, CopyExpression(object));
15607 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15608 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15609 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15613 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15614 struct Identifier * propID;
15616 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15618 char propName[1024];
15619 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15623 char getName[1024], setName[1024];
15624 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15626 DeclareProperty(createdExternal, prop, setName, getName);
15627 strcpy(propName, "__ecereProp_");
15628 FullClassNameCat(propName, prop->_class->fullName, 0);
15629 strcat(propName, "_");
15630 FullClassNameCat(propName, prop->name, 1);
15631 ListAdd(args, CopyExpression(object));
15632 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15633 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15634 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15635 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15636 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15639 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15644 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15646 curExternal = external;
15647 curContext = context;
15649 FreeExpression(watcher);
15651 FreeExpression(object);
15652 FreeList(watches, (void *)(FreePropertyWatch));
15655 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15659 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15661 ProcessStatement(propWatch->compound);
15668 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15669 struct Expression * object = stmt->__anon1._watch.object;
15670 struct __ecereNameSpace__ecere__com__Class * _class;
15673 ProcessExpressionType(object);
15676 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15679 struct Identifier * propID;
15682 stmt->__anon1.expressions = MkList();
15683 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15685 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15692 for(propID = (*watches).first; propID; propID = propID->next)
15694 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15698 CreateFireWatcher(prop, object, stmt);
15701 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15706 struct __ecereNameSpace__ecere__com__Property * prop;
15707 struct __ecereNameSpace__ecere__com__Class * base;
15709 for(base = _class; base; base = base->base)
15711 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15713 if(prop->isProperty && prop->isWatchable)
15715 CreateFireWatcher(prop, object, stmt);
15721 FreeExpression(object);
15722 FreeList(watches, (void *)(FreeIdentifier));
15725 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15731 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15732 struct Expression * object = stmt->__anon1._watch.object;
15733 struct Expression * watcher = stmt->__anon1._watch.watcher;
15734 struct __ecereNameSpace__ecere__com__Class * _class;
15737 ProcessExpressionType(object);
15739 ProcessExpressionType(watcher);
15742 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15743 if(watcher || thisClass)
15747 struct Identifier * propID;
15750 stmt->__anon1.expressions = MkList();
15753 struct __ecereNameSpace__ecere__sys__OldList * args;
15756 ListAdd(args, CopyExpression(object));
15757 ListAdd(args, MkExpConstant("0"));
15758 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15759 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15763 for(propID = (*watches).first; propID; propID = propID->next)
15765 char propName[1024];
15766 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15770 char getName[1024], setName[1024];
15771 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15773 DeclareProperty(curExternal, prop, setName, getName);
15774 strcpy(propName, "__ecereProp_");
15775 FullClassNameCat(propName, prop->_class->fullName, 0);
15776 strcat(propName, "_");
15777 FullClassNameCat(propName, prop->name, 1);
15778 ListAdd(args, CopyExpression(object));
15779 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15780 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15781 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15784 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15788 FreeExpression(object);
15790 FreeExpression(watcher);
15791 FreeList(watches, (void *)(FreeIdentifier));
15794 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15797 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15804 void ComputeDataTypes()
15806 struct External * external;
15808 currentClass = (((void *)0));
15809 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15810 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15811 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15812 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15813 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15814 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15815 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15816 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15817 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15818 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15819 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15820 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15821 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15822 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15823 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15824 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15825 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15826 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15827 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15828 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15829 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15831 for(external = (*ast).first; external; external = external->next)
15833 afterExternal = curExternal = external;
15834 if(external->type == 0)
15838 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15839 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15841 currentClass = external->__anon1.function->_class;
15842 ProcessFunction(external->__anon1.function);
15844 else if(external->type == 1)
15846 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15848 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15849 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15851 currentClass = (((void *)0));
15852 if(external->__anon1.declaration)
15853 ProcessDeclaration(external->__anon1.declaration, 1);
15855 else if(external->type == 2)
15857 struct ClassDefinition * _class = external->__anon1._class;
15859 currentClass = external->symbol->__anon1.registered;
15862 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15863 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15865 if(_class->definitions)
15867 ProcessClass(_class->definitions, _class->symbol);
15871 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15872 ((external ? __extension__ ({
15873 void * __ecerePtrToDelete = (external);
15875 __ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
15876 }) : 0), external = 0);
15879 else if(external->type == 4)
15881 thisNameSpace = external->__anon1.id->string;
15884 currentClass = (((void *)0));
15885 thisNameSpace = (((void *)0));
15886 curExternal = (((void *)0));
15889 void ProcessExpressionType(struct Expression * exp)
15891 unsigned int unresolved = 0;
15892 struct Location oldyylloc = yylloc;
15893 unsigned int notByReference = 0;
15895 if(!exp || exp->expType)
15902 struct Identifier * id = exp->__anon1.__anon1.identifier;
15904 if(!id || !topContext)
15906 if(id->_class && id->_class->__anon1.__anon1.name)
15908 id->classSym = id->_class->__anon1.__anon1.symbol;
15910 if(!strcmp(id->string, "__runtimePlatform"))
15912 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15915 else if(strstr(id->string, "__ecereClass") == id->string)
15917 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15920 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15922 ReplaceClassMembers(exp, thisClass);
15925 ProcessExpressionType(exp);
15928 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15933 struct Symbol * symbol = (((void *)0));
15934 unsigned int findInGlobal = 0;
15936 if(!topContext->parent && exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered->type == 4)
15939 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15942 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15948 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15951 ProcessExpressionType(exp);
15955 else if(currentClass && !id->_class)
15957 if(ResolveIdWithClass(exp, currentClass, 1))
15960 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15964 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15967 struct Type * type = symbol->type;
15968 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15970 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15972 struct Context * context = SetupTemplatesContext(_class);
15974 type = ReplaceThisClassType(_class);
15975 FinishTemplatesContext(context);
15977 type->refCount = 0;
15979 FreeSpecifier(id->_class);
15980 id->_class = (((void *)0));
15981 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15982 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15983 id->classSym = (((void *)0));
15984 exp->expType = type;
15987 if(type && (type->kind == 15))
15988 exp->isConstant = 1;
15989 if(symbol->isParam || !strcmp(id->string, "this"))
15991 if(_class && _class->type == 1 && !type->declaredWithStruct)
15992 exp->byReference = 1;
15994 if(symbol->isIterator)
15996 if(symbol->isIterator == 3)
15999 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
16000 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
16001 exp->expType = (((void *)0));
16002 ProcessExpressionType(exp);
16004 else if(symbol->isIterator != 4)
16007 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
16008 exp->__anon1.member.exp->expType = exp->expType;
16009 exp->__anon1.member.member = MkIdentifier("data");
16010 exp->expType = (((void *)0));
16011 ProcessExpressionType(exp);
16018 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
16020 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16024 strcpy(name, thisNameSpace);
16025 strcat(name, "::");
16026 strcat(name, id->string);
16027 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
16030 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
16035 for(c = 0; c < definedExpStackPos; c++)
16036 if(definedExpStack[c] == definedExp)
16038 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
16040 struct Location backupYylloc = yylloc;
16041 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
16043 definedExpStack[definedExpStackPos++] = definedExp;
16044 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
16045 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
16046 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
16048 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
16049 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
16050 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
16051 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
16053 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
16054 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
16056 parsedExpression = (((void *)0));
16058 expression_yyparse();
16059 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
16061 fileInput = backInput;
16062 yylloc = backupYylloc;
16063 if(parsedExpression)
16065 FreeIdentifier(id);
16067 exp->__anon1.list = MkListOne(parsedExpression);
16068 ApplyLocation(parsedExpression, &yylloc);
16069 ProcessExpressionType(exp);
16070 definedExpStackPos--;
16073 definedExpStackPos--;
16079 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
16085 struct GlobalData * data = (((void *)0));
16087 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16091 strcpy(name, thisNameSpace);
16092 strcat(name, "::");
16093 strcat(name, id->string);
16094 data = FindGlobalData(name);
16097 data = FindGlobalData(id->string);
16100 DeclareGlobalData(curExternal, data);
16101 exp->expType = data->dataType;
16103 data->dataType->refCount++;
16104 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16105 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
16106 FreeSpecifier(id->_class);
16107 id->_class = (((void *)0));
16112 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
16114 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16118 strcpy(name, thisNameSpace);
16119 strcat(name, "::");
16120 strcat(name, id->string);
16121 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
16124 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
16129 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16130 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
16132 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
16133 strcpy(name, "__ecereFunction_");
16134 FullClassNameCat(name, id->string, 0);
16135 if(DeclareFunction(curExternal, function, name))
16137 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16138 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
16140 exp->expType = function->dataType;
16141 if(function->dataType)
16142 function->dataType->refCount++;
16143 FreeSpecifier(id->_class);
16144 id->_class = (((void *)0));
16156 if(!exp->__anon1.instance->_class)
16158 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
16160 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
16163 ProcessInstantiationType(exp->__anon1.instance);
16164 exp->isConstant = exp->__anon1.instance->isConstant;
16165 if(exp->__anon1.instance->_class)
16167 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
16175 char * constant = exp->__anon1.__anon1.constant;
16176 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
16178 exp->expType = type;
16179 if(constant[0] == '\'')
16181 if((int)((unsigned char *)constant)[1] > 127)
16184 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
16188 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
16189 exp->__anon1.__anon1.constant = PrintUInt(ch);
16191 type->__anon1._class = FindClass("unichar");
16192 type->isSigned = 0;
16197 type->isSigned = 1;
16202 char * dot = strchr(constant, '.');
16203 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
16208 exponent = strchr(constant, 'p');
16210 exponent = strchr(constant, 'P');
16214 exponent = strchr(constant, 'e');
16216 exponent = strchr(constant, 'E');
16218 if(dot || exponent)
16220 if(strchr(constant, 'f') || strchr(constant, 'F'))
16224 type->isSigned = 1;
16228 unsigned int isSigned = constant[0] == '-';
16229 char * endP = (((void *)0));
16230 long long i64 = strtoll(constant, &endP, 0);
16231 uint64 ui64 = strtoull(constant, &endP, 0);
16232 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16233 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16237 if(i64 < (((int)0x80000000)))
16242 if(ui64 > (((int)0x7fffffff)))
16244 if(ui64 > (0xffffffff))
16247 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16251 else if(constant[0] != '0' || !constant[1])
16256 type->kind = is64Bit ? 4 : 3;
16257 type->isSigned = isSigned;
16260 exp->isConstant = 1;
16261 if(exp->destType && exp->destType->kind == 7)
16263 else if(exp->destType && exp->destType->kind == 6)
16265 else if(exp->destType && exp->destType->kind == 4)
16272 exp->isConstant = 1;
16273 exp->expType = __extension__ ({
16274 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16276 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16277 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16279 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16280 }), __ecereInstance2;
16286 ProcessExpressionType(exp->__anon1._new.size);
16287 exp->expType = __extension__ ({
16288 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16290 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16292 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16296 ProcessExpressionType(exp->__anon1._renew.size);
16297 ProcessExpressionType(exp->__anon1._renew.exp);
16298 exp->expType = __extension__ ({
16299 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16301 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16303 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16307 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16308 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16309 unsigned int useDestType = 0, useSideType = 0;
16310 struct Location oldyylloc = yylloc;
16311 unsigned int useSideUnit = 0;
16312 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16313 unsigned int powerOp = 0, relationOp = 0;
16314 struct __ecereNameSpace__ecere__com__Class * c1 = (((void *)0)), * c2 = (((void *)0));
16315 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16317 switch(exp->__anon1.op.op)
16367 if(exp->__anon1.op.op == '/')
16372 if(exp->__anon1.op.exp1)
16376 if(exp->__anon1.op.op == '*')
16381 if(exp->__anon1.op.op == '&')
16383 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16385 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16386 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16388 if(symbol && symbol->isIterator == 2)
16391 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16392 exp->__anon1.member.member = MkIdentifier("key");
16393 exp->expType = (((void *)0));
16394 exp->__anon1.op.exp2->expType = symbol->type;
16395 symbol->type->refCount++;
16396 ProcessExpressionType(exp);
16402 if(exp->__anon1.op.exp1)
16404 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16406 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16408 if(exp->__anon1.op.exp1->destType)
16409 FreeType(exp->__anon1.op.exp1->destType);
16410 exp->__anon1.op.exp1->destType = exp->destType;
16411 exp->__anon1.op.exp1->opDestType = 1;
16413 exp->destType->refCount++;
16417 if(exp->__anon1.op.exp1->destType)
16418 FreeType(exp->__anon1.op.exp1->destType);
16419 exp->__anon1.op.exp1->destType = dummy;
16422 exp->__anon1.op.exp1->opDestType = 1;
16424 exp->__anon1.op.exp1->usedInComparison = 1;
16426 if(exp->__anon1.op.op == '+' || exp->__anon1.op.op == '-')
16428 if(exp->opDestType)
16429 exp->__anon1.op.exp1->parentOpDestType = 1;
16430 if(exp->usedInComparison)
16431 exp->__anon1.op.exp1->usedInComparison = 1;
16433 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16434 exp->__anon1.op.exp1->destType->count++;
16435 ProcessExpressionType(exp->__anon1.op.exp1);
16436 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16437 exp->__anon1.op.exp1->destType->count--;
16438 exp->__anon1.op.exp1->opDestType = 0;
16439 exp->__anon1.op.exp1->usedInComparison = 0;
16440 if(!exp->__anon1.op.exp2 && (exp->__anon1.op.op == INC_OP || exp->__anon1.op.op == DEC_OP) && exp->__anon1.op.exp1->expType && exp->__anon1.op.exp1->expType->kind == 8 && exp->__anon1.op.exp1->expType->__anon1._class && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp1->expType->__anon1._class->__anon1.registered->type == 3)
16442 exp->__anon1.op.exp2 = MkExpConstant("1");
16443 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16446 if(exp->__anon1.op.exp1->destType == dummy)
16449 exp->__anon1.op.exp1->destType = (((void *)0));
16451 if(exp->__anon1.op.exp2)
16453 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16455 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
16457 FreeType(exp->__anon1.op.exp1->expType);
16458 exp->__anon1.op.exp1->expType = type;
16461 type1 = exp->__anon1.op.exp1->expType;
16463 if(exp->__anon1.op.exp2)
16465 char expString[10240];
16467 expString[0] = '\0';
16468 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16470 if(exp->__anon1.op.exp1)
16472 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16473 if(exp->__anon1.op.exp1->expType)
16474 exp->__anon1.op.exp1->expType->refCount++;
16478 exp->__anon1.op.exp2->destType = exp->destType;
16479 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16480 exp->__anon1.op.exp2->opDestType = 1;
16482 exp->destType->refCount++;
16486 exp->expType = type1;
16491 PrintExpression(exp->__anon1.op.exp2, expString);
16492 if(type1 && type1->kind == 13)
16494 if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN || exp->__anon1.op.op == AND_ASSIGN || exp->__anon1.op.op == OR_ASSIGN)
16495 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16496 else if(exp->__anon1.op.op == '=')
16498 if(exp->__anon1.op.exp2->destType)
16499 FreeType(exp->__anon1.op.exp2->destType);
16500 exp->__anon1.op.exp2->destType = type1;
16507 if(exp->__anon1.op.op == MUL_ASSIGN || exp->__anon1.op.op == DIV_ASSIGN || exp->__anon1.op.op == MOD_ASSIGN || exp->__anon1.op.op == LEFT_ASSIGN || exp->__anon1.op.op == RIGHT_ASSIGN)
16511 if(exp->__anon1.op.exp2->destType)
16512 FreeType(exp->__anon1.op.exp2->destType);
16513 exp->__anon1.op.exp2->destType = type1;
16520 exp->expType = type1;
16522 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16524 if(exp->__anon1.op.exp2->destType)
16525 FreeType(exp->__anon1.op.exp2->destType);
16526 exp->__anon1.op.exp2->destType = exp->destType;
16527 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16528 exp->__anon1.op.exp2->opDestType = 1;
16530 exp->destType->refCount++;
16534 if(exp->__anon1.op.exp2->destType)
16535 FreeType(exp->__anon1.op.exp2->destType);
16536 exp->__anon1.op.exp2->destType = dummy;
16539 exp->__anon1.op.exp2->opDestType = 1;
16541 exp->__anon1.op.exp2->usedInComparison = 1;
16543 if(type1 && boolResult && useSideType && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && (type1->__anon1._class->__anon1.registered->type == 2 || type1->__anon1._class->__anon1.registered->type == 4))
16545 FreeType(exp->__anon1.op.exp2->destType);
16546 exp->__anon1.op.exp2->destType = type1;
16549 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16550 exp->__anon1.op.exp2->destType->count++;
16551 if(exp->__anon1.op.op == SIZEOF)
16553 struct Expression * e = exp->__anon1.op.exp2;
16555 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16557 if(e->type == 5 || e->type == 32 || e->type == 23)
16560 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16562 e = (*e->__anon1.list).last;
16565 if(e->type == 11 && e->__anon1.cast.exp)
16566 e->__anon1.cast.exp->needCast = 1;
16568 if(exp->__anon1.op.op == '+' || exp->__anon1.op.op == '-')
16570 if(exp->opDestType)
16571 exp->__anon1.op.exp2->parentOpDestType = 1;
16572 if(exp->usedInComparison)
16573 exp->__anon1.op.exp2->usedInComparison = 1;
16575 ProcessExpressionType(exp->__anon1.op.exp2);
16576 exp->__anon1.op.exp2->opDestType = 0;
16577 exp->__anon1.op.exp2->usedInComparison = 0;
16578 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16579 exp->__anon1.op.exp2->destType->count--;
16580 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16582 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16584 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
16586 FreeType(exp->__anon1.op.exp2->expType);
16587 exp->__anon1.op.exp2->expType = type;
16590 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16592 if(exp->__anon1.op.exp2->expType->kind == 23 || exp->__anon1.op.exp2->expType->kind == 22 || exp->__anon1.op.exp2->expType->kind == 4 || exp->__anon1.op.exp2->expType->kind == 3 || exp->__anon1.op.exp2->expType->kind == 2 || exp->__anon1.op.exp2->expType->kind == 1)
16594 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16595 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16597 else if(exp->__anon1.op.exp2->expType->kind == 13 || exp->__anon1.op.exp2->expType->kind == 12 || exp->__anon1.op.exp2->expType->kind == 11 || exp->__anon1.op.exp2->expType->kind == 16 || (type1->__anon1.type->kind == 0 && exp->__anon1.op.exp2->expType->kind == 8 && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && (exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 0 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1 || exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 5)))
16599 if(exp->__anon1.op.op == ADD_ASSIGN)
16600 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16602 else if((exp->__anon1.op.exp2->expType->kind == 8 && type1->kind == 13 && type1->__anon1.type->kind == 8 && type1->__anon1.type->__anon1._class == exp->__anon1.op.exp2->expType->__anon1._class && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered && exp->__anon1.op.exp2->expType->__anon1._class->__anon1.registered->type == 1))
16604 if(exp->__anon1.op.op == ADD_ASSIGN)
16605 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16607 else if(inCompiler)
16609 char type1String[1024];
16610 char type2String[1024];
16612 type1String[0] = '\0';
16613 type2String[0] = '\0';
16614 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16615 PrintType(type1, type2String, 0, 1);
16616 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16617 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16620 if(exp->__anon1.op.exp2->destType == dummy)
16623 exp->__anon1.op.exp2->destType = (((void *)0));
16625 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16627 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16628 type2->refCount = 1;
16629 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16630 type2->isSigned = 1;
16632 else if(exp->__anon1.op.op == '~' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && (!exp->__anon1.op.exp2->expType->isSigned || exp->__anon1.op.exp2->expType->kind != 3))
16634 type2 = __extension__ ({
16635 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16637 __ecereInstance1->kind = 3, __ecereInstance1;
16639 type2->refCount = 1;
16640 type2->isSigned = 1;
16644 type2 = exp->__anon1.op.exp2->expType;
16649 c1 = type1 && type1->kind == 8 && type1->__anon1._class ? type1->__anon1._class->__anon1.registered : (((void *)0));
16650 c2 = type2 && type2->kind == 8 && type2->__anon1._class ? type2->__anon1._class->__anon1.registered : (((void *)0));
16651 if(relationOp && ((exp->__anon1.op.exp1 && exp->__anon1.op.exp1->ambiguousUnits && (!c2 || c2->type != 3)) || (exp->__anon1.op.exp2 && exp->__anon1.op.exp2->ambiguousUnits && (!c1 || c1->type != 3))))
16652 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "ambiguous units in relational operation\n", (((void *)0))));
16653 if(!relationOp && ((exp->__anon1.op.exp1 && exp->__anon1.op.exp1->ambiguousUnits) || (exp->__anon1.op.exp2 && exp->__anon1.op.exp2->ambiguousUnits)) && (!powerOp || !c1 || c1->type != 3 || !c2 || c2->type != 3 || !RelatedUnits(c1, c2)))
16655 if(exp->opDestType || exp->usedInComparison)
16656 exp->ambiguousUnits = 1;
16658 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "ambiguous units\n", (((void *)0))));
16661 if(exp->__anon1.op.op == SIZEOF)
16663 exp->expType = __extension__ ({
16664 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16666 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16668 exp->isConstant = 1;
16670 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16672 exp->expType = Dereference(type2);
16673 if(type2 && type2->kind == 8)
16674 notByReference = 1;
16676 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16677 exp->expType = Reference(type2);
16678 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16680 if(exp->__anon1.op.exp1->expType)
16682 exp->expType = exp->__anon1.op.exp1->expType;
16683 exp->expType->refCount++;
16688 if(c1 && !c1->dataType)
16689 c1->dataType = ProcessTypeString(c1->dataTypeString, 0);
16690 if(c2 && !c2->dataType)
16691 c2->dataType = ProcessTypeString(c2->dataTypeString, 0);
16694 if(exp->__anon1.op.exp1)
16696 if(exp->__anon1.op.exp1->destType)
16697 FreeType(exp->__anon1.op.exp1->destType);
16698 exp->__anon1.op.exp1->destType = MkClassType("bool");
16699 exp->__anon1.op.exp1->destType->truth = 1;
16700 if(!exp->__anon1.op.exp1->expType)
16701 ProcessExpressionType(exp->__anon1.op.exp1);
16703 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16704 FreeType(exp->__anon1.op.exp1->expType);
16705 exp->__anon1.op.exp1->expType = MkClassType("bool");
16706 exp->__anon1.op.exp1->expType->truth = 1;
16708 if(exp->__anon1.op.exp2)
16710 if(exp->__anon1.op.exp2->destType)
16711 FreeType(exp->__anon1.op.exp2->destType);
16712 exp->__anon1.op.exp2->destType = MkClassType("bool");
16713 exp->__anon1.op.exp2->destType->truth = 1;
16714 if(!exp->__anon1.op.exp2->expType)
16715 ProcessExpressionType(exp->__anon1.op.exp2);
16717 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16718 FreeType(exp->__anon1.op.exp2->expType);
16719 exp->__anon1.op.exp2->expType = MkClassType("bool");
16720 exp->__anon1.op.exp2->expType->truth = 1;
16723 else if(powerOp && exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && ((c1 && c1->type == 3) || (c2 && c2->type == 3)))
16725 if(c1 && c1->type == 3 && c2 && c2->type == 3)
16727 if(c1->dataType->kind == 7)
16728 exp->expType = c1->dataType;
16729 else if(c2->dataType->kind == 7)
16730 exp->expType = c2->dataType;
16731 else if(c1->dataType->kind == 6)
16732 exp->expType = c1->dataType;
16733 else if(c2->dataType->kind == 6)
16734 exp->expType = c2->dataType;
16736 exp->expType = c1->dataType;
16738 else if((c1 && c1->type == 3) || exp->__anon1.op.op == '/')
16739 exp->expType = type1;
16741 exp->expType = type2;
16743 exp->expType->refCount++;
16745 else if(exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && ((useSideType) || ((!type1 || type1->kind != 8 || !strcmp(type1->__anon1._class->string, "String")) && (!type2 || type2->kind != 8 || !strcmp(type2->__anon1._class->string, "String")))))
16747 if(type1 && type2 && ((type1->kind == 8 && type1->__anon1._class && strcmp(type1->__anon1._class->string, "String")) == (type2->kind == 8 && type2->__anon1._class && strcmp(type2->__anon1._class->string, "String"))))
16749 if(exp->__anon1.op.op == '-' && ((c1 && c1->type == 4) || (c2 && c2->type == 4)))
16751 struct Type * intType = ProcessTypeString((c1 && c1->dataType->kind == 4) || (c2 && c2->dataType->kind == 4) ? "int64" : "int", 0);
16753 if(exp->__anon1.op.exp1->destType)
16754 FreeType(exp->__anon1.op.exp1->destType);
16755 if(exp->__anon1.op.exp2->destType)
16756 FreeType(exp->__anon1.op.exp2->destType);
16757 exp->__anon1.op.exp1->destType = intType;
16758 exp->__anon1.op.exp2->destType = intType;
16759 intType->refCount++;
16763 if(exp->__anon1.op.exp2->destType)
16764 FreeType(exp->__anon1.op.exp2->destType);
16765 exp->__anon1.op.exp2->destType = type1;
16767 if(exp->__anon1.op.exp1->destType)
16768 FreeType(exp->__anon1.op.exp1->destType);
16769 exp->__anon1.op.exp1->destType = type2;
16772 if(!boolResult && !exp->opDestType && (!exp->destType || exp->destType->kind != 8) && c1 && c1->type == 3 && c2 && c2->type == 3 && c1 != c2)
16774 if(exp->usedInComparison || exp->parentOpDestType)
16775 exp->ambiguousUnits = 1;
16777 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "operating on %s and %s with an untyped result, assuming %s\n", (((void *)0))), type1->__anon1._class->string, type2->__anon1._class->string, type1->__anon1._class->string);
16779 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16781 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16785 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16787 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16788 ProcessExpressionType(exp->__anon1.op.exp1);
16789 if(type2->kind != 13)
16791 ProcessExpressionType(classExp);
16792 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16793 if(!exp->__anon1.op.exp2->expType)
16797 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16798 c2 = (((void *)0));
16801 ProcessExpressionType(exp->__anon1.op.exp2);
16805 if(!boolResult && ((type1->kind == 13 || type1->kind == 12 || (type1->kind == 8 && !strcmp(type1->__anon1._class->string, "String"))) && (type2->kind == 23 || type2->kind == 22 || type2->kind == 4 || type2->kind == 3 || type2->kind == 2 || type2->kind == 1)))
16807 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16808 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16809 exp->expType = type1;
16813 else if(!boolResult && ((type2->kind == 13 || type2->kind == 12 || (type2->kind == 8 && !strcmp(type2->__anon1._class->string, "String"))) && (type1->kind == 23 || type1->kind == 22 || type1->kind == 4 || type1->kind == 3 || type1->kind == 2 || type1->kind == 1)))
16815 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16816 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16817 exp->expType = type2;
16821 else if((type1->kind == 13 && type2->kind != 13 && type2->kind != 12 && type2->kind != 11 && type2->kind != 16 && type2->kind != 8 && type2->kind != 19) || (type2->kind == 13 && type1->kind != 13 && type1->kind != 12 && type1->kind != 11 && type1->kind != 16 && type1->kind != 8 && type1->kind != 19))
16823 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16827 unsigned int success = 0;
16829 if(type1->kind == 13 && type2->kind == 13)
16831 if(exp->__anon1.op.op == '+')
16832 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16833 else if(exp->__anon1.op.op == '-')
16835 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16837 exp->expType = __extension__ ({
16838 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16840 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16843 if(type1->__anon1.type->kind == 20)
16845 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16849 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16851 ProcessExpressionType(classExp);
16853 exp->__anon1.list = MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp1))), exp->__anon1.op.op, MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp2)))))), '/', MkExpMember(classExp, MkIdentifier("typeSize"))));
16854 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16862 if(!success && exp->__anon1.op.exp1->type == 2)
16864 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16867 FreeType(exp->expType);
16868 exp->expType = exp->__anon1.op.exp1->destType;
16869 if(exp->__anon1.op.exp1->destType)
16870 exp->__anon1.op.exp1->destType->refCount++;
16873 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16876 FreeType(exp->expType);
16877 exp->expType = exp->__anon1.op.exp2->destType;
16878 if(exp->__anon1.op.exp2->destType)
16879 exp->__anon1.op.exp2->destType->refCount++;
16885 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16888 FreeType(exp->expType);
16889 exp->expType = exp->__anon1.op.exp2->destType;
16890 if(exp->__anon1.op.exp2->destType)
16891 exp->__anon1.op.exp2->destType->refCount++;
16894 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16897 FreeType(exp->expType);
16898 exp->expType = exp->__anon1.op.exp1->destType;
16899 if(exp->__anon1.op.exp1->destType)
16900 exp->__anon1.op.exp1->destType->refCount++;
16906 char expString1[10240];
16907 char expString2[10240];
16911 expString1[0] = '\0';
16912 expString2[0] = '\0';
16917 PrintExpression(exp->__anon1.op.exp1, expString1);
16918 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16919 PrintExpression(exp->__anon1.op.exp2, expString2);
16920 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16921 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16922 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16924 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16928 else if(!boolResult && !useSideUnit && c2 && c2->type == 3 && type1 && type1->kind != 8)
16930 if(exp->__anon1.op.exp1->destType)
16931 FreeType(exp->__anon1.op.exp1->destType);
16932 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16933 if(type2->__anon1._class->__anon1.registered->dataType)
16934 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16935 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16936 exp->expType = type2;
16940 else if(!boolResult && !useSideUnit && c1 && c1->type == 3 && type2 && type2->kind != 8)
16942 if(exp->__anon1.op.exp2->destType)
16943 FreeType(exp->__anon1.op.exp2->destType);
16944 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16945 if(type1->__anon1._class->__anon1.registered->dataType)
16946 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16947 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16948 exp->expType = type1;
16954 unsigned int valid = 0;
16956 if(!boolResult && useSideUnit && c1 && c1->type == 3 && type2 && type2->kind != 8)
16958 if(exp->__anon1.op.exp2->destType)
16959 FreeType(exp->__anon1.op.exp2->destType);
16960 exp->__anon1.op.exp2->destType = c1->dataType;
16961 exp->__anon1.op.exp2->destType->refCount++;
16962 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16965 type2 = exp->__anon1.op.exp2->destType;
16966 c2 = type2 && type2->kind == 8 && type2->__anon1._class ? type2->__anon1._class->__anon1.registered : (((void *)0));
16969 exp->expType = type2;
16972 if(!boolResult && useSideUnit && c2 && c2->type == 3 && type1 && type1->kind != 8)
16974 if(exp->__anon1.op.exp1->destType)
16975 FreeType(exp->__anon1.op.exp1->destType);
16976 exp->__anon1.op.exp1->destType = c2->dataType;
16977 exp->__anon1.op.exp1->destType->refCount++;
16978 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16979 type1 = exp->__anon1.op.exp1->destType;
16980 c1 = type1 && type1->kind == 8 && type1->__anon1._class ? type1->__anon1._class->__anon1.registered : (((void *)0));
16981 exp->expType = type1;
16984 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16986 unsigned int op1IsEnum = c1 && c1->type == 4;
16987 unsigned int op2IsEnum = c2 && c2->type == 4;
16989 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16991 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16993 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16996 FreeType(exp->expType);
16997 exp->expType = exp->__anon1.op.exp2->expType;
16998 if(exp->__anon1.op.exp2->expType)
16999 exp->__anon1.op.exp2->expType->refCount++;
17003 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
17005 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
17008 FreeType(exp->expType);
17009 exp->expType = exp->__anon1.op.exp1->expType;
17010 if(exp->__anon1.op.exp1->expType)
17011 exp->__anon1.op.exp1->expType->refCount++;
17018 if(op1IsEnum && exp->__anon1.op.exp2->expType)
17020 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
17023 FreeType(exp->expType);
17024 exp->expType = exp->__anon1.op.exp1->expType;
17025 if(exp->__anon1.op.exp1->expType)
17026 exp->__anon1.op.exp1->expType->refCount++;
17030 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
17032 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
17035 FreeType(exp->expType);
17036 exp->expType = exp->__anon1.op.exp2->expType;
17037 if(exp->__anon1.op.exp2->expType)
17038 exp->__anon1.op.exp2->expType->refCount++;
17046 if(c2 && c2->type == 3 && (!c1 || c1->type != 3))
17048 if(exp->__anon1.op.exp1->destType)
17049 FreeType(exp->__anon1.op.exp1->destType);
17050 exp->__anon1.op.exp1->destType = type2;
17052 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17055 FreeType(exp->expType);
17056 exp->expType = exp->__anon1.op.exp1->destType;
17057 if(exp->__anon1.op.exp1->destType)
17058 exp->__anon1.op.exp1->destType->refCount++;
17063 if(exp->__anon1.op.exp2->destType)
17064 FreeType(exp->__anon1.op.exp2->destType);
17065 exp->__anon1.op.exp2->destType = type1;
17067 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
17070 FreeType(exp->expType);
17071 exp->expType = exp->__anon1.op.exp2->destType;
17072 if(exp->__anon1.op.exp2->destType)
17073 exp->__anon1.op.exp2->destType->refCount++;
17075 else if(type1 && type2)
17077 char expString1[10240];
17078 char expString2[10240];
17079 char type1String[1024];
17080 char type2String[1024];
17082 expString1[0] = '\0';
17083 expString2[0] = '\0';
17084 type1String[0] = '\0';
17085 type2String[0] = '\0';
17088 PrintExpression(exp->__anon1.op.exp1, expString1);
17089 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
17090 PrintExpression(exp->__anon1.op.exp2, expString2);
17091 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
17092 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
17093 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
17095 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
17096 if(c1 && c1->type == 4)
17098 exp->expType = exp->__anon1.op.exp1->expType;
17099 if(exp->__anon1.op.exp1->expType)
17100 exp->__anon1.op.exp1->expType->refCount++;
17102 else if(c2 && c2->type == 4)
17104 exp->expType = exp->__anon1.op.exp2->expType;
17105 if(exp->__anon1.op.exp2->expType)
17106 exp->__anon1.op.exp2->expType->refCount++;
17114 if(c2 && c2->type == 4)
17116 struct Type * oldType = exp->__anon1.op.exp1->expType;
17118 exp->__anon1.op.exp1->expType = (((void *)0));
17119 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17122 exp->__anon1.op.exp1->expType = oldType;
17124 if(exp->__anon1.op.exp1->destType)
17125 FreeType(exp->__anon1.op.exp1->destType);
17126 exp->__anon1.op.exp1->destType = type2;
17128 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17131 FreeType(exp->expType);
17132 exp->expType = exp->__anon1.op.exp1->destType;
17133 if(exp->__anon1.op.exp1->destType)
17134 exp->__anon1.op.exp1->destType->refCount++;
17138 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
17140 if(type1 && c2 && c2->type == 3)
17142 if(exp->__anon1.op.exp1->destType)
17143 FreeType(exp->__anon1.op.exp1->destType);
17144 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
17145 if(type2->__anon1._class->__anon1.registered->dataType)
17146 type2->__anon1._class->__anon1.registered->dataType->refCount++;
17147 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
17149 if(exp->__anon1.op.op == '!')
17151 exp->expType = MkClassType("bool");
17152 exp->expType->truth = 1;
17156 exp->expType = type2;
17161 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
17163 if(c2 && c2->type == 3)
17165 if(exp->__anon1.op.exp2->destType)
17166 FreeType(exp->__anon1.op.exp2->destType);
17167 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
17168 if(type1->__anon1._class->__anon1.registered->dataType)
17169 type1->__anon1._class->__anon1.registered->dataType->refCount++;
17170 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
17172 exp->expType = type1;
17178 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
17180 char expString[10000];
17182 expString[0] = '\0';
17185 PrintExpression(exp->__anon1.op.exp1, expString);
17186 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17189 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17191 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
17193 char expString[10240];
17195 expString[0] = '\0';
17198 PrintExpression(exp->__anon1.op.exp2, expString);
17199 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17202 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17206 FreeType(exp->expType);
17207 exp->expType = MkClassType("bool");
17208 exp->expType->truth = 1;
17210 if(exp->__anon1.op.op != SIZEOF)
17211 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
17212 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
17214 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
17216 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
17217 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
17218 yylloc = oldyylloc;
17227 struct Expression * e;
17229 exp->isConstant = 1;
17230 for(e = (*exp->__anon1.list).first; e; e = e->next)
17234 FreeType(e->destType);
17235 e->opDestType = exp->opDestType;
17236 e->usedInComparison = exp->usedInComparison;
17237 e->parentOpDestType = exp->parentOpDestType;
17238 e->destType = exp->destType;
17241 exp->destType->refCount++;
17244 ProcessExpressionType(e);
17245 if(e->ambiguousUnits)
17246 exp->ambiguousUnits = 1;
17247 if(!exp->expType && !e->next)
17249 exp->expType = e->expType;
17251 e->expType->refCount++;
17252 exp->needCast = e->needCast;
17255 exp->isConstant = 0;
17257 e = (*exp->__anon1.list).first;
17258 if(!e->next && e->type == 8)
17260 struct Expression * next = exp->next, * prev = exp->prev;
17262 FreeType(exp->expType);
17263 FreeType(exp->destType);
17264 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17268 ((e ? __extension__ ({
17269 void * __ecerePtrToDelete = (e);
17271 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
17273 ProcessExpressionType(exp);
17279 struct Expression * e;
17281 exp->isConstant = 1;
17282 ProcessExpressionType(exp->__anon1.index.exp);
17283 if(!exp->__anon1.index.exp->isConstant)
17284 exp->isConstant = 0;
17285 if(exp->__anon1.index.exp->expType)
17287 struct Type * source = exp->__anon1.index.exp->expType;
17289 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17291 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17292 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17294 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17296 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17297 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17299 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17301 if(type->kind == 8)
17302 type->constant = 1;
17303 else if(type->kind == 13)
17305 struct Type * t = type;
17307 while(t->kind == 13)
17308 t = t->__anon1.type;
17311 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17316 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17318 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17321 FreeType(e->destType);
17322 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17324 ProcessExpressionType(e);
17329 exp->isConstant = 0;
17332 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17334 DeclareType(curExternal, exp->expType, 1, 0);
17339 struct Expression * e;
17340 struct Type * functionType;
17341 struct Type * methodType = (((void *)0));
17347 PrintExpression(exp->__anon1.call.exp, name);
17348 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17350 PrintExpression(exp->__anon1.call.exp, name);
17353 if(exp->__anon1.call.exp->type == 0)
17355 struct Expression * idExp = exp->__anon1.call.exp;
17356 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17358 if(!strcmp(id->string, "__builtin_frame_address"))
17360 exp->expType = ProcessTypeString("void *", 1);
17361 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17362 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17365 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17367 exp->expType = ProcessTypeString("int", 1);
17368 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17369 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17372 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17374 struct Expression * a = (((void *)0));
17375 struct Expression * b = (((void *)0));
17376 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17378 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17380 a = (*exp->__anon1.call.arguments).first;
17381 b = (*exp->__anon1.call.arguments).last;
17385 else if((*exp->__anon1.call.arguments).count == 1)
17387 a = (*exp->__anon1.call.arguments).first;
17392 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17393 idExp->__anon1.__anon1.identifier = (((void *)0));
17394 FreeExpContents(exp);
17395 ProcessExpressionType(a);
17397 ProcessExpressionType(b);
17399 exp->__anon1.list = MkList();
17400 if(a->expType && (!b || b->expType))
17402 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17406 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17407 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17408 struct Declaration * decl;
17409 char temp1[1024], temp2[1024];
17411 GetTypeSpecs(a->expType, specs);
17412 if(a && !a->isConstant && a->type != 0)
17414 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17415 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17416 tempExp1 = QMkExpId(temp1);
17417 tempExp1->expType = a->expType;
17419 a->expType->refCount++;
17420 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17422 if(b && !b->isConstant && b->type != 0)
17424 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17425 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17426 tempExp2 = QMkExpId(temp2);
17427 tempExp2->expType = b->expType;
17429 b->expType->refCount++;
17430 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17432 decl = MkDeclaration(specs, decls);
17433 if(!curCompound->__anon1.compound.declarations)
17434 curCompound->__anon1.compound.declarations = MkList();
17435 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17439 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17441 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17443 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17444 exp->expType = a->expType;
17446 a->expType->refCount++;
17448 else if(!strcmp(id->string, "Abs"))
17450 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17451 exp->expType = a->expType;
17453 a->expType->refCount++;
17455 else if(!strcmp(id->string, "Sgn"))
17457 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '!', CopyExpression(tempExp1)))), MkListOne(MkExpConstant("0")), MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpConstant("-1")), MkExpConstant("1"))))));
17458 exp->expType = ProcessTypeString("int", 0);
17460 FreeExpression(tempExp1);
17462 FreeExpression(tempExp2);
17463 FreeIdentifier(id);
17469 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17471 if(!exp->__anon1.call.exp->destType)
17473 exp->__anon1.call.exp->destType = dummy;
17476 ProcessExpressionType(exp->__anon1.call.exp);
17477 if(exp->__anon1.call.exp->destType == dummy)
17480 exp->__anon1.call.exp->destType = (((void *)0));
17484 functionType = exp->__anon1.call.exp->expType;
17485 if(functionType && functionType->kind == 16)
17487 methodType = functionType;
17488 functionType = methodType->__anon1.__anon3.method->dataType;
17489 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17491 char typeString[1024];
17493 typeString[0] = '\0';
17495 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17497 functionType->__anon1.__anon2.thisClass = (((void *)0));
17498 PrintType(functionType, typeString, 1, 1);
17499 functionType->__anon1.__anon2.thisClass = back;
17501 if(strstr(typeString, "thisclass"))
17503 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17504 struct Declarator * decl;
17507 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17509 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17510 if(thisClass != (exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass ? exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass : exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass))
17511 thisClassParams = 0;
17512 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17514 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17516 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17517 ProcessDeclarator(decl, 1);
17518 thisClass = backupThisClass;
17520 thisClassParams = 1;
17521 functionType = ProcessType(specs, decl);
17522 functionType->refCount = 0;
17523 FinishTemplatesContext(context);
17525 struct Type * p, * op;
17527 for(p = functionType->__anon1.__anon2.params.first, op = methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.params.first; p && op; p = p->next, op = op->next)
17530 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17533 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17535 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17538 FreeList(specs, (void *)(FreeSpecifier));
17539 FreeDeclarator(decl);
17543 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17545 struct Type * type = functionType->__anon1.type;
17547 if(!functionType->refCount)
17549 functionType->__anon1.type = (((void *)0));
17550 FreeType(functionType);
17552 functionType = type;
17554 if(functionType && functionType->kind != 11)
17556 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17558 else if(functionType)
17560 unsigned int emptyParams = 0, noParams = 0;
17561 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17562 struct Type * type = functionType->__anon1.__anon2.params.first;
17563 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17565 struct Location oldyylloc = yylloc;
17569 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17571 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17574 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17576 if(memberExp && memberExp->__anon1.member.exp && memberExp->__anon1.member.exp->expType && memberExp->__anon1.member.exp->expType->kind == 19 && memberExp->__anon1.member.exp->expType->__anon1._class)
17578 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17581 e->destType = type;
17583 type = functionType->__anon1.__anon2.params.first;
17586 type->refCount = 0;
17588 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17590 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17591 type->byReference = functionType->byReference;
17592 type->typedByReference = functionType->typedByReference;
17595 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17597 e->destType = type;
17599 type = functionType->__anon1.__anon2.params.first;
17602 type->refCount = 0;
17605 if(type && type->kind == 0)
17608 if(!type->refCount)
17610 type = (((void *)0));
17612 for(; e; e = e->next)
17614 if(!type && !emptyParams)
17617 if(methodType && methodType->__anon1.__anon3.methodClass)
17618 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
17620 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
17623 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17625 struct Type * templatedType = (((void *)0));
17626 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17627 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17630 if(_class && _class->templateArgs)
17632 struct __ecereNameSpace__ecere__com__Class * sClass;
17634 for(sClass = _class; sClass; sClass = sClass->base)
17636 if(sClass->templateClass)
17637 sClass = sClass->templateClass;
17639 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17641 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17643 struct __ecereNameSpace__ecere__com__Class * nextClass;
17645 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17647 if(nextClass->templateClass)
17648 nextClass = nextClass->templateClass;
17649 id += nextClass->templateParams.count;
17659 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17661 unsigned int constant = type->constant;
17662 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17665 struct Context * context = SetupTemplatesContext(_class);
17667 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17668 FinishTemplatesContext(context);
17670 if(templatedType->kind == 8 && constant)
17671 templatedType->constant = 1;
17672 else if(templatedType->kind == 13)
17674 struct Type * t = templatedType->__anon1.type;
17676 while(t->kind == 13)
17677 t = t->__anon1.type;
17679 t->constant = constant;
17681 e->destType = templatedType;
17684 templatedType->passAsTemplate = 1;
17689 e->destType = type;
17696 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17698 e->destType = type->prev;
17699 e->destType->refCount++;
17703 e->destType = type;
17708 if(type && type->kind != 14)
17710 struct Type * next = type->next;
17712 if(!type->refCount)
17717 if(type && type->kind != 14)
17719 if(methodType && methodType->__anon1.__anon3.methodClass)
17720 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
17722 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
17724 yylloc = oldyylloc;
17725 if(type && !type->refCount)
17730 functionType = __extension__ ({
17731 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17733 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17735 if(exp->__anon1.call.exp->type == 0)
17737 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17741 struct Symbol * symbol;
17742 struct Location oldyylloc = yylloc;
17744 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17745 if(strstr(string, "__builtin_") == string)
17749 functionType->__anon1.__anon2.returnType = exp->destType;
17750 exp->destType->refCount++;
17754 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17755 symbol = __extension__ ({
17756 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17758 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17760 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17761 if(strstr(symbol->string, "::"))
17762 globalContext->hasNameSpace = 1;
17763 yylloc = oldyylloc;
17766 else if(exp->__anon1.call.exp->type == 8)
17770 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17771 if(!functionType->__anon1.__anon2.returnType)
17773 functionType->__anon1.__anon2.returnType = __extension__ ({
17774 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17776 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17780 if(functionType && functionType->kind == 11)
17782 exp->expType = functionType->__anon1.__anon2.returnType;
17783 if(functionType->__anon1.__anon2.returnType)
17784 functionType->__anon1.__anon2.returnType->refCount++;
17785 if(!functionType->refCount)
17786 FreeType(functionType);
17788 if(exp->__anon1.call.arguments)
17790 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17791 ProcessExpressionType(e);
17797 struct Type * type;
17798 struct Location oldyylloc = yylloc;
17799 unsigned int thisPtr;
17800 struct Expression * checkExp = exp->__anon1.member.exp;
17804 if(checkExp->type == 11)
17805 checkExp = checkExp->__anon1.cast.exp;
17806 else if(checkExp->type == 5)
17807 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17811 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17812 exp->thisPtr = thisPtr;
17813 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17815 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17817 ProcessExpressionType(exp->__anon1.member.exp);
17818 if(exp->__anon1.member.exp->expType && exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 0)
17820 exp->isConstant = 0;
17823 exp->isConstant = exp->__anon1.member.exp->isConstant;
17824 type = exp->__anon1.member.exp->expType;
17826 if(type && (type->kind == 20))
17828 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17829 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17833 for(param = _class->templateParams.first; param; param = param->next)
17835 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17839 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17841 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17845 struct Expression * expMember = exp->__anon1.member.exp;
17846 struct Declarator * decl;
17847 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17848 char thisClassTypeString[1024];
17850 FreeIdentifier(exp->__anon1.member.member);
17851 ProcessExpressionType(argExp);
17853 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17857 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17858 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17861 strcpy(thisClassTypeString, _class->fullName);
17863 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17864 exp->expType = ProcessType(specs, decl);
17865 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17867 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17868 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17869 int paramCount = 0;
17870 int lastParam = -1;
17871 char templateString[1024];
17872 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17874 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17875 for(cClass = expClass; cClass; cClass = cClass->base)
17879 for(param = cClass->templateParams.first; param; param = param->next)
17882 struct __ecereNameSpace__ecere__com__Class * sClass;
17883 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17885 for(sClass = cClass->base; sClass; sClass = sClass->base)
17886 id += sClass->templateParams.count;
17887 arg = expClass->templateArgs[id];
17888 for(sClass = _class; sClass; sClass = sClass->base)
17890 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17892 struct __ecereNameSpace__ecere__com__Class * nextClass;
17894 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17895 p += nextClass->templateParams.count;
17896 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17898 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17900 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17902 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17903 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17910 char argument[256];
17912 argument[0] = '\0';
17913 switch(param->type)
17917 char expString[1024];
17918 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17919 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17920 struct Expression * exp;
17921 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17923 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17924 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17925 ProcessExpressionType(exp);
17926 ComputeExpression(exp);
17927 expString[0] = '\0';
17928 PrintExpression(exp, expString);
17929 strcat(argument, expString);
17930 FreeExpression(exp);
17935 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17940 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17942 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17943 strcat(argument, thisClassTypeString);
17945 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17953 strcat(templateString, ", ");
17954 if(lastParam != p - 1)
17956 strcat(templateString, param->name);
17957 strcat(templateString, " = ");
17959 strcat(templateString, argument);
17968 int len = strlen(templateString);
17970 if(templateString[len - 1] == '>')
17971 templateString[len++] = ' ';
17972 templateString[len++] = '>';
17973 templateString[len++] = '\0';
17976 struct Context * context = SetupTemplatesContext(_class);
17978 FreeType(exp->expType);
17979 exp->expType = ProcessTypeString(templateString, 0);
17980 FinishTemplatesContext(context);
17983 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17984 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17986 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpBrackets(MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), expMember))), '+', MkExpOp(MkExpMember(MkExpMember(argExp, MkIdentifier("member")), MkIdentifier("offset")), '+', MkExpMember(MkExpMember(MkExpMember(CopyExpression(argExp), MkIdentifier("member")), MkIdentifier("_class")), MkIdentifier("offset")))))))));
17989 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17991 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17994 if(type && (type->kind == 20))
17996 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 == 24 || type->kind == 22 || type->kind == 23 || type->kind == 6 || type->kind == 7 || (type->kind == 13 && type->__anon1.type->kind == 1)))
17998 struct Identifier * id = exp->__anon1.member.member;
17999 int typeKind = type->kind;
18000 struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
18002 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
18004 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
18009 if(typeKind == 3 || typeKind == 15)
18010 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
18013 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
18015 _class = type->__anon1._class->__anon1.registered;
18017 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
18019 _class = FindClass("char *")->__anon1.registered;
18021 else if(type->kind == 13)
18023 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
18024 FreeType(exp->expType);
18025 exp->expType = ProcessTypeString("uintptr", 0);
18026 exp->byReference = 1;
18030 char string[1024] = "";
18031 struct Symbol * classSym;
18033 PrintTypeNoConst(type, string, 0, 1);
18034 classSym = FindClass(string);
18036 _class = classSym->__anon1.registered;
18042 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
18043 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
18044 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18045 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
18046 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
18048 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
18049 exp->__anon1.member.memberType = 1;
18050 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
18051 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
18054 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
18056 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
18057 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
18059 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18061 member = (((void *)0));
18063 if(!member && !prop)
18064 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18065 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
18066 exp->__anon1.member.thisPtr = 1;
18070 unsigned int useMemberForNonConst = 0;
18074 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
18075 useMemberForNonConst = prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
18076 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
18077 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
18079 if((!prop || useMemberForNonConst) && !member)
18081 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
18084 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18085 useMemberForNonConst |= prop && exp->destType && ((exp->destType->kind == 8 && !exp->destType->constant) || ((exp->destType->kind == 13 || exp->destType->kind == 12) && exp->destType->__anon1.type && !exp->destType->__anon1.type->constant)) && !strncmp(prop->dataTypeString, "const ", 6);
18086 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
18087 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
18092 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
18093 prop = (((void *)0));
18095 member = (((void *)0));
18099 if(!prop && !member && !method)
18100 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
18101 if(!prop && !member && !method)
18105 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
18108 exp->__anon1.member.memberType = 5;
18109 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
18113 char structName[1024];
18114 struct Identifier * id = exp->__anon1.member.member;
18115 struct Expression * classExp = exp->__anon1.member.exp;
18118 FreeType(classExp->expType);
18119 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
18120 strcpy(structName, "__ecereClassData_");
18121 FullClassNameCat(structName, type->__anon1._class->string, 0);
18123 exp->__anon1.member.member = id;
18124 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(type->__anon1._class->string)), (((void *)0))), MkIdentifier("offsetClass"))))))));
18126 ProcessExpressionType(exp);
18132 struct Symbol * classSym = FindClass(id->string);
18136 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
18139 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
18143 if(exp->__anon1.member.exp->destType)
18144 FreeType(exp->__anon1.member.exp->destType);
18146 if(method && !method->_class->symbol)
18147 method->_class->symbol = FindClass(method->_class->fullName);
18148 if(prop && !prop->_class->symbol)
18149 prop->_class->symbol = FindClass(prop->_class->fullName);
18150 exp->__anon1.member.exp->destType = __extension__ ({
18151 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18153 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1->thisClassFrom = type ? type->thisClassFrom : (((void *)0)), __ecereInstance1;
18158 exp->__anon1.member.memberType = 1;
18159 if(!prop->dataType)
18160 ProcessPropertyType(prop);
18161 exp->expType = prop->dataType;
18162 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
18164 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18166 CopyTypeInto(type, exp->expType);
18167 type->refCount = 1;
18168 type->constant = 1;
18169 exp->expType = type;
18171 else if(prop->dataType)
18172 prop->dataType->refCount++;
18176 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
18178 FreeExpContents(exp);
18180 exp->__anon1.__anon1.identifier = MkIdentifier("class");
18181 ProcessExpressionType(exp);
18184 exp->__anon1.member.memberType = 3;
18185 DeclareStruct(curExternal, _class->fullName, 0, 1);
18186 if(member->_class != _class)
18187 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
18188 if(!member->dataType)
18190 struct Context * context = SetupTemplatesContext(_class);
18192 member->dataType = ProcessTypeString(member->dataTypeString, 0);
18193 FinishTemplatesContext(context);
18195 if(exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 2)
18196 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
18197 exp->expType = member->dataType;
18198 if(member->dataType)
18199 member->dataType->refCount++;
18201 else if(revConvert)
18203 exp->__anon1.member.memberType = 4;
18204 exp->expType = MkClassType(revConvert->_class->fullName);
18209 exp->__anon1.member.memberType = 2;
18211 if(!method->dataType)
18212 ProcessMethodType(method);
18213 exp->expType = __extension__ ({
18214 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18216 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
18218 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
18219 exp->expType->__anon1.__anon3.usedClass = _class;
18221 else if(!classProp)
18223 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
18225 FreeExpContents(exp);
18227 exp->__anon1.__anon1.identifier = MkIdentifier("class");
18228 FreeType(exp->expType);
18229 exp->expType = MkClassType("ecere::com::Class");
18232 yylloc = exp->__anon1.member.member->loc;
18233 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
18235 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
18237 if(_class && exp->expType)
18239 struct __ecereNameSpace__ecere__com__Class * tClass;
18241 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
18242 while(tClass && !tClass->templateClass)
18243 tClass = tClass->base;
18244 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
18247 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18248 struct __ecereNameSpace__ecere__com__Class * sClass;
18250 for(sClass = tClass; sClass; sClass = sClass->base)
18253 if(sClass->templateClass)
18254 sClass = sClass->templateClass;
18255 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18257 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
18259 for(sClass = sClass->base; sClass; sClass = sClass->base)
18260 id += sClass->templateParams.count;
18268 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
18270 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18271 struct Context * context = SetupTemplatesContext(tClass);
18272 unsigned int constant = exp->expType->constant;
18273 unsigned int passAsTemplate = 0;
18274 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
18275 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
18277 if(t && t->kind == 8 && t->__anon1._class)
18278 thisClassFrom = t->__anon1._class->__anon1.registered;
18280 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
18282 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
18283 FreeType(exp->expType);
18284 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18285 exp->expType->thisClassFrom = thisClassFrom;
18286 if(exp->expType->kind == 8 && constant)
18287 exp->expType->constant = 1;
18288 else if(exp->expType->kind == 13)
18290 struct Type * t = exp->expType->__anon1.type;
18292 while(t->kind == 13)
18293 t = t->__anon1.type;
18295 t->constant = constant;
18299 if(exp->expType->kind == 21)
18301 FreeType(exp->expType);
18302 exp->expType = ReplaceThisClassType(_class);
18305 exp->expType->passAsTemplate = 1;
18308 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18309 if(exp->destType->kind == 8 && constant)
18310 exp->destType->constant = 1;
18311 else if(exp->destType->kind == 13)
18313 struct Type * t = exp->destType->__anon1.type;
18315 while(t->kind == 13)
18316 t = t->__anon1.type;
18318 t->constant = constant;
18320 if(exp->destType->kind == 21)
18322 FreeType(exp->destType);
18323 exp->destType = ReplaceThisClassType(_class);
18327 FinishTemplatesContext(context);
18330 else if(tClass && exp->expType->kind == 13 && exp->expType->__anon1.type && exp->expType->__anon1.type->kind == 20 && exp->expType->__anon1.type->__anon1.templateParameter->type == 0)
18333 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18334 struct __ecereNameSpace__ecere__com__Class * sClass;
18336 for(sClass = tClass; sClass; sClass = sClass->base)
18339 if(sClass->templateClass)
18340 sClass = sClass->templateClass;
18341 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18343 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18345 for(sClass = sClass->base; sClass; sClass = sClass->base)
18346 id += sClass->templateParams.count;
18356 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18357 struct Context * context = SetupTemplatesContext(tClass);
18358 struct Type * basicType;
18360 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18363 if(basicType->kind == 21)
18365 FreeType(basicType);
18366 basicType = ReplaceThisClassType(_class);
18368 FreeType(exp->expType);
18369 exp->expType = __extension__ ({
18370 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18372 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18376 exp->destType = exp->expType;
18377 exp->destType->refCount++;
18380 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18381 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18382 struct Declarator * decl;
18384 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18387 exp->destType->refCount++;
18389 exp->expType->refCount++;
18391 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18392 exp->__anon1.cast.exp = newExp;
18395 FinishTemplatesContext(context);
18398 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18400 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18404 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18406 int paramCount = 0;
18407 int lastParam = -1;
18408 char templateString[1024];
18409 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18411 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18412 while(cClass != expClass)
18414 struct __ecereNameSpace__ecere__com__Class * sClass;
18416 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18419 for(param = cClass->templateParams.first; param; param = param->next)
18421 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18423 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18424 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18426 while(cClassCur != tClass && !paramCur)
18428 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18430 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18432 cClassCur = sClassCur;
18433 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18435 if(!strcmp(paramCur->name, param->name))
18442 if(paramCur && paramCur->type == 0)
18443 arg = tClass->templateArgs[cp];
18445 arg = expClass->templateArgs[p];
18447 char argument[256];
18449 argument[0] = '\0';
18450 switch(param->type)
18454 char expString[1024];
18455 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18456 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18457 struct Expression * exp;
18458 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18460 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18461 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18462 ProcessExpressionType(exp);
18463 ComputeExpression(exp);
18464 expString[0] = '\0';
18465 PrintExpression(exp, expString);
18466 strcat(argument, expString);
18467 FreeExpression(exp);
18472 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18477 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18478 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18485 strcat(templateString, ", ");
18486 if(lastParam != p - 1)
18488 strcat(templateString, param->name);
18489 strcat(templateString, " = ");
18491 strcat(templateString, argument);
18500 int len = strlen(templateString);
18502 if(templateString[len - 1] == '>')
18503 templateString[len++] = ' ';
18504 templateString[len++] = '>';
18505 templateString[len++] = '\0';
18507 FreeType(exp->expType);
18509 struct Context * context = SetupTemplatesContext(tClass);
18511 exp->expType = ProcessTypeString(templateString, 0);
18512 FinishTemplatesContext(context);
18519 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "undefined class %s\n", (((void *)0))), (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->string : (type->__anon1._class ? type->__anon1._class->string : (((void *)0)))) : "(null)");
18521 else if(type && (type->kind == 9 || type->kind == 10))
18523 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18527 exp->expType = memberType;
18529 memberType->refCount++;
18534 char expString[10240];
18536 expString[0] = '\0';
18539 PrintExpression(exp, expString);
18540 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18542 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18544 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18546 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18548 struct Identifier * id = exp->__anon1.member.member;
18549 struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
18553 FreeType(exp->expType);
18554 exp->expType = ReplaceThisClassType(_class);
18558 yylloc = oldyylloc;
18563 struct Type * destType = exp->destType;
18565 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18567 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18569 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18573 ProcessExpressionType(exp);
18580 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18582 if(classSym && classSym->__anon1.registered)
18584 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18587 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18590 DeclareStruct(curExternal, classSym->string, 0, 1);
18591 FreeSpecifier(exp->__anon1._class);
18592 FullClassNameCat(name, classSym->string, 0);
18596 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18600 struct Expression * e;
18603 if(b->structSize == b->offset)
18604 exp->__anon1.op.exp1 = MkExpConstant("0");
18606 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18607 exp->__anon1.op.op = '+';
18609 while(b->offset != 0)
18611 struct Symbol * sym;
18612 struct Expression * typeSize;
18615 sym = FindClass(b->fullName);
18617 DeclareStruct(curExternal, sym->string, 0, 1);
18618 FullClassNameCat(name, sym->string, 0);
18619 if(b->structSize == b->offset)
18620 typeSize = MkExpConstant("0");
18622 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18623 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18624 e = e->__anon1.op.exp2;
18630 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18632 FreeSpecifier(exp->__anon1._class);
18633 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18638 char className[1024];
18640 strcpy(className, "__ecereClass_");
18641 FullClassNameCat(className, classSym->string, 1);
18642 DeclareClass(curExternal, classSym, className);
18643 FreeExpContents(exp);
18645 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18646 exp->__anon1.member.member = MkIdentifier("structSize");
18650 exp->expType = __extension__ ({
18651 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18653 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18659 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18661 exp->expType = __extension__ ({
18662 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18664 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18666 exp->isConstant = 1;
18667 DeclareType(curExternal, type, 1, 0);
18673 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18676 FreeType(exp->__anon1.cast.exp->destType);
18677 exp->__anon1.cast.exp->destType = type;
18680 ProcessExpressionType(exp->__anon1.cast.exp);
18683 exp->expType = type;
18684 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18686 void * prev = exp->prev, * next = exp->next;
18687 struct Type * expType = exp->__anon1.cast.exp->destType;
18688 struct Expression * castExp = exp->__anon1.cast.exp;
18689 struct Type * destType = exp->destType;
18692 expType->refCount++;
18693 FreeType(exp->expType);
18694 FreeTypeName(exp->__anon1.cast.typeName);
18696 FreeType(exp->expType);
18697 FreeType(exp->destType);
18698 exp->expType = expType;
18699 exp->destType = destType;
18700 ((castExp ? __extension__ ({
18701 void * __ecerePtrToDelete = (castExp);
18703 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
18704 }) : 0), castExp = 0);
18710 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18716 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18718 exp->expType = type;
18723 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18725 ProcessExpressionType(exp->__anon1.vaArg.exp);
18726 exp->expType = type;
18731 struct Expression * e;
18732 struct Type * t = exp->destType;
18734 if(t && !exp->destType->casted)
18736 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18737 CopyTypeInto(t, exp->destType);
18742 exp->isConstant = 1;
18743 FreeType(exp->__anon1.cond.cond->destType);
18744 exp->__anon1.cond.cond->destType = MkClassType("bool");
18745 exp->__anon1.cond.cond->destType->truth = 1;
18746 ProcessExpressionType(exp->__anon1.cond.cond);
18747 if(!exp->__anon1.cond.cond->isConstant)
18748 exp->isConstant = 0;
18749 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18753 FreeType(e->destType);
18756 e->destType->refCount++;
18758 ProcessExpressionType(e);
18761 exp->expType = e->expType;
18763 e->expType->refCount++;
18766 exp->isConstant = 0;
18768 FreeType(exp->__anon1.cond.elseExp->destType);
18769 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18770 if(exp->__anon1.cond.elseExp->destType)
18771 exp->__anon1.cond.elseExp->destType->refCount++;
18772 ProcessExpressionType(exp->__anon1.cond.elseExp);
18773 if(!exp->__anon1.cond.elseExp->isConstant)
18774 exp->isConstant = 0;
18780 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18782 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18784 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18786 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18788 exp->destType->refCount++;
18790 ProcessStatement(exp->__anon1.compound);
18791 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18793 exp->expType->refCount++;
18799 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18801 if(spec && spec->type == 1)
18803 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18804 exp->expType->kind = 19;
18805 exp->byReference = 1;
18809 exp->expType = MkClassType("ecere::com::Class");
18810 exp->byReference = 1;
18816 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18820 struct Identifier * id = exp->__anon1.classData.id;
18821 char structName[1024];
18822 struct Expression * classExp;
18824 strcpy(structName, "__ecereClassData_");
18825 FullClassNameCat(structName, _class->fullName, 0);
18827 exp->__anon1.member.member = id;
18828 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18829 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18831 classExp = MkExpIdentifier(MkIdentifier("class"));
18832 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifier(CHAR)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpMember(classExp, MkIdentifier("data"))), '+', MkExpMember(MkExpClass(MkListOne(MkSpecifierName(_class->fullName)), (((void *)0))), MkIdentifier("offsetClass"))))))));
18833 ProcessExpressionType(exp);
18840 struct Type * type = (((void *)0));
18841 const char * typeString = (((void *)0));
18842 char typeStringBuf[1024];
18844 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(exp->destType->__anon1._class->__anon1.registered, containerClass))
18846 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18848 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18850 else if(exp->__anon1.list)
18852 struct Expression * e;
18854 for(e = (*exp->__anon1.list).first; e; e = e->next)
18856 ProcessExpressionType(e);
18866 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18870 e->expType = (((void *)0));
18871 e = (*exp->__anon1.list).first;
18872 ProcessExpressionType(e);
18875 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18877 FreeType(e->expType);
18878 e->expType = (((void *)0));
18880 type = (((void *)0));
18888 FreeType(e->expType);
18889 e->expType = (((void *)0));
18895 typeStringBuf[0] = '\0';
18896 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18897 typeString = typeStringBuf;
18899 type = (((void *)0));
18904 char templateString[1024];
18905 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18906 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18907 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18908 struct Expression * expExt;
18909 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18911 sprintf(templateString, "Container<%s>", typeString);
18912 if(exp->__anon1.list)
18914 struct Expression * e;
18916 type = ProcessTypeString(typeString, 0);
18917 while((e = (*exp->__anon1.list).first))
18919 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18920 e->destType = type;
18922 ProcessExpressionType(e);
18923 ListAdd(initializers, MkInitializerAssignment(e));
18926 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18928 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18929 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18930 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18931 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18932 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18933 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18934 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18935 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18936 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18937 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18938 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18940 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18942 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18943 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18944 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18945 exp->expType = ProcessTypeString(templateString, 0);
18947 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18948 ProcessExpressionType(expExt);
18952 exp->expType = ProcessTypeString("Container", 0);
18953 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18958 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18960 FreeType(exp->expType);
18961 exp->expType = ReplaceThisClassType(thisClass);
18963 if(exp->expType && (exp->expType->kind == 9 || exp->expType->kind == 10 || exp->expType->kind == 15) && !exp->expType->__anon1.__anon1.members.first && exp->expType->__anon1.__anon1.enumName)
18965 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18969 if(exp->expType->kind != 15)
18971 struct Type * member;
18972 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18974 FreeType(exp->expType);
18975 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18976 exp->expType->kind = symbol->type->kind;
18977 exp->expType->refCount++;
18978 exp->expType->__anon1.__anon1.enumName = enumName;
18979 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18980 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18981 member->refCount++;
18985 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18987 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18989 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__sys__NamedLink64)), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
18991 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18996 if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.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->destType->kind != 24)))
18998 exp->byReference = 1;
19001 if(exp->destType && (exp->destType->kind == 18))
19003 else if(exp->destType && !exp->destType->keepCast)
19005 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
19006 exp->needTemplateCast = 1;
19007 if(exp->destType->kind == 0)
19009 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
19011 unsigned int invalidCast = 0;
19013 if(inCompiler && exp->destType->count && exp->expType)
19015 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
19016 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
19018 if(c1 && c1->type != 1)
19019 c1 = (((void *)0));
19020 if(c2 && c2->type != 1)
19021 c2 = (((void *)0));
19022 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
19025 if(!exp->destType->count || unresolved || invalidCast)
19030 if(exp->destType->kind != 14)
19037 char expString[10240];
19039 expString[0] = '\0';
19040 PrintType(exp->destType, type2, 0, 1);
19043 PrintExpression(exp, expString);
19044 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19047 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
19048 else if(exp->type != 16)
19049 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
19054 char expString[10240];
19056 expString[0] = '\0';
19059 PrintExpression(exp, expString);
19060 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19063 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
19064 else if(exp->type != 16)
19065 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
19077 PrintType(exp->expType, type1, 0, 1);
19078 PrintType(exp->destType, type2, 0, 1);
19080 if(exp->destType->truth && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && !strcmp(exp->destType->__anon1._class->__anon1.registered->name, "bool") && exp->expType->kind != 0 && exp->expType->kind != 9 && exp->expType->kind != 10 && (exp->expType->kind != 8 || exp->expType->classObjectType || (exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type != 1)))
19084 struct Expression * nbExp = GetNonBracketsExp(exp);
19085 unsigned int skipWarning = 0;
19086 int kind = exp->destType->kind;
19088 if(nbExp->type == 12 && nbExp->destType && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
19090 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
19092 int op = nbExp->__anon1.op.op;
19093 struct Expression * nbExp1, * nbExp2;
19100 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19101 from = nbExp1->expType->promotedFrom;
19102 if(from == 1 || (kind == 2 && from == 2))
19107 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19108 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19109 from = nbExp1->expType->promotedFrom;
19110 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
19112 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
19114 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
19115 int s = from == 1 ? 8 : 16;
19117 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
19118 s = nbExp1->expType->bitMemberSize;
19119 if(nbExp->__anon1.op.op == RIGHT_OP)
19123 if(s <= (kind == 1 ? 8 : 16))
19128 if(!exp->destType->isSigned)
19130 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19131 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19132 from = nbExp2->expType->promotedFrom;
19133 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
19135 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
19137 if(n == (from == 1 ? 255 : 65535))
19146 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19147 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19148 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
19149 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
19150 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) && ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
19158 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19159 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19160 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
19161 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
19162 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) || ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
19170 char expString[10240];
19172 expString[0] = '\0';
19175 PrintExpression(exp, expString);
19176 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19178 if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") && !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") && !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") && !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
19181 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19183 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19188 FreeType(exp->expType);
19189 exp->destType->refCount++;
19190 exp->expType = exp->destType;
19196 else if(exp->destType && exp->destType->kind == 13 && exp->destType->__anon1.type && exp->destType->__anon1.type->kind == 11 && exp->expType && (exp->expType->kind == 11 || exp->expType->kind == 16))
19198 struct Expression * nbExp = GetNonBracketsExp(exp);
19200 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
19202 struct Expression * e = MoveExpContents(exp);
19204 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
19206 exp->__anon1.cast.exp->destType = exp->destType;
19208 exp->destType->refCount++;
19209 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
19213 else if(unresolved)
19215 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
19216 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s::%s\n", (((void *)0))), exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name, exp->__anon1.__anon1.identifier->string);
19217 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
19218 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
19220 else if(!exp->expType && exp->type != 16)
19222 char expString[10240];
19224 expString[0] = '\0';
19227 PrintExpression(exp, expString);
19228 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19230 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
19233 ApplyAnyObjectLogic(exp);
19234 if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.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->destType->kind != 24)))
19236 exp->byReference = 1;
19238 yylloc = oldyylloc;
19241 static void ProcessFunction(struct FunctionDefinition * function)
19243 struct Identifier * id = GetDeclId(function->declarator);
19244 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
19245 struct Type * type = symbol ? symbol->type : (((void *)0));
19246 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
19247 struct Context * oldTopContext = topContext;
19249 yylloc = function->loc;
19250 if(type && type->__anon1.__anon2.thisClass)
19252 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
19253 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
19254 char className[1024];
19255 char structName[1024];
19256 struct Declarator * funcDecl;
19257 struct Symbol * thisSymbol;
19258 unsigned int typedObject = 0;
19260 if(_class && !_class->base)
19262 _class = currentClass;
19263 if(_class && !_class->symbol)
19264 _class->symbol = FindClass(_class->fullName);
19265 classSym = _class ? _class->symbol : (((void *)0));
19268 thisClass = _class;
19269 if(inCompiler && _class)
19271 if(type->kind == 11)
19273 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
19275 struct Type * param = symbol->type->__anon1.__anon2.params.first;
19277 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
19280 if(type->classObjectType != 1)
19282 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
19283 symbol->type->__anon1.__anon2.staticMethod = 1;
19284 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
19285 symbol->type->extraParam = 0;
19288 strcpy(className, "__ecereClass_");
19289 FullClassNameCat(className, _class->fullName, 1);
19291 FullClassNameCat(structName, _class->fullName, 0);
19292 funcDecl = GetFuncDecl(function->declarator);
19295 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19297 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19299 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19301 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19302 FreeTypeName(param);
19305 if(!function->propertyNoThis)
19307 struct TypeName * thisParam = (((void *)0));
19309 if(type->classObjectType != 1)
19311 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19312 if(!funcDecl->__anon1.function.parameters)
19313 funcDecl->__anon1.function.parameters = MkList();
19314 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19318 if(type->classObjectType != 1)
19320 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19321 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19323 thisParam = __extension__ ({
19324 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19326 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19328 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19329 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19333 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19335 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19337 funcDecl = GetFuncDecl(initDecl->declarator);
19340 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19342 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19344 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19346 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19347 FreeTypeName(param);
19350 if(type->classObjectType != 1)
19352 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19354 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19356 if(!funcDecl->__anon1.function.parameters)
19357 funcDecl->__anon1.function.parameters = MkList();
19358 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19366 if(type->classObjectType != 1)
19368 thisSymbol = __extension__ ({
19369 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19371 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19373 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19374 if(typedObject && thisSymbol->type)
19376 thisSymbol->type->classObjectType = 2;
19377 thisSymbol->type->byReference = type->byReference;
19378 thisSymbol->type->typedByReference = type->byReference;
19382 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19384 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19387 struct __ecereNameSpace__ecere__com__Class * base;
19389 for(base = _class; base && base->type != 1000; base = base->next)
19391 for(member = base->membersAndProperties.first; member; member = member->next)
19392 if(!member->isProperty)
19398 for(member = _class->membersAndProperties.first; member; member = member->next)
19399 if(!member->isProperty)
19403 char pointerName[1024];
19404 struct Declaration * decl;
19405 struct Initializer * initializer;
19406 struct Expression * exp, * bytePtr;
19408 strcpy(pointerName, "__ecerePointer_");
19409 FullClassNameCat(pointerName, _class->fullName, 0);
19411 char className[1024];
19413 strcpy(className, "__ecereClass_");
19414 FullClassNameCat(className, classSym->string, 1);
19415 DeclareClass(curExternal, classSym, className);
19417 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19420 struct Expression * e;
19422 if(_class->offset && _class->offset == (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize))
19424 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19425 ProcessExpressionType(e);
19431 sprintf(string, "%d", _class->offset);
19432 e = MkExpConstant(string);
19434 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19438 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19440 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19441 exp->expType = __extension__ ({
19442 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19444 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19445 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19447 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19448 }), __ecereInstance2;
19452 yylloc = function->body->loc;
19453 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19455 struct Context * prevContext = curContext;
19456 struct __ecereNameSpace__ecere__sys__OldList * list;
19458 curContext = function->body->__anon1.compound.context;
19459 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19461 curContext = prevContext;
19463 decl->symbol = (((void *)0));
19464 if(!function->body->__anon1.compound.declarations)
19465 function->body->__anon1.compound.declarations = MkList();
19466 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19472 thisClass = (((void *)0));
19475 FreeSpecifier(id->_class);
19476 id->_class = (((void *)0));
19477 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19479 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19481 id = GetDeclId(initDecl->declarator);
19482 FreeSpecifier(id->_class);
19483 id->_class = (((void *)0));
19487 topContext = function->body->__anon1.compound.context;
19489 struct FunctionDefinition * oldFunction = curFunction;
19491 curFunction = function;
19493 ProcessStatement(function->body);
19494 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19496 struct Statement * prevCompound = curCompound;
19497 struct Context * prevContext = curContext;
19498 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19500 if(!function->body->__anon1.compound.statements)
19501 function->body->__anon1.compound.statements = MkList();
19502 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19503 curCompound = function->body;
19504 curContext = function->body->__anon1.compound.context;
19505 ProcessStatement(fireWatchers);
19506 curContext = prevContext;
19507 curCompound = prevCompound;
19509 curFunction = oldFunction;
19511 if(function->declarator)
19513 ProcessDeclarator(function->declarator, 1);
19515 topContext = oldTopContext;
19516 thisClass = oldThisClass;
19519 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19521 struct ClassDef * def;
19522 struct External * external = curExternal;
19523 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19525 for(def = definitions->first; def; def = def->next)
19529 if(def->__anon1.function->declarator)
19530 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19532 curExternal = external;
19533 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19535 else if(def->type == 2)
19537 if(def->__anon1.decl->type == 2)
19539 thisClass = regClass;
19540 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19541 thisClass = (((void *)0));
19545 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19548 thisClass = regClass;
19549 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19550 thisClass = backThisClass;
19553 else if(def->type == 1 && def->__anon1.defProperties)
19555 struct MemberInit * defProperty;
19556 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
19558 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19559 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19561 thisClass = regClass;
19562 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19563 thisClass = (((void *)0));
19565 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19566 FreeSymbol(thisSymbol);
19568 else if(def->type == 3 && def->__anon1.propertyDef)
19570 struct PropertyDef * prop = def->__anon1.propertyDef;
19572 thisClass = regClass;
19577 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19579 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19581 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19582 ProcessStatement(prop->setStmt);
19588 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19590 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19592 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19593 ProcessStatement(prop->getStmt);
19595 if(prop->issetStmt)
19599 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19601 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19603 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19604 ProcessStatement(prop->issetStmt);
19606 thisClass = (((void *)0));
19608 else if(def->type == 4 && def->__anon1.propertyWatch)
19610 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19612 thisClass = regClass;
19613 if(propertyWatch->compound)
19615 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = regClass ? MkClassType(regClass->fullName) : (((void *)0)), thisSymbol);
19617 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19618 curExternal = (((void *)0));
19619 ProcessStatement(propertyWatch->compound);
19621 thisClass = (((void *)0));
19626 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19628 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19630 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19631 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19632 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19633 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19634 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19635 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19636 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19637 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19638 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19639 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19640 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19641 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19642 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19643 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19644 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19645 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19646 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19647 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19648 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19649 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19650 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19651 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19652 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19653 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19654 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19655 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19656 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19657 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19658 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19659 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19660 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19661 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19662 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19663 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19664 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19665 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19666 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19667 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19668 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19669 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19670 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19671 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19672 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19673 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19674 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19675 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19676 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19677 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19678 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19679 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("AddMembers", "int AddMembers(External neededBy, ecere::sys::OldList * declarations, ecere::com::Class _class, bool isMember, uint * retSize, ecere::com::Class topClass, bool * addedPadding)", AddMembers, module, 2);
19680 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19681 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19682 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19683 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19684 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMemberInitData", "void ProcessMemberInitData(MemberInit member, ecere::com::Class _class, ecere::com::Class * curClass, ecere::com::DataMember * curMember, ecere::com::DataMember * subMemberStack, int * subMemberStackPos)", ProcessMemberInitData, module, 2);
19685 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19686 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19687 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19688 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19689 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19690 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19691 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19692 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19693 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19694 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19695 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19696 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19697 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19698 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19699 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19700 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
19701 __ecereClass_Conversion = class;
19702 __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, bool warnConst)", MatchTypes, module, 1);
19703 __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);
19704 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19705 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchWithEnums_Module", "bool MatchWithEnums_Module(ecere::com::Module mainModule, Expression sourceExp, Type dest, char * string, ecere::sys::OldList conversions)", MatchWithEnums_Module, module, 2);
19706 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19707 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19708 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19709 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19710 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19711 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19712 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19713 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19714 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19715 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("modifyPassAsTemplate", "void modifyPassAsTemplate(Type * typePtr, bool value)", modifyPassAsTemplate, module, 1);
19716 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19717 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19718 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19719 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19720 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19721 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19722 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19723 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19724 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19725 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19726 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RelatedUnits", "bool RelatedUnits(ecere::com::Class c1, ecere::com::Class c2)", RelatedUnits, module, 1);
19727 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19728 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19729 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);