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 stdcall __attribute__((__stdcall__))
42 # define stdcall __stdcall
48 #include <sys/types.h>
51 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
54 extern int returnCode;
56 extern unsigned int yydebug;
58 extern unsigned int echoOn;
64 int expression_yyparse();
66 static char * thisNameSpace;
68 unsigned int thisClassParams = 1;
70 unsigned int internalValueCounter;
72 extern unsigned int outputLineNumbers;
74 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
76 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
78 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
80 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
82 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
84 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
86 extern int targetBits;
88 extern unsigned int inCompiler;
90 extern unsigned int inPreCompiler;
92 extern unsigned int inDebugger;
94 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
96 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
98 int UnescapeString(char * d, char * s, int len)
103 while(j < len && (ch = s[j]))
108 switch((ch = s[++j]))
154 char * OffsetEscapedString(char * s, int len, int offset)
159 while(j < len && k < offset && (ch = s[j]))
165 return (k == offset) ? s + j : (((void *)0));
168 extern int __ecereVMethodID_class_OnGetString;
170 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
172 extern unsigned int parseError;
174 static int definedExpStackPos;
176 static void * definedExpStack[512];
178 extern const char * sourceFile;
180 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
182 extern unsigned int memoryGuard;
184 struct __ecereNameSpace__ecere__sys__OldList
191 } __attribute__ ((gcc_struct));
193 struct __ecereNameSpace__ecere__com__DataValue
208 } __attribute__ ((gcc_struct)) __anon1;
209 } __attribute__ ((gcc_struct));
211 struct __ecereNameSpace__ecere__com__SerialBuffer
213 unsigned char * _buffer;
217 } __attribute__ ((gcc_struct));
219 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
221 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
223 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
225 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
227 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
235 struct TemplateArgument;
249 } __attribute__ ((gcc_struct));
251 extern size_t strlen(const char * );
253 extern int strcmp(const char * , const char * );
255 extern int sprintf(char * , const char * , ...);
257 extern char * strcat(char * , const char * );
259 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
261 extern int isprint(int c);
263 extern char * strcpy(char * , const char * );
265 extern void Compiler_Error(const char * format, ...);
267 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
269 struct __ecereNameSpace__ecere__com__LinkList
274 } __attribute__ ((gcc_struct));
276 extern char * strchr(const char * , int);
278 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
280 extern void * memcpy(void * , const void * , size_t size);
282 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
284 extern void Compiler_Warning(const char * format, ...);
286 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
288 extern long long strtoll(const char * nptr, char * * endptr, int base);
290 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
292 extern int strtol(const char * , char * * , int base);
294 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
296 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
298 extern double strtod(const char * , char * * );
300 extern int strncmp(const char * , const char * , size_t n);
302 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
304 extern char * QMkString(const char * source);
306 extern char * strncpy(char * , const char * , size_t n);
308 extern int printf(const char * , ...);
310 extern char * strstr(const char * , const char * );
312 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
314 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
316 extern int (* __ecereProp_float_Get_signBit)(float this);
318 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
320 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
322 extern int (* __ecereProp_double_Get_signBit)(double this);
324 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
326 extern float (* __ecereMethod_float_inf)(void);
328 extern float (* __ecereMethod_float_nan)(void);
330 extern double (* __ecereMethod_double_inf)(void);
332 extern double (* __ecereMethod_double_nan)(void);
334 int __ecereVMethodID_class_OnGetString;
336 void SetYydebug(unsigned int b)
341 unsigned int GetParseError()
346 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
348 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
350 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
352 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
354 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
356 struct __ecereNameSpace__ecere__com__EnumClassData
358 struct __ecereNameSpace__ecere__sys__OldList values;
360 } __attribute__ ((gcc_struct));
362 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
364 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
366 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
368 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
370 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
372 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
374 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
376 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
380 struct CodePosition start;
381 struct CodePosition end;
382 } __attribute__ ((gcc_struct));
384 void ReadString(char * output, char * string)
386 int len = strlen(string);
388 unsigned int quoted = 0, escaped = 0;
390 for(c = 0; c < len; c++)
450 char * PrintInt(long long result)
454 if(result > (((int)0x7fffffff)))
455 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
457 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
458 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
460 return __ecereNameSpace__ecere__sys__CopyString(temp);
463 char * PrintUInt(uint64 result)
467 if(result > (0xffffffff))
468 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
469 else if(result > (((int)0x7fffffff)))
470 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
472 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
473 return __ecereNameSpace__ecere__sys__CopyString(temp);
476 char * PrintInt64(long long result)
480 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
481 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
483 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
484 return __ecereNameSpace__ecere__sys__CopyString(temp);
487 char * PrintUInt64(uint64 result)
491 if(result > (0xffffffff))
492 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
493 else if(result > (((int)0x7fffffff)))
494 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
496 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
497 return __ecereNameSpace__ecere__sys__CopyString(temp);
500 char * PrintHexUInt(uint64 result)
504 if(result > (0xffffffff))
505 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
507 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
508 if(result > (0xffffffff))
510 return __ecereNameSpace__ecere__sys__CopyString(temp);
513 char * PrintHexUInt64(uint64 result)
517 if(result > (0xffffffff))
518 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
520 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
521 return __ecereNameSpace__ecere__sys__CopyString(temp);
524 char * PrintShort(short result)
528 sprintf(temp, "%d", (unsigned short)result);
529 return __ecereNameSpace__ecere__sys__CopyString(temp);
532 char * PrintUShort(unsigned short result)
536 if(result > (unsigned short)32767)
537 sprintf(temp, "0x%X", (int)result);
539 sprintf(temp, "%d", (int)result);
540 return __ecereNameSpace__ecere__sys__CopyString(temp);
543 char * PrintUChar(unsigned char result)
547 sprintf(temp, "0x%X", result);
548 return __ecereNameSpace__ecere__sys__CopyString(temp);
551 char * PrintChar(char result)
555 if(result > (char)0 && isprint(result))
556 sprintf(temp, "'%c'", result);
557 else if(result < (char)0)
558 sprintf(temp, "%d", (int)result);
560 sprintf(temp, "0x%X", (unsigned char)result);
561 return __ecereNameSpace__ecere__sys__CopyString(temp);
564 char * PrintFloat(float result)
568 if(__ecereProp_float_Get_isInf(result))
570 if(__ecereProp_float_Get_signBit(result))
571 strcpy(temp, "-inf");
575 else if(__ecereProp_float_Get_isNan(result))
577 if(__ecereProp_float_Get_signBit(result))
578 strcpy(temp, "-nan");
583 sprintf(temp, "%.16ff", result);
584 return __ecereNameSpace__ecere__sys__CopyString(temp);
587 char * PrintDouble(double result)
591 if(__ecereProp_double_Get_isInf(result))
593 if(__ecereProp_double_Get_signBit(result))
594 strcpy(temp, "-inf");
598 else if(__ecereProp_double_Get_isNan(result))
600 if(__ecereProp_double_Get_signBit(result))
601 strcpy(temp, "-nan");
606 sprintf(temp, "%.16f", result);
607 return __ecereNameSpace__ecere__sys__CopyString(temp);
610 extern struct Location yylloc;
619 struct Attrib * attr;
620 } __attribute__ ((gcc_struct)) __anon1;
621 } __attribute__ ((gcc_struct));
623 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
627 extern struct Expression * parsedExpression;
629 extern struct Expression * QMkExpId(const char * id);
631 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
633 void ComputeExpression(struct Expression * exp);
635 extern struct Expression * MkExpConstant(const char * string);
637 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
639 extern void FreeExpression(struct Expression * exp);
641 extern void FreeExpContents(struct Expression * exp);
643 extern struct Expression * CopyExpression(struct Expression * exp);
645 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
647 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
649 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
651 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
653 extern struct Expression * MoveExpContents(struct Expression * exp);
655 extern struct Expression * QBrackets(struct Expression * exp);
657 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
661 static struct Statement * curCompound;
663 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
665 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
667 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
669 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
671 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
673 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
677 struct External * curExternal, * afterExternal;
679 extern void FreeExternal(struct External * external);
683 static struct Type * curSwitchType;
685 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
687 extern void FreeType(struct Type * type);
689 extern struct Type * MkClassType(const char * name);
691 extern void CopyTypeInto(struct Type * type, struct Type * src);
693 struct __ecereNameSpace__ecere__com__Class;
695 struct __ecereNameSpace__ecere__com__Instance
698 struct __ecereNameSpace__ecere__com__Class * _class;
700 } __attribute__ ((gcc_struct));
702 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
704 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
706 static struct __ecereNameSpace__ecere__com__Class * currentClass;
708 struct __ecereNameSpace__ecere__com__Class * thisClass;
710 struct __ecereNameSpace__ecere__com__Class * containerClass;
712 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
714 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
716 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
718 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
720 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
722 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
724 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
726 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
728 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
730 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
732 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
734 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
739 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
746 extern struct Context * curContext;
748 extern struct Context * topContext;
750 extern struct Context * PushContext(void);
752 extern void PopContext(struct Context * ctx);
754 extern void FreeContext(struct Context * context);
756 extern struct Context * globalContext;
760 extern struct ModuleImport * mainModule;
764 struct ModuleImport * prev;
765 struct ModuleImport * next;
767 struct __ecereNameSpace__ecere__sys__OldList classes;
768 struct __ecereNameSpace__ecere__sys__OldList functions;
771 } __attribute__ ((gcc_struct));
773 struct __ecereNameSpace__ecere__com__NameSpace;
775 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
777 struct FunctionDefinition;
779 static struct FunctionDefinition * curFunction;
781 struct __ecereNameSpace__ecere__sys__BTNode;
783 struct __ecereNameSpace__ecere__sys__BTNode
786 struct __ecereNameSpace__ecere__sys__BTNode * parent;
787 struct __ecereNameSpace__ecere__sys__BTNode * left;
788 struct __ecereNameSpace__ecere__sys__BTNode * right;
790 } __attribute__ ((gcc_struct));
792 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
794 struct __ecereNameSpace__ecere__com__Property;
796 struct __ecereNameSpace__ecere__com__Property
798 struct __ecereNameSpace__ecere__com__Property * prev;
799 struct __ecereNameSpace__ecere__com__Property * next;
801 unsigned int isProperty;
804 struct __ecereNameSpace__ecere__com__Class * _class;
805 const char * dataTypeString;
806 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
807 struct Type * dataType;
808 void (* Set)(void * , int);
809 int (* Get)(void * );
810 unsigned int (* IsSet)(void * );
814 unsigned int conversion;
815 unsigned int watcherOffset;
816 const char * category;
817 unsigned int compiled;
818 unsigned int selfWatchable;
819 unsigned int isWatchable;
820 } __attribute__ ((gcc_struct));
822 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
824 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);
826 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
828 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
832 extern void FreeIdentifier(struct Identifier * id);
834 extern struct Identifier * MkIdentifier(const char * string);
836 extern struct Expression * MkExpIdentifier(struct Identifier * id);
838 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
840 extern struct Identifier * CopyIdentifier(struct Identifier * id);
842 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
844 struct __ecereNameSpace__ecere__sys__OldLink;
846 struct __ecereNameSpace__ecere__sys__OldLink
848 struct __ecereNameSpace__ecere__sys__OldLink * prev;
849 struct __ecereNameSpace__ecere__sys__OldLink * next;
851 } __attribute__ ((gcc_struct));
855 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
857 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
861 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
863 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
865 extern struct Specifier * MkSpecifier(int specifier);
867 extern struct Specifier * MkSpecifierName(const char * name);
869 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
871 extern void FreeSpecifier(struct Specifier * spec);
873 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
877 struct Statement * prev;
878 struct Statement * next;
883 struct __ecereNameSpace__ecere__sys__OldList * expressions;
886 struct Identifier * id;
887 struct Statement * stmt;
888 } __attribute__ ((gcc_struct)) labeled;
891 struct Expression * exp;
892 struct Statement * stmt;
893 } __attribute__ ((gcc_struct)) caseStmt;
896 struct __ecereNameSpace__ecere__sys__OldList * declarations;
897 struct __ecereNameSpace__ecere__sys__OldList * statements;
898 struct Context * context;
899 unsigned int isSwitch;
900 } __attribute__ ((gcc_struct)) compound;
903 struct __ecereNameSpace__ecere__sys__OldList * exp;
904 struct Statement * stmt;
905 struct Statement * elseStmt;
906 } __attribute__ ((gcc_struct)) ifStmt;
909 struct __ecereNameSpace__ecere__sys__OldList * exp;
910 struct Statement * stmt;
911 } __attribute__ ((gcc_struct)) switchStmt;
914 struct __ecereNameSpace__ecere__sys__OldList * exp;
915 struct Statement * stmt;
916 } __attribute__ ((gcc_struct)) whileStmt;
919 struct __ecereNameSpace__ecere__sys__OldList * exp;
920 struct Statement * stmt;
921 } __attribute__ ((gcc_struct)) doWhile;
924 struct Statement * init;
925 struct Statement * check;
926 struct __ecereNameSpace__ecere__sys__OldList * increment;
927 struct Statement * stmt;
928 } __attribute__ ((gcc_struct)) forStmt;
931 struct Identifier * id;
932 } __attribute__ ((gcc_struct)) gotoStmt;
935 struct Specifier * spec;
937 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
938 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
939 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
940 } __attribute__ ((gcc_struct)) asmStmt;
943 struct Expression * watcher;
944 struct Expression * object;
945 struct __ecereNameSpace__ecere__sys__OldList * watches;
946 } __attribute__ ((gcc_struct)) _watch;
949 struct Identifier * id;
950 struct __ecereNameSpace__ecere__sys__OldList * exp;
951 struct __ecereNameSpace__ecere__sys__OldList * filter;
952 struct Statement * stmt;
953 } __attribute__ ((gcc_struct)) forEachStmt;
954 struct Declaration * decl;
955 } __attribute__ ((gcc_struct)) __anon1;
956 } __attribute__ ((gcc_struct));
958 extern struct Specifier * CopySpecifier(struct Specifier * spec);
960 extern struct Expression * MkExpClassSize(struct Specifier * _class);
966 struct Identifier * prev;
967 struct Identifier * next;
969 struct Symbol * classSym;
970 struct Specifier * _class;
972 struct Identifier * badID;
973 } __attribute__ ((gcc_struct));
975 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
977 extern struct Symbol * FindClass(const char * name);
979 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
981 extern struct Symbol * FindType(struct Context * ctx, const char * name);
983 extern void FreeSymbol(struct Symbol * symbol);
987 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
989 extern void FreeClassDef(struct ClassDef * def);
993 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
995 struct TemplateDatatype
997 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
998 struct Declarator * decl;
999 } __attribute__ ((gcc_struct));
1001 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1003 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1005 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1007 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1009 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1013 struct Declarator * prev;
1014 struct Declarator * next;
1015 struct Location loc;
1017 struct Symbol * symbol;
1018 struct Declarator * declarator;
1021 struct Identifier * identifier;
1024 struct Expression * exp;
1025 struct Expression * posExp;
1026 struct Attrib * attrib;
1027 } __attribute__ ((gcc_struct)) structDecl;
1030 struct Expression * exp;
1031 struct Specifier * enumClass;
1032 } __attribute__ ((gcc_struct)) array;
1035 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1036 } __attribute__ ((gcc_struct)) function;
1039 struct Pointer * pointer;
1040 } __attribute__ ((gcc_struct)) pointer;
1043 struct ExtDecl * extended;
1044 } __attribute__ ((gcc_struct)) extended;
1045 } __attribute__ ((gcc_struct)) __anon1;
1046 } __attribute__ ((gcc_struct));
1048 extern struct Identifier * GetDeclId(struct Declarator * decl);
1050 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1052 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1054 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1056 extern void FreeDeclarator(struct Declarator * decl);
1058 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1060 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1062 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1064 struct FunctionDefinition
1066 struct FunctionDefinition * prev;
1067 struct FunctionDefinition * next;
1068 struct Location loc;
1069 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1070 struct Declarator * declarator;
1071 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1072 struct Statement * body;
1073 struct __ecereNameSpace__ecere__com__Class * _class;
1074 struct __ecereNameSpace__ecere__sys__OldList attached;
1077 struct Symbol * propSet;
1079 unsigned int propertyNoThis;
1080 } __attribute__ ((gcc_struct));
1082 extern struct Declarator * QMkPtrDecl(const char * id);
1084 struct ClassFunction;
1086 struct ClassFunction
1088 struct ClassFunction * prev;
1089 struct ClassFunction * next;
1090 struct Location loc;
1091 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1092 struct Declarator * declarator;
1093 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1094 struct Statement * body;
1095 struct __ecereNameSpace__ecere__com__Class * _class;
1096 struct __ecereNameSpace__ecere__sys__OldList attached;
1099 struct Symbol * propSet;
1100 unsigned int isVirtual;
1101 unsigned int isConstructor;
1102 unsigned int isDestructor;
1103 unsigned int dontMangle;
1106 } __attribute__ ((gcc_struct));
1108 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);
1110 extern void FreeClassFunction(struct ClassFunction * func);
1112 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1114 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1118 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1120 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1124 struct TypeName * prev;
1125 struct TypeName * next;
1126 struct Location loc;
1127 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1128 struct Declarator * declarator;
1129 int classObjectType;
1130 struct Expression * bitCount;
1131 } __attribute__ ((gcc_struct));
1133 extern void FreeTypeName(struct TypeName * typeName);
1135 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1137 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1139 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1141 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1143 struct __ecereNameSpace__ecere__com__BTNamedLink;
1145 struct __ecereNameSpace__ecere__com__BTNamedLink
1148 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1149 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1150 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1153 } __attribute__ ((gcc_struct));
1155 struct __ecereNameSpace__ecere__sys__NamedLink64;
1157 struct __ecereNameSpace__ecere__sys__NamedLink64
1159 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1160 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1163 } __attribute__ ((gcc_struct));
1165 struct Instantiation;
1169 struct Declaration * prev;
1170 struct Declaration * next;
1171 struct Location loc;
1177 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1178 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1179 } __attribute__ ((gcc_struct)) __anon1;
1180 struct Instantiation * inst;
1183 struct Identifier * id;
1184 struct Expression * exp;
1185 } __attribute__ ((gcc_struct)) __anon2;
1186 } __attribute__ ((gcc_struct)) __anon1;
1187 struct Specifier * extStorage;
1188 struct Symbol * symbol;
1190 } __attribute__ ((gcc_struct));
1192 struct Instantiation
1194 struct Instantiation * prev;
1195 struct Instantiation * next;
1196 struct Location loc;
1197 struct Specifier * _class;
1198 struct Expression * exp;
1199 struct __ecereNameSpace__ecere__sys__OldList * members;
1200 struct Symbol * symbol;
1201 unsigned int fullSet;
1202 unsigned int isConstant;
1203 unsigned char * data;
1204 struct Location nameLoc;
1205 struct Location insideLoc;
1207 } __attribute__ ((gcc_struct));
1209 extern void FreeInstance(struct Instantiation * inst);
1211 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1213 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1215 struct InitDeclarator;
1217 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1219 struct PropertyWatch;
1221 struct PropertyWatch
1223 struct PropertyWatch * prev;
1224 struct PropertyWatch * next;
1225 struct Location loc;
1226 struct Statement * compound;
1227 struct __ecereNameSpace__ecere__sys__OldList * properties;
1228 unsigned int deleteWatch;
1229 } __attribute__ ((gcc_struct));
1231 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1233 struct PropertyImport;
1235 struct PropertyImport
1237 struct PropertyImport * prev;
1238 struct PropertyImport * next;
1240 unsigned int isVirtual;
1241 unsigned int hasSet;
1242 unsigned int hasGet;
1243 } __attribute__ ((gcc_struct));
1245 struct MethodImport;
1249 struct MethodImport * prev;
1250 struct MethodImport * next;
1252 unsigned int isVirtual;
1253 } __attribute__ ((gcc_struct));
1255 struct FunctionImport;
1257 struct FunctionImport
1259 struct FunctionImport * prev;
1260 struct FunctionImport * next;
1262 } __attribute__ ((gcc_struct));
1268 struct ClassImport * prev;
1269 struct ClassImport * next;
1271 struct __ecereNameSpace__ecere__sys__OldList methods;
1272 struct __ecereNameSpace__ecere__sys__OldList properties;
1273 unsigned int itself;
1275 } __attribute__ ((gcc_struct));
1281 struct Expression * prev;
1282 struct Expression * next;
1283 struct Location loc;
1290 struct Identifier * identifier;
1291 } __attribute__ ((gcc_struct)) __anon1;
1292 struct Statement * compound;
1293 struct Instantiation * instance;
1297 unsigned int intlString;
1298 unsigned int wideString;
1299 } __attribute__ ((gcc_struct)) __anon2;
1300 struct __ecereNameSpace__ecere__sys__OldList * list;
1303 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1304 struct Declarator * decl;
1305 } __attribute__ ((gcc_struct)) _classExp;
1308 struct Identifier * id;
1309 } __attribute__ ((gcc_struct)) classData;
1312 struct Expression * exp;
1313 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1314 struct Location argLoc;
1315 } __attribute__ ((gcc_struct)) call;
1318 struct Expression * exp;
1319 struct __ecereNameSpace__ecere__sys__OldList * index;
1320 } __attribute__ ((gcc_struct)) index;
1323 struct Expression * exp;
1324 struct Identifier * member;
1326 unsigned int thisPtr;
1327 } __attribute__ ((gcc_struct)) member;
1331 struct Expression * exp1;
1332 struct Expression * exp2;
1333 } __attribute__ ((gcc_struct)) op;
1334 struct TypeName * typeName;
1335 struct Specifier * _class;
1338 struct TypeName * typeName;
1339 struct Expression * exp;
1340 } __attribute__ ((gcc_struct)) cast;
1343 struct Expression * cond;
1344 struct __ecereNameSpace__ecere__sys__OldList * exp;
1345 struct Expression * elseExp;
1346 } __attribute__ ((gcc_struct)) cond;
1349 struct TypeName * typeName;
1350 struct Expression * size;
1351 } __attribute__ ((gcc_struct)) _new;
1354 struct TypeName * typeName;
1355 struct Expression * size;
1356 struct Expression * exp;
1357 } __attribute__ ((gcc_struct)) _renew;
1361 struct Identifier * id;
1362 } __attribute__ ((gcc_struct)) db;
1365 struct Expression * ds;
1366 struct Expression * name;
1367 } __attribute__ ((gcc_struct)) dbopen;
1370 struct TypeName * typeName;
1371 struct Initializer * initializer;
1372 } __attribute__ ((gcc_struct)) initializer;
1375 struct Expression * exp;
1376 struct TypeName * typeName;
1377 } __attribute__ ((gcc_struct)) vaArg;
1378 } __attribute__ ((gcc_struct)) __anon1;
1379 unsigned int debugValue;
1380 struct __ecereNameSpace__ecere__com__DataValue val;
1382 unsigned int hasAddress;
1383 struct Type * expType;
1384 struct Type * destType;
1387 unsigned int byReference;
1388 unsigned int isConstant;
1389 unsigned int addedThis;
1390 unsigned int needCast;
1391 unsigned int thisPtr;
1392 unsigned int opDestType;
1393 unsigned int needTemplateCast;
1394 } __attribute__ ((gcc_struct));
1396 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1400 struct Initializer * prev;
1401 struct Initializer * next;
1402 struct Location loc;
1406 struct Expression * exp;
1407 struct __ecereNameSpace__ecere__sys__OldList * list;
1408 } __attribute__ ((gcc_struct)) __anon1;
1409 unsigned int isConstant;
1410 struct Identifier * id;
1411 } __attribute__ ((gcc_struct));
1413 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1415 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1417 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1419 struct InitDeclarator
1421 struct InitDeclarator * prev;
1422 struct InitDeclarator * next;
1423 struct Location loc;
1424 struct Declarator * declarator;
1425 struct Initializer * initializer;
1426 } __attribute__ ((gcc_struct));
1428 void ApplyLocation(struct Expression * exp, struct Location * loc)
1434 if(exp->__anon1.op.exp1)
1435 ApplyLocation(exp->__anon1.op.exp1, loc);
1436 if(exp->__anon1.op.exp2)
1437 ApplyLocation(exp->__anon1.op.exp2, loc);
1440 if(exp->__anon1.list)
1442 struct Expression * e;
1444 for(e = (*exp->__anon1.list).first; e; e = e->next)
1445 ApplyLocation(e, loc);
1449 if(exp->__anon1.index.index)
1451 struct Expression * e;
1453 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1454 ApplyLocation(e, loc);
1456 if(exp->__anon1.index.exp)
1457 ApplyLocation(exp->__anon1.index.exp, loc);
1460 if(exp->__anon1.call.arguments)
1462 struct Expression * arg;
1464 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1465 ApplyLocation(arg, loc);
1467 if(exp->__anon1.call.exp)
1468 ApplyLocation(exp->__anon1.call.exp, loc);
1472 if(exp->__anon1.member.exp)
1473 ApplyLocation(exp->__anon1.member.exp, loc);
1476 if(exp->__anon1.cast.exp)
1477 ApplyLocation(exp->__anon1.cast.exp, loc);
1480 if(exp->__anon1.cond.exp)
1482 struct Expression * e;
1484 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1485 ApplyLocation(e, loc);
1487 if(exp->__anon1.cond.cond)
1488 ApplyLocation(exp->__anon1.cond.cond, loc);
1489 if(exp->__anon1.cond.elseExp)
1490 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1493 if(exp->__anon1.vaArg.exp)
1494 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1501 void __ecereMethod_Expression_Clear();
1507 struct MembersInit * prev;
1508 struct MembersInit * next;
1509 struct Location loc;
1513 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1514 struct ClassFunction * function;
1515 } __attribute__ ((gcc_struct)) __anon1;
1516 } __attribute__ ((gcc_struct));
1518 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1524 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1525 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1526 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1527 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1528 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1529 unsigned int (* Neg)(struct Expression *, struct Operand *);
1530 unsigned int (* Inc)(struct Expression *, struct Operand *);
1531 unsigned int (* Dec)(struct Expression *, struct Operand *);
1532 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1533 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1534 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1535 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1537 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1543 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1544 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* Not)(struct Expression *, struct Operand *);
1550 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1553 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1554 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1555 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1557 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1559 } __attribute__ ((gcc_struct));
1565 unsigned int ptrSize;
1578 } __attribute__ ((gcc_struct)) __anon1;
1580 } __attribute__ ((gcc_struct));
1582 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1584 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1586 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1589 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1591 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1593 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1596 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1598 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1601 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1603 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1605 _PrintType(type, string, printName, fullName, 1);
1608 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1610 _PrintType(type, string, printName, fullName, 0);
1613 struct __ecereNameSpace__ecere__com__Method;
1615 struct __ecereNameSpace__ecere__com__Method
1618 struct __ecereNameSpace__ecere__com__Method * parent;
1619 struct __ecereNameSpace__ecere__com__Method * left;
1620 struct __ecereNameSpace__ecere__com__Method * right;
1625 struct __ecereNameSpace__ecere__com__Class * _class;
1627 const char * dataTypeString;
1628 struct Type * dataType;
1630 } __attribute__ ((gcc_struct));
1635 struct Symbol * parent;
1636 struct Symbol * left;
1637 struct Symbol * right;
1642 struct __ecereNameSpace__ecere__com__Method * method;
1643 struct __ecereNameSpace__ecere__com__Property * _property;
1644 struct __ecereNameSpace__ecere__com__Class * registered;
1645 } __attribute__ ((gcc_struct)) __anon1;
1646 unsigned int notYetDeclared;
1651 struct External * pointerExternal;
1652 struct External * structExternal;
1653 } __attribute__ ((gcc_struct)) __anon1;
1656 struct External * externalGet;
1657 struct External * externalSet;
1658 struct External * externalPtr;
1659 struct External * externalIsSet;
1660 } __attribute__ ((gcc_struct)) __anon2;
1663 struct External * methodExternal;
1664 struct External * methodCodeExternal;
1665 } __attribute__ ((gcc_struct)) __anon3;
1666 } __attribute__ ((gcc_struct)) __anon2;
1667 unsigned int imported;
1668 unsigned int declaredStructSym;
1669 struct __ecereNameSpace__ecere__com__Class * _class;
1670 unsigned int declaredStruct;
1671 unsigned int needConstructor;
1672 unsigned int needDestructor;
1673 char * constructorName;
1676 char * destructorName;
1677 struct ModuleImport * module;
1678 struct ClassImport * _import;
1679 struct Location nameLoc;
1680 unsigned int isParam;
1681 unsigned int isRemote;
1682 unsigned int isStruct;
1683 unsigned int fireWatchersDone;
1685 unsigned int classData;
1686 unsigned int isStatic;
1688 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1689 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1690 struct Context * ctx;
1692 struct Expression * propCategory;
1693 unsigned int mustRegister;
1694 } __attribute__ ((gcc_struct));
1696 struct __ecereNameSpace__ecere__com__ClassProperty;
1698 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1700 struct __ecereNameSpace__ecere__com__ClassProperty
1703 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1704 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1705 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1707 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1708 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1709 const char * dataTypeString;
1710 struct Type * dataType;
1711 unsigned int constant;
1712 } __attribute__ ((gcc_struct));
1714 struct __ecereNameSpace__ecere__com__BitMember;
1716 struct __ecereNameSpace__ecere__com__BitMember
1718 struct __ecereNameSpace__ecere__com__BitMember * prev;
1719 struct __ecereNameSpace__ecere__com__BitMember * next;
1721 unsigned int isProperty;
1724 struct __ecereNameSpace__ecere__com__Class * _class;
1725 const char * dataTypeString;
1726 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1727 struct Type * dataType;
1732 } __attribute__ ((gcc_struct));
1734 struct __ecereNameSpace__ecere__com__DataMember;
1736 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1742 const char * dataTypeString;
1743 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1744 } __attribute__ ((gcc_struct)) __anon1;
1745 struct __ecereNameSpace__ecere__com__DataValue expression;
1748 const char * memberString;
1751 struct __ecereNameSpace__ecere__com__DataMember * member;
1752 struct __ecereNameSpace__ecere__com__Property * prop;
1753 struct __ecereNameSpace__ecere__com__Method * method;
1754 } __attribute__ ((gcc_struct)) __anon1;
1755 } __attribute__ ((gcc_struct)) __anon2;
1756 } __attribute__ ((gcc_struct)) __anon1;
1757 } __attribute__ ((gcc_struct));
1759 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);
1761 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);
1763 struct TemplateParameter;
1765 struct TemplateParameter
1767 struct TemplateParameter * prev;
1768 struct TemplateParameter * next;
1769 struct Location loc;
1771 struct Identifier * identifier;
1774 struct TemplateDatatype * dataType;
1776 } __attribute__ ((gcc_struct)) __anon1;
1777 struct TemplateArgument * defaultArgument;
1778 const char * dataTypeString;
1779 struct Type * baseType;
1780 } __attribute__ ((gcc_struct));
1789 struct Symbol * _class;
1792 struct __ecereNameSpace__ecere__sys__OldList members;
1794 } __attribute__ ((gcc_struct)) __anon1;
1797 struct Type * returnType;
1798 struct __ecereNameSpace__ecere__sys__OldList params;
1799 struct Symbol * thisClass;
1800 unsigned int staticMethod;
1801 struct TemplateParameter * thisClassTemplate;
1802 } __attribute__ ((gcc_struct)) __anon2;
1805 struct __ecereNameSpace__ecere__com__Method * method;
1806 struct __ecereNameSpace__ecere__com__Class * methodClass;
1807 struct __ecereNameSpace__ecere__com__Class * usedClass;
1808 } __attribute__ ((gcc_struct)) __anon3;
1811 struct Type * arrayType;
1813 struct Expression * arraySizeExp;
1814 unsigned int freeExp;
1815 struct Symbol * enumClass;
1816 } __attribute__ ((gcc_struct)) __anon4;
1818 struct TemplateParameter * templateParameter;
1819 } __attribute__ ((gcc_struct)) __anon1;
1824 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1825 int classObjectType;
1827 unsigned int offset;
1830 unsigned int isSigned : 1;
1831 unsigned int constant : 1;
1832 unsigned int truth : 1;
1833 unsigned int byReference : 1;
1834 unsigned int extraParam : 1;
1835 unsigned int directClassAccess : 1;
1836 unsigned int computing : 1;
1837 unsigned int keepCast : 1;
1838 unsigned int passAsTemplate : 1;
1839 unsigned int dllExport : 1;
1840 unsigned int attrStdcall : 1;
1841 unsigned int declaredWithStruct : 1;
1842 unsigned int typedByReference : 1;
1843 unsigned int casted : 1;
1844 unsigned int pointerAlignment : 1;
1845 unsigned int isLong : 1;
1846 } __attribute__ ((gcc_struct));
1850 struct Specifier * prev;
1851 struct Specifier * next;
1852 struct Location loc;
1859 struct ExtDecl * extDecl;
1861 struct Symbol * symbol;
1862 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1863 struct Specifier * nsSpec;
1864 } __attribute__ ((gcc_struct)) __anon1;
1867 struct Identifier * id;
1868 struct __ecereNameSpace__ecere__sys__OldList * list;
1869 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1870 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1871 unsigned int addNameSpace;
1872 struct Context * ctx;
1873 struct ExtDecl * extDeclStruct;
1874 } __attribute__ ((gcc_struct)) __anon2;
1875 struct Expression * expression;
1876 struct Specifier * _class;
1877 struct TemplateParameter * templateParameter;
1878 } __attribute__ ((gcc_struct)) __anon1;
1879 } __attribute__ ((gcc_struct));
1881 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1883 struct TemplatedType
1886 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1887 struct __ecereNameSpace__ecere__sys__BTNode * left;
1888 struct __ecereNameSpace__ecere__sys__BTNode * right;
1890 struct TemplateParameter * param;
1891 } __attribute__ ((gcc_struct));
1893 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1895 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1897 if(!param->baseType)
1899 if(param->dataTypeString)
1900 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1902 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1904 return param->baseType;
1906 return (((void *)0));
1909 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1911 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1913 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1917 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1928 if(type1->passAsTemplate && !type2->passAsTemplate)
1930 return type1->isSigned != type2->isSigned;
1932 return type1->__anon1._class != type2->__anon1._class;
1934 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1942 unsigned int GetOpInt(struct Operand * op2, int * value2)
1944 if(op2->kind == 3 && op2->type->isSigned)
1945 *value2 = op2->__anon1.i;
1946 else if(op2->kind == 3)
1947 *value2 = (int)op2->__anon1.ui;
1948 else if(op2->kind == 4 && op2->type->isSigned)
1949 *value2 = (int)op2->__anon1.i64;
1950 else if(op2->kind == 4)
1951 *value2 = (int)op2->__anon1.ui64;
1952 else if(op2->kind == 23 && op2->type->isSigned)
1953 *value2 = (int)op2->__anon1.i64;
1954 else if(op2->kind == 23)
1955 *value2 = (int)op2->__anon1.ui64;
1956 else if(op2->kind == 22 && op2->type->isSigned)
1957 *value2 = (int)op2->__anon1.i64;
1958 else if(op2->kind == 22)
1959 *value2 = (int)op2->__anon1.ui64;
1960 else if(op2->kind == 2 && op2->type->isSigned)
1961 *value2 = (int)op2->__anon1.s;
1962 else if(op2->kind == 2)
1963 *value2 = (int)op2->__anon1.us;
1964 else if(op2->kind == 1 && op2->type->isSigned)
1965 *value2 = (int)op2->__anon1.c;
1966 else if(op2->kind == 24 || op2->kind == 1)
1967 *value2 = (int)op2->__anon1.uc;
1968 else if(op2->kind == 6)
1969 *value2 = (int)op2->__anon1.f;
1970 else if(op2->kind == 7)
1971 *value2 = (int)op2->__anon1.d;
1972 else if(op2->kind == 13)
1973 *value2 = (int)op2->__anon1.ui64;
1979 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1981 if(op2->kind == 3 && op2->type->isSigned)
1982 *value2 = (unsigned int)op2->__anon1.i;
1983 else if(op2->kind == 3)
1984 *value2 = op2->__anon1.ui;
1985 else if(op2->kind == 4 && op2->type->isSigned)
1986 *value2 = (unsigned int)op2->__anon1.i64;
1987 else if(op2->kind == 4)
1988 *value2 = (unsigned int)op2->__anon1.ui64;
1989 else if(op2->kind == 23 && op2->type->isSigned)
1990 *value2 = (unsigned int)op2->__anon1.i64;
1991 else if(op2->kind == 23)
1992 *value2 = (unsigned int)op2->__anon1.ui64;
1993 else if(op2->kind == 22 && op2->type->isSigned)
1994 *value2 = (unsigned int)op2->__anon1.i64;
1995 else if(op2->kind == 22)
1996 *value2 = (unsigned int)op2->__anon1.ui64;
1997 else if(op2->kind == 2 && op2->type->isSigned)
1998 *value2 = (unsigned int)op2->__anon1.s;
1999 else if(op2->kind == 2)
2000 *value2 = (unsigned int)op2->__anon1.us;
2001 else if(op2->kind == 1 && op2->type->isSigned)
2002 *value2 = (unsigned int)op2->__anon1.c;
2003 else if(op2->kind == 24 || op2->kind == 1)
2004 *value2 = (unsigned int)op2->__anon1.uc;
2005 else if(op2->kind == 6)
2006 *value2 = (unsigned int)op2->__anon1.f;
2007 else if(op2->kind == 7)
2008 *value2 = (unsigned int)op2->__anon1.d;
2009 else if(op2->kind == 13)
2010 *value2 = (unsigned int)op2->__anon1.ui64;
2016 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2018 if(op2->kind == 3 && op2->type->isSigned)
2019 *value2 = (long long)op2->__anon1.i;
2020 else if(op2->kind == 3)
2021 *value2 = (long long)op2->__anon1.ui;
2022 else if(op2->kind == 4 && op2->type->isSigned)
2023 *value2 = op2->__anon1.i64;
2024 else if(op2->kind == 4)
2025 *value2 = (long long)op2->__anon1.ui64;
2026 else if(op2->kind == 23 && op2->type->isSigned)
2027 *value2 = op2->__anon1.i64;
2028 else if(op2->kind == 23)
2029 *value2 = (long long)op2->__anon1.ui64;
2030 else if(op2->kind == 22 && op2->type->isSigned)
2031 *value2 = op2->__anon1.i64;
2032 else if(op2->kind == 22)
2033 *value2 = (long long)op2->__anon1.ui64;
2034 else if(op2->kind == 2 && op2->type->isSigned)
2035 *value2 = (long long)op2->__anon1.s;
2036 else if(op2->kind == 2)
2037 *value2 = (long long)op2->__anon1.us;
2038 else if(op2->kind == 1 && op2->type->isSigned)
2039 *value2 = (long long)op2->__anon1.c;
2040 else if(op2->kind == 24 || op2->kind == 1)
2041 *value2 = (long long)op2->__anon1.uc;
2042 else if(op2->kind == 6)
2043 *value2 = (long long)op2->__anon1.f;
2044 else if(op2->kind == 7)
2045 *value2 = (long long)op2->__anon1.d;
2046 else if(op2->kind == 13)
2047 *value2 = (long long)op2->__anon1.ui64;
2053 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2055 if(op2->kind == 3 && op2->type->isSigned)
2056 *value2 = (uint64)op2->__anon1.i;
2057 else if(op2->kind == 3)
2058 *value2 = (uint64)op2->__anon1.ui;
2059 else if(op2->kind == 4 && op2->type->isSigned)
2060 *value2 = (uint64)op2->__anon1.i64;
2061 else if(op2->kind == 4)
2062 *value2 = op2->__anon1.ui64;
2063 else if(op2->kind == 23 && op2->type->isSigned)
2064 *value2 = (uint64)op2->__anon1.i64;
2065 else if(op2->kind == 23)
2066 *value2 = op2->__anon1.ui64;
2067 else if(op2->kind == 22 && op2->type->isSigned)
2068 *value2 = (uint64)op2->__anon1.i64;
2069 else if(op2->kind == 22)
2070 *value2 = op2->__anon1.ui64;
2071 else if(op2->kind == 2 && op2->type->isSigned)
2072 *value2 = (uint64)op2->__anon1.s;
2073 else if(op2->kind == 2)
2074 *value2 = (uint64)op2->__anon1.us;
2075 else if(op2->kind == 1 && op2->type->isSigned)
2076 *value2 = (uint64)op2->__anon1.c;
2077 else if(op2->kind == 24 || op2->kind == 1)
2078 *value2 = (uint64)op2->__anon1.uc;
2079 else if(op2->kind == 6)
2080 *value2 = (uint64)op2->__anon1.f;
2081 else if(op2->kind == 7)
2082 *value2 = (uint64)op2->__anon1.d;
2083 else if(op2->kind == 13)
2084 *value2 = op2->__anon1.ui64;
2090 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2092 if(op2->kind == 3 && op2->type->isSigned)
2093 *value2 = (intptr_t)op2->__anon1.i;
2094 else if(op2->kind == 3)
2095 *value2 = (intptr_t)op2->__anon1.ui;
2096 else if(op2->kind == 4 && op2->type->isSigned)
2097 *value2 = (intptr_t)op2->__anon1.i64;
2098 else if(op2->kind == 4)
2099 *value2 = (intptr_t)op2->__anon1.ui64;
2100 else if(op2->kind == 23 && op2->type->isSigned)
2101 *value2 = (intptr_t)op2->__anon1.i64;
2102 else if(op2->kind == 23)
2103 *value2 = (intptr_t)op2->__anon1.ui64;
2104 else if(op2->kind == 22 && op2->type->isSigned)
2105 *value2 = (intptr_t)op2->__anon1.i64;
2106 else if(op2->kind == 22)
2107 *value2 = (intptr_t)op2->__anon1.ui64;
2108 else if(op2->kind == 2 && op2->type->isSigned)
2109 *value2 = (intptr_t)op2->__anon1.s;
2110 else if(op2->kind == 2)
2111 *value2 = (intptr_t)op2->__anon1.us;
2112 else if(op2->kind == 1 && op2->type->isSigned)
2113 *value2 = (intptr_t)op2->__anon1.c;
2114 else if(op2->kind == 24 || op2->kind == 1)
2115 *value2 = (intptr_t)op2->__anon1.uc;
2116 else if(op2->kind == 6)
2117 *value2 = (intptr_t)op2->__anon1.f;
2118 else if(op2->kind == 7)
2119 *value2 = (intptr_t)op2->__anon1.d;
2120 else if(op2->kind == 13)
2121 *value2 = (intptr_t)op2->__anon1.ui64;
2127 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2129 if(op2->kind == 3 && op2->type->isSigned)
2130 *value2 = (uintptr_t)op2->__anon1.i;
2131 else if(op2->kind == 3)
2132 *value2 = (uintptr_t)op2->__anon1.ui;
2133 else if(op2->kind == 4 && op2->type->isSigned)
2134 *value2 = (uintptr_t)op2->__anon1.i64;
2135 else if(op2->kind == 4)
2136 *value2 = (uintptr_t)op2->__anon1.ui64;
2137 else if(op2->kind == 23 && op2->type->isSigned)
2138 *value2 = (uintptr_t)op2->__anon1.i64;
2139 else if(op2->kind == 23)
2140 *value2 = (uintptr_t)op2->__anon1.ui64;
2141 else if(op2->kind == 22 && op2->type->isSigned)
2142 *value2 = (uintptr_t)op2->__anon1.i64;
2143 else if(op2->kind == 22)
2144 *value2 = (uintptr_t)op2->__anon1.ui64;
2145 else if(op2->kind == 2 && op2->type->isSigned)
2146 *value2 = (uintptr_t)op2->__anon1.s;
2147 else if(op2->kind == 2)
2148 *value2 = (uintptr_t)op2->__anon1.us;
2149 else if(op2->kind == 1 && op2->type->isSigned)
2150 *value2 = (uintptr_t)op2->__anon1.c;
2151 else if(op2->kind == 24 || op2->kind == 1)
2152 *value2 = (uintptr_t)op2->__anon1.uc;
2153 else if(op2->kind == 6)
2154 *value2 = (uintptr_t)op2->__anon1.f;
2155 else if(op2->kind == 7)
2156 *value2 = (uintptr_t)op2->__anon1.d;
2157 else if(op2->kind == 13)
2158 *value2 = (uintptr_t)op2->__anon1.ui64;
2164 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2166 if(op2->kind == 3 && op2->type->isSigned)
2167 *value2 = (ssize_t)op2->__anon1.i;
2168 else if(op2->kind == 3)
2169 *value2 = (ssize_t)op2->__anon1.ui;
2170 else if(op2->kind == 4 && op2->type->isSigned)
2171 *value2 = (ssize_t)op2->__anon1.i64;
2172 else if(op2->kind == 4)
2173 *value2 = (ssize_t)op2->__anon1.ui64;
2174 else if(op2->kind == 23 && op2->type->isSigned)
2175 *value2 = (ssize_t)op2->__anon1.i64;
2176 else if(op2->kind == 23)
2177 *value2 = (ssize_t)op2->__anon1.ui64;
2178 else if(op2->kind == 22 && op2->type->isSigned)
2179 *value2 = (ssize_t)op2->__anon1.i64;
2180 else if(op2->kind == 22)
2181 *value2 = (ssize_t)op2->__anon1.ui64;
2182 else if(op2->kind == 2 && op2->type->isSigned)
2183 *value2 = (ssize_t)op2->__anon1.s;
2184 else if(op2->kind == 2)
2185 *value2 = (ssize_t)op2->__anon1.us;
2186 else if(op2->kind == 1 && op2->type->isSigned)
2187 *value2 = (ssize_t)op2->__anon1.c;
2188 else if(op2->kind == 24 || op2->kind == 1)
2189 *value2 = (ssize_t)op2->__anon1.uc;
2190 else if(op2->kind == 6)
2191 *value2 = (ssize_t)op2->__anon1.f;
2192 else if(op2->kind == 7)
2193 *value2 = (ssize_t)op2->__anon1.d;
2194 else if(op2->kind == 13)
2195 *value2 = (ssize_t)op2->__anon1.ui64;
2201 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2203 if(op2->kind == 3 && op2->type->isSigned)
2204 *value2 = (size_t)op2->__anon1.i;
2205 else if(op2->kind == 3)
2206 *value2 = (size_t)op2->__anon1.ui;
2207 else if(op2->kind == 4 && op2->type->isSigned)
2208 *value2 = (size_t)op2->__anon1.i64;
2209 else if(op2->kind == 4)
2210 *value2 = (size_t)op2->__anon1.ui64;
2211 else if(op2->kind == 23 && op2->type->isSigned)
2212 *value2 = (size_t)op2->__anon1.i64;
2213 else if(op2->kind == 23)
2214 *value2 = (size_t)op2->__anon1.ui64;
2215 else if(op2->kind == 22 && op2->type->isSigned)
2216 *value2 = (size_t)op2->__anon1.i64;
2217 else if(op2->kind == 22)
2218 *value2 = (size_t)op2->__anon1.ui64;
2219 else if(op2->kind == 2 && op2->type->isSigned)
2220 *value2 = (size_t)op2->__anon1.s;
2221 else if(op2->kind == 2)
2222 *value2 = (size_t)op2->__anon1.us;
2223 else if(op2->kind == 1 && op2->type->isSigned)
2224 *value2 = (size_t)op2->__anon1.c;
2225 else if(op2->kind == 24 || op2->kind == 1)
2226 *value2 = (size_t)op2->__anon1.uc;
2227 else if(op2->kind == 6)
2228 *value2 = (size_t)op2->__anon1.f;
2229 else if(op2->kind == 7)
2230 *value2 = (size_t)op2->__anon1.d;
2231 else if(op2->kind == 13)
2232 *value2 = (size_t)op2->__anon1.ui64;
2238 unsigned int GetOpShort(struct Operand * op2, short * value2)
2240 if(op2->kind == 3 && op2->type->isSigned)
2241 *value2 = (short)op2->__anon1.i;
2242 else if(op2->kind == 3)
2243 *value2 = (short)op2->__anon1.ui;
2244 else if(op2->kind == 4 && op2->type->isSigned)
2245 *value2 = (short)op2->__anon1.i64;
2246 else if(op2->kind == 4)
2247 *value2 = (short)op2->__anon1.ui64;
2248 else if(op2->kind == 23 && op2->type->isSigned)
2249 *value2 = (short)op2->__anon1.i64;
2250 else if(op2->kind == 23)
2251 *value2 = (short)op2->__anon1.ui64;
2252 else if(op2->kind == 22 && op2->type->isSigned)
2253 *value2 = (short)op2->__anon1.i64;
2254 else if(op2->kind == 22)
2255 *value2 = (short)op2->__anon1.ui64;
2256 else if(op2->kind == 2 && op2->type->isSigned)
2257 *value2 = op2->__anon1.s;
2258 else if(op2->kind == 2)
2259 *value2 = (short)op2->__anon1.us;
2260 else if(op2->kind == 1 && op2->type->isSigned)
2261 *value2 = (short)op2->__anon1.c;
2262 else if(op2->kind == 24 || op2->kind == 1)
2263 *value2 = (short)op2->__anon1.uc;
2264 else if(op2->kind == 6)
2265 *value2 = (short)op2->__anon1.f;
2266 else if(op2->kind == 7)
2267 *value2 = (short)op2->__anon1.d;
2268 else if(op2->kind == 13)
2269 *value2 = (short)op2->__anon1.ui64;
2275 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2277 if(op2->kind == 3 && op2->type->isSigned)
2278 *value2 = (unsigned short)op2->__anon1.i;
2279 else if(op2->kind == 3)
2280 *value2 = (unsigned short)op2->__anon1.ui;
2281 else if(op2->kind == 4 && op2->type->isSigned)
2282 *value2 = (unsigned short)op2->__anon1.i64;
2283 else if(op2->kind == 4)
2284 *value2 = (unsigned short)op2->__anon1.ui64;
2285 else if(op2->kind == 23 && op2->type->isSigned)
2286 *value2 = (unsigned short)op2->__anon1.i64;
2287 else if(op2->kind == 23)
2288 *value2 = (unsigned short)op2->__anon1.ui64;
2289 else if(op2->kind == 22 && op2->type->isSigned)
2290 *value2 = (unsigned short)op2->__anon1.i64;
2291 else if(op2->kind == 22)
2292 *value2 = (unsigned short)op2->__anon1.ui64;
2293 else if(op2->kind == 2 && op2->type->isSigned)
2294 *value2 = (unsigned short)op2->__anon1.s;
2295 else if(op2->kind == 2)
2296 *value2 = op2->__anon1.us;
2297 else if(op2->kind == 1 && op2->type->isSigned)
2298 *value2 = (unsigned short)op2->__anon1.c;
2299 else if(op2->kind == 24 || op2->kind == 1)
2300 *value2 = (unsigned short)op2->__anon1.uc;
2301 else if(op2->kind == 6)
2302 *value2 = (unsigned short)op2->__anon1.f;
2303 else if(op2->kind == 7)
2304 *value2 = (unsigned short)op2->__anon1.d;
2305 else if(op2->kind == 13)
2306 *value2 = (unsigned short)op2->__anon1.ui64;
2312 unsigned int GetOpChar(struct Operand * op2, char * value2)
2314 if(op2->kind == 3 && op2->type->isSigned)
2315 *value2 = (char)op2->__anon1.i;
2316 else if(op2->kind == 3)
2317 *value2 = (char)op2->__anon1.ui;
2318 else if(op2->kind == 4 && op2->type->isSigned)
2319 *value2 = (char)op2->__anon1.i64;
2320 else if(op2->kind == 4)
2321 *value2 = (char)op2->__anon1.ui64;
2322 else if(op2->kind == 23 && op2->type->isSigned)
2323 *value2 = (char)op2->__anon1.i64;
2324 else if(op2->kind == 23)
2325 *value2 = (char)op2->__anon1.ui64;
2326 else if(op2->kind == 22 && op2->type->isSigned)
2327 *value2 = (char)op2->__anon1.i64;
2328 else if(op2->kind == 22)
2329 *value2 = (char)op2->__anon1.ui64;
2330 else if(op2->kind == 2 && op2->type->isSigned)
2331 *value2 = (char)op2->__anon1.s;
2332 else if(op2->kind == 2)
2333 *value2 = (char)op2->__anon1.us;
2334 else if(op2->kind == 1 && op2->type->isSigned)
2335 *value2 = op2->__anon1.c;
2336 else if(op2->kind == 24 || op2->kind == 1)
2337 *value2 = (char)op2->__anon1.uc;
2338 else if(op2->kind == 6)
2339 *value2 = (char)op2->__anon1.f;
2340 else if(op2->kind == 7)
2341 *value2 = (char)op2->__anon1.d;
2342 else if(op2->kind == 13)
2343 *value2 = (char)op2->__anon1.ui64;
2349 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2351 if(op2->kind == 3 && op2->type->isSigned)
2352 *value2 = (unsigned char)op2->__anon1.i;
2353 else if(op2->kind == 3)
2354 *value2 = (unsigned char)op2->__anon1.ui;
2355 else if(op2->kind == 4 && op2->type->isSigned)
2356 *value2 = (unsigned char)op2->__anon1.i64;
2357 else if(op2->kind == 4)
2358 *value2 = (unsigned char)op2->__anon1.ui64;
2359 else if(op2->kind == 23 && op2->type->isSigned)
2360 *value2 = (unsigned char)op2->__anon1.i64;
2361 else if(op2->kind == 23)
2362 *value2 = (unsigned char)op2->__anon1.ui64;
2363 else if(op2->kind == 22 && op2->type->isSigned)
2364 *value2 = (unsigned char)op2->__anon1.i64;
2365 else if(op2->kind == 22)
2366 *value2 = (unsigned char)op2->__anon1.ui64;
2367 else if(op2->kind == 2 && op2->type->isSigned)
2368 *value2 = (unsigned char)op2->__anon1.s;
2369 else if(op2->kind == 2)
2370 *value2 = (unsigned char)op2->__anon1.us;
2371 else if(op2->kind == 1 && op2->type->isSigned)
2372 *value2 = (unsigned char)op2->__anon1.c;
2373 else if(op2->kind == 24 || op2->kind == 1)
2374 *value2 = op2->__anon1.uc;
2375 else if(op2->kind == 6)
2376 *value2 = (unsigned char)op2->__anon1.f;
2377 else if(op2->kind == 7)
2378 *value2 = (unsigned char)op2->__anon1.d;
2379 else if(op2->kind == 13)
2380 *value2 = (unsigned char)op2->__anon1.ui64;
2386 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2388 if(op2->kind == 3 && op2->type->isSigned)
2389 *value2 = (float)(float)op2->__anon1.i;
2390 else if(op2->kind == 3)
2391 *value2 = (float)(float)op2->__anon1.ui;
2392 else if(op2->kind == 4 && op2->type->isSigned)
2393 *value2 = (float)(float)op2->__anon1.i64;
2394 else if(op2->kind == 4)
2395 *value2 = (float)(float)op2->__anon1.ui64;
2396 else if(op2->kind == 23 && op2->type->isSigned)
2397 *value2 = (float)(float)op2->__anon1.i64;
2398 else if(op2->kind == 23)
2399 *value2 = (float)(float)op2->__anon1.ui64;
2400 else if(op2->kind == 22 && op2->type->isSigned)
2401 *value2 = (float)(float)op2->__anon1.i64;
2402 else if(op2->kind == 22)
2403 *value2 = (float)(float)op2->__anon1.ui64;
2404 else if(op2->kind == 2 && op2->type->isSigned)
2405 *value2 = (float)(float)op2->__anon1.s;
2406 else if(op2->kind == 2)
2407 *value2 = (float)(float)op2->__anon1.us;
2408 else if(op2->kind == 1 && op2->type->isSigned)
2409 *value2 = (float)(float)op2->__anon1.c;
2410 else if(op2->kind == 24 || op2->kind == 1)
2411 *value2 = (float)(float)op2->__anon1.uc;
2412 else if(op2->kind == 6)
2413 *value2 = (float)op2->__anon1.f;
2414 else if(op2->kind == 7)
2415 *value2 = (float)op2->__anon1.d;
2416 else if(op2->kind == 13)
2417 *value2 = (float)(float)op2->__anon1.ui64;
2423 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2425 if(op2->kind == 3 && op2->type->isSigned)
2426 *value2 = (double)(double)op2->__anon1.i;
2427 else if(op2->kind == 3)
2428 *value2 = (double)(double)op2->__anon1.ui;
2429 else if(op2->kind == 4 && op2->type->isSigned)
2430 *value2 = (double)(double)op2->__anon1.i64;
2431 else if(op2->kind == 4)
2432 *value2 = (double)(double)op2->__anon1.ui64;
2433 else if(op2->kind == 23 && op2->type->isSigned)
2434 *value2 = (double)(double)op2->__anon1.i64;
2435 else if(op2->kind == 23)
2436 *value2 = (double)(double)op2->__anon1.ui64;
2437 else if(op2->kind == 22 && op2->type->isSigned)
2438 *value2 = (double)(double)op2->__anon1.i64;
2439 else if(op2->kind == 22)
2440 *value2 = (double)(double)op2->__anon1.ui64;
2441 else if(op2->kind == 2 && op2->type->isSigned)
2442 *value2 = (double)(double)op2->__anon1.s;
2443 else if(op2->kind == 2)
2444 *value2 = (double)(double)op2->__anon1.us;
2445 else if(op2->kind == 1 && op2->type->isSigned)
2446 *value2 = (double)(double)op2->__anon1.c;
2447 else if(op2->kind == 24 || op2->kind == 1)
2448 *value2 = (double)(double)op2->__anon1.uc;
2449 else if(op2->kind == 6)
2450 *value2 = (double)op2->__anon1.f;
2451 else if(op2->kind == 7)
2452 *value2 = (double)op2->__anon1.d;
2453 else if(op2->kind == 13)
2454 *value2 = (double)(double)op2->__anon1.ui64;
2460 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2462 int value2 = op2->__anon1.i;
2465 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2468 exp->expType = op1->type;
2470 op1->type->refCount++;
2475 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2477 unsigned int value2 = op2->__anon1.ui;
2480 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2483 exp->expType = op1->type;
2485 op1->type->refCount++;
2490 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2492 long long value2 = op2->__anon1.i64;
2495 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2498 exp->expType = op1->type;
2500 op1->type->refCount++;
2505 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2507 uint64 value2 = op2->__anon1.ui64;
2510 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2513 exp->expType = op1->type;
2515 op1->type->refCount++;
2520 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2522 short value2 = op2->__anon1.s;
2525 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
2528 exp->expType = op1->type;
2530 op1->type->refCount++;
2535 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2537 unsigned short value2 = op2->__anon1.us;
2540 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
2543 exp->expType = op1->type;
2545 op1->type->refCount++;
2550 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2552 char value2 = op2->__anon1.c;
2555 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
2558 exp->expType = op1->type;
2560 op1->type->refCount++;
2565 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2567 unsigned char value2 = op2->__anon1.uc;
2570 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
2573 exp->expType = op1->type;
2575 op1->type->refCount++;
2580 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2582 float value2 = op2->__anon1.f;
2585 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2588 exp->expType = op1->type;
2590 op1->type->refCount++;
2595 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2597 double value2 = op2->__anon1.d;
2600 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2603 exp->expType = op1->type;
2605 op1->type->refCount++;
2610 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2612 int value2 = op2->__anon1.i;
2615 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2618 exp->expType = op1->type;
2620 op1->type->refCount++;
2625 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2627 unsigned int value2 = op2->__anon1.ui;
2630 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2633 exp->expType = op1->type;
2635 op1->type->refCount++;
2640 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2642 long long value2 = op2->__anon1.i64;
2645 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2648 exp->expType = op1->type;
2650 op1->type->refCount++;
2655 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2657 uint64 value2 = op2->__anon1.ui64;
2660 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2663 exp->expType = op1->type;
2665 op1->type->refCount++;
2670 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2672 short value2 = op2->__anon1.s;
2675 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
2678 exp->expType = op1->type;
2680 op1->type->refCount++;
2685 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2687 unsigned short value2 = op2->__anon1.us;
2690 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
2693 exp->expType = op1->type;
2695 op1->type->refCount++;
2700 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2702 char value2 = op2->__anon1.c;
2705 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
2708 exp->expType = op1->type;
2710 op1->type->refCount++;
2715 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2717 unsigned char value2 = op2->__anon1.uc;
2720 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
2723 exp->expType = op1->type;
2725 op1->type->refCount++;
2730 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2732 float value2 = op2->__anon1.f;
2735 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2738 exp->expType = op1->type;
2740 op1->type->refCount++;
2745 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2747 double value2 = op2->__anon1.d;
2750 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2753 exp->expType = op1->type;
2755 op1->type->refCount++;
2760 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2762 int value2 = op2->__anon1.i;
2765 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2768 exp->expType = op1->type;
2770 op1->type->refCount++;
2775 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2777 unsigned int value2 = op2->__anon1.ui;
2780 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2783 exp->expType = op1->type;
2785 op1->type->refCount++;
2790 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2792 long long value2 = op2->__anon1.i64;
2795 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2798 exp->expType = op1->type;
2800 op1->type->refCount++;
2805 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2807 uint64 value2 = op2->__anon1.ui64;
2810 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2813 exp->expType = op1->type;
2815 op1->type->refCount++;
2820 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2822 short value2 = op2->__anon1.s;
2825 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
2828 exp->expType = op1->type;
2830 op1->type->refCount++;
2835 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2837 unsigned short value2 = op2->__anon1.us;
2840 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
2843 exp->expType = op1->type;
2845 op1->type->refCount++;
2850 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2852 char value2 = op2->__anon1.c;
2855 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
2858 exp->expType = op1->type;
2860 op1->type->refCount++;
2865 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2867 unsigned char value2 = op2->__anon1.uc;
2870 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
2873 exp->expType = op1->type;
2875 op1->type->refCount++;
2880 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2882 float value2 = op2->__anon1.f;
2885 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2888 exp->expType = op1->type;
2890 op1->type->refCount++;
2895 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2897 double value2 = op2->__anon1.d;
2900 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2903 exp->expType = op1->type;
2905 op1->type->refCount++;
2910 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2912 int value2 = op2->__anon1.i;
2915 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
2918 exp->expType = op1->type;
2920 op1->type->refCount++;
2925 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2927 unsigned int value2 = op2->__anon1.ui;
2930 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
2933 exp->expType = op1->type;
2935 op1->type->refCount++;
2940 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2942 long long value2 = op2->__anon1.i64;
2945 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
2948 exp->expType = op1->type;
2950 op1->type->refCount++;
2955 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2957 uint64 value2 = op2->__anon1.ui64;
2960 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
2963 exp->expType = op1->type;
2965 op1->type->refCount++;
2970 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2972 short value2 = op2->__anon1.s;
2975 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
2978 exp->expType = op1->type;
2980 op1->type->refCount++;
2985 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2987 unsigned short value2 = op2->__anon1.us;
2990 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
2993 exp->expType = op1->type;
2995 op1->type->refCount++;
3000 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3002 char value2 = op2->__anon1.c;
3005 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
3008 exp->expType = op1->type;
3010 op1->type->refCount++;
3015 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3017 unsigned char value2 = op2->__anon1.uc;
3020 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
3023 exp->expType = op1->type;
3025 op1->type->refCount++;
3030 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3032 float value2 = op2->__anon1.f;
3035 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
3038 exp->expType = op1->type;
3040 op1->type->refCount++;
3045 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3047 double value2 = op2->__anon1.d;
3050 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
3053 exp->expType = op1->type;
3055 op1->type->refCount++;
3060 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3062 int value2 = op2->__anon1.i;
3065 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
3068 exp->expType = op1->type;
3070 op1->type->refCount++;
3075 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3077 unsigned int value2 = op2->__anon1.ui;
3080 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
3083 exp->expType = op1->type;
3085 op1->type->refCount++;
3090 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3092 long long value2 = op2->__anon1.i64;
3095 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
3098 exp->expType = op1->type;
3100 op1->type->refCount++;
3105 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3107 uint64 value2 = op2->__anon1.ui64;
3110 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
3113 exp->expType = op1->type;
3115 op1->type->refCount++;
3120 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3122 short value2 = op2->__anon1.s;
3125 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
3128 exp->expType = op1->type;
3130 op1->type->refCount++;
3135 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3137 unsigned short value2 = op2->__anon1.us;
3140 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
3143 exp->expType = op1->type;
3145 op1->type->refCount++;
3150 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3152 char value2 = op2->__anon1.c;
3155 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
3158 exp->expType = op1->type;
3160 op1->type->refCount++;
3165 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3167 unsigned char value2 = op2->__anon1.uc;
3170 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
3173 exp->expType = op1->type;
3175 op1->type->refCount++;
3180 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3183 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3186 exp->expType = op1->type;
3188 op1->type->refCount++;
3193 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3196 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3199 exp->expType = op1->type;
3201 op1->type->refCount++;
3206 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3209 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3212 exp->expType = op1->type;
3214 op1->type->refCount++;
3219 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3222 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3225 exp->expType = op1->type;
3227 op1->type->refCount++;
3232 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3235 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3238 exp->expType = op1->type;
3240 op1->type->refCount++;
3245 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3248 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3251 exp->expType = op1->type;
3253 op1->type->refCount++;
3258 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3261 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3264 exp->expType = op1->type;
3266 op1->type->refCount++;
3271 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3274 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3277 exp->expType = op1->type;
3279 op1->type->refCount++;
3284 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3287 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3290 exp->expType = op1->type;
3292 op1->type->refCount++;
3297 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3300 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3303 exp->expType = op1->type;
3305 op1->type->refCount++;
3310 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3313 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3316 exp->expType = op1->type;
3318 op1->type->refCount++;
3323 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3326 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3329 exp->expType = op1->type;
3331 op1->type->refCount++;
3336 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3339 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3342 exp->expType = op1->type;
3344 op1->type->refCount++;
3349 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3352 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3355 exp->expType = op1->type;
3357 op1->type->refCount++;
3362 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3365 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3368 exp->expType = op1->type;
3370 op1->type->refCount++;
3375 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3378 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3381 exp->expType = op1->type;
3383 op1->type->refCount++;
3388 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3391 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3394 exp->expType = op1->type;
3396 op1->type->refCount++;
3401 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3404 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3407 exp->expType = op1->type;
3409 op1->type->refCount++;
3414 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3417 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3420 exp->expType = op1->type;
3422 op1->type->refCount++;
3427 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3430 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3433 exp->expType = op1->type;
3435 op1->type->refCount++;
3440 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3443 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3446 exp->expType = op1->type;
3448 op1->type->refCount++;
3453 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3456 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3459 exp->expType = op1->type;
3461 op1->type->refCount++;
3466 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3469 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3472 exp->expType = op1->type;
3474 op1->type->refCount++;
3479 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3482 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3485 exp->expType = op1->type;
3487 op1->type->refCount++;
3492 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3495 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3498 exp->expType = op1->type;
3500 op1->type->refCount++;
3505 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3508 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3511 exp->expType = op1->type;
3513 op1->type->refCount++;
3518 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3521 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3524 exp->expType = op1->type;
3526 op1->type->refCount++;
3531 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3534 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3537 exp->expType = op1->type;
3539 op1->type->refCount++;
3544 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3547 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3550 exp->expType = op1->type;
3552 op1->type->refCount++;
3557 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3560 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3563 exp->expType = op1->type;
3565 op1->type->refCount++;
3570 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3572 int value2 = op2->__anon1.i;
3575 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3578 exp->expType = op1->type;
3580 op1->type->refCount++;
3585 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3587 unsigned int value2 = op2->__anon1.ui;
3590 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3593 exp->expType = op1->type;
3595 op1->type->refCount++;
3600 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3602 long long value2 = op2->__anon1.i64;
3605 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3608 exp->expType = op1->type;
3610 op1->type->refCount++;
3615 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3617 uint64 value2 = op2->__anon1.ui64;
3620 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3623 exp->expType = op1->type;
3625 op1->type->refCount++;
3630 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3632 short value2 = op2->__anon1.s;
3635 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3638 exp->expType = op1->type;
3640 op1->type->refCount++;
3645 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3647 unsigned short value2 = op2->__anon1.us;
3650 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3653 exp->expType = op1->type;
3655 op1->type->refCount++;
3660 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3662 char value2 = op2->__anon1.c;
3665 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3668 exp->expType = op1->type;
3670 op1->type->refCount++;
3675 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3677 unsigned char value2 = op2->__anon1.uc;
3680 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3683 exp->expType = op1->type;
3685 op1->type->refCount++;
3690 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3692 float value2 = op2->__anon1.f;
3695 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3698 exp->expType = op1->type;
3700 op1->type->refCount++;
3705 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3707 double value2 = op2->__anon1.d;
3710 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3713 exp->expType = op1->type;
3715 op1->type->refCount++;
3720 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3722 int value2 = op2->__anon1.i;
3725 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3728 exp->expType = op1->type;
3730 op1->type->refCount++;
3735 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3737 unsigned int value2 = op2->__anon1.ui;
3740 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3743 exp->expType = op1->type;
3745 op1->type->refCount++;
3750 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3752 long long value2 = op2->__anon1.i64;
3755 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3758 exp->expType = op1->type;
3760 op1->type->refCount++;
3765 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3767 uint64 value2 = op2->__anon1.ui64;
3770 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3773 exp->expType = op1->type;
3775 op1->type->refCount++;
3780 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3782 short value2 = op2->__anon1.s;
3785 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3788 exp->expType = op1->type;
3790 op1->type->refCount++;
3795 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3797 unsigned short value2 = op2->__anon1.us;
3800 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3803 exp->expType = op1->type;
3805 op1->type->refCount++;
3810 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3812 char value2 = op2->__anon1.c;
3815 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3818 exp->expType = op1->type;
3820 op1->type->refCount++;
3825 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3827 unsigned char value2 = op2->__anon1.uc;
3830 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3833 exp->expType = op1->type;
3835 op1->type->refCount++;
3840 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3842 float value2 = op2->__anon1.f;
3845 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3848 exp->expType = op1->type;
3850 op1->type->refCount++;
3855 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3857 double value2 = op2->__anon1.d;
3860 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3863 exp->expType = op1->type;
3865 op1->type->refCount++;
3870 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3872 int value2 = op2->__anon1.i;
3875 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3878 exp->expType = op1->type;
3880 op1->type->refCount++;
3885 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3887 unsigned int value2 = op2->__anon1.ui;
3890 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3893 exp->expType = op1->type;
3895 op1->type->refCount++;
3900 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3902 long long value2 = op2->__anon1.i64;
3905 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3908 exp->expType = op1->type;
3910 op1->type->refCount++;
3915 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3917 uint64 value2 = op2->__anon1.ui64;
3920 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3923 exp->expType = op1->type;
3925 op1->type->refCount++;
3930 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3932 short value2 = op2->__anon1.s;
3935 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3938 exp->expType = op1->type;
3940 op1->type->refCount++;
3945 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3947 unsigned short value2 = op2->__anon1.us;
3950 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3953 exp->expType = op1->type;
3955 op1->type->refCount++;
3960 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3962 char value2 = op2->__anon1.c;
3965 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3968 exp->expType = op1->type;
3970 op1->type->refCount++;
3975 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3977 unsigned char value2 = op2->__anon1.uc;
3980 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3983 exp->expType = op1->type;
3985 op1->type->refCount++;
3990 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3992 float value2 = op2->__anon1.f;
3995 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
3998 exp->expType = op1->type;
4000 op1->type->refCount++;
4005 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4007 double value2 = op2->__anon1.d;
4010 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4013 exp->expType = op1->type;
4015 op1->type->refCount++;
4020 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4022 int value2 = op2->__anon1.i;
4025 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4028 exp->expType = op1->type;
4030 op1->type->refCount++;
4035 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4037 unsigned int value2 = op2->__anon1.ui;
4040 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4043 exp->expType = op1->type;
4045 op1->type->refCount++;
4050 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4052 long long value2 = op2->__anon1.i64;
4055 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4058 exp->expType = op1->type;
4060 op1->type->refCount++;
4065 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4067 uint64 value2 = op2->__anon1.ui64;
4070 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4073 exp->expType = op1->type;
4075 op1->type->refCount++;
4080 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4082 short value2 = op2->__anon1.s;
4085 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4088 exp->expType = op1->type;
4090 op1->type->refCount++;
4095 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4097 unsigned short value2 = op2->__anon1.us;
4100 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4103 exp->expType = op1->type;
4105 op1->type->refCount++;
4110 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4112 char value2 = op2->__anon1.c;
4115 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4118 exp->expType = op1->type;
4120 op1->type->refCount++;
4125 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4127 unsigned char value2 = op2->__anon1.uc;
4130 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4133 exp->expType = op1->type;
4135 op1->type->refCount++;
4140 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4142 float value2 = op2->__anon1.f;
4145 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4148 exp->expType = op1->type;
4150 op1->type->refCount++;
4155 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4157 double value2 = op2->__anon1.d;
4160 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4163 exp->expType = op1->type;
4165 op1->type->refCount++;
4170 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4172 int value2 = op2->__anon1.i;
4175 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
4178 exp->expType = op1->type;
4180 op1->type->refCount++;
4185 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4187 unsigned int value2 = op2->__anon1.ui;
4190 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
4193 exp->expType = op1->type;
4195 op1->type->refCount++;
4200 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4202 long long value2 = op2->__anon1.i64;
4205 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
4208 exp->expType = op1->type;
4210 op1->type->refCount++;
4215 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4217 uint64 value2 = op2->__anon1.ui64;
4220 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
4223 exp->expType = op1->type;
4225 op1->type->refCount++;
4230 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4232 short value2 = op2->__anon1.s;
4235 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
4238 exp->expType = op1->type;
4240 op1->type->refCount++;
4245 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4247 unsigned short value2 = op2->__anon1.us;
4250 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
4253 exp->expType = op1->type;
4255 op1->type->refCount++;
4260 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4262 char value2 = op2->__anon1.c;
4265 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
4268 exp->expType = op1->type;
4270 op1->type->refCount++;
4275 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4277 unsigned char value2 = op2->__anon1.uc;
4280 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
4283 exp->expType = op1->type;
4285 op1->type->refCount++;
4290 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4292 float value2 = op2->__anon1.f;
4295 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
4298 exp->expType = op1->type;
4300 op1->type->refCount++;
4305 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4307 double value2 = op2->__anon1.d;
4310 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
4313 exp->expType = op1->type;
4315 op1->type->refCount++;
4320 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4322 int value2 = op2->__anon1.i;
4325 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
4328 exp->expType = op1->type;
4330 op1->type->refCount++;
4335 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4337 unsigned int value2 = op2->__anon1.ui;
4340 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
4343 exp->expType = op1->type;
4345 op1->type->refCount++;
4350 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4352 long long value2 = op2->__anon1.i64;
4355 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
4358 exp->expType = op1->type;
4360 op1->type->refCount++;
4365 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4367 uint64 value2 = op2->__anon1.ui64;
4370 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
4373 exp->expType = op1->type;
4375 op1->type->refCount++;
4380 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4382 short value2 = op2->__anon1.s;
4385 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
4388 exp->expType = op1->type;
4390 op1->type->refCount++;
4395 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4397 unsigned short value2 = op2->__anon1.us;
4400 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
4403 exp->expType = op1->type;
4405 op1->type->refCount++;
4410 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4412 char value2 = op2->__anon1.c;
4415 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
4418 exp->expType = op1->type;
4420 op1->type->refCount++;
4425 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4427 unsigned char value2 = op2->__anon1.uc;
4430 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
4433 exp->expType = op1->type;
4435 op1->type->refCount++;
4440 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4442 int value2 = op2->__anon1.i;
4445 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4448 exp->expType = op1->type;
4450 op1->type->refCount++;
4455 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4457 unsigned int value2 = op2->__anon1.ui;
4460 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4463 exp->expType = op1->type;
4465 op1->type->refCount++;
4470 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4472 long long value2 = op2->__anon1.i64;
4475 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4478 exp->expType = op1->type;
4480 op1->type->refCount++;
4485 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4487 uint64 value2 = op2->__anon1.ui64;
4490 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4493 exp->expType = op1->type;
4495 op1->type->refCount++;
4500 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4502 short value2 = op2->__anon1.s;
4505 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
4508 exp->expType = op1->type;
4510 op1->type->refCount++;
4515 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4517 unsigned short value2 = op2->__anon1.us;
4520 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
4523 exp->expType = op1->type;
4525 op1->type->refCount++;
4530 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4532 char value2 = op2->__anon1.c;
4535 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
4538 exp->expType = op1->type;
4540 op1->type->refCount++;
4545 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4547 unsigned char value2 = op2->__anon1.uc;
4550 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
4553 exp->expType = op1->type;
4555 op1->type->refCount++;
4560 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4562 int value2 = op2->__anon1.i;
4565 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4568 exp->expType = op1->type;
4570 op1->type->refCount++;
4575 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4577 unsigned int value2 = op2->__anon1.ui;
4580 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4583 exp->expType = op1->type;
4585 op1->type->refCount++;
4590 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4592 long long value2 = op2->__anon1.i64;
4595 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4598 exp->expType = op1->type;
4600 op1->type->refCount++;
4605 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4607 uint64 value2 = op2->__anon1.ui64;
4610 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4613 exp->expType = op1->type;
4615 op1->type->refCount++;
4620 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4622 short value2 = op2->__anon1.s;
4625 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
4628 exp->expType = op1->type;
4630 op1->type->refCount++;
4635 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4637 unsigned short value2 = op2->__anon1.us;
4640 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
4643 exp->expType = op1->type;
4645 op1->type->refCount++;
4650 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4652 char value2 = op2->__anon1.c;
4655 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
4658 exp->expType = op1->type;
4660 op1->type->refCount++;
4665 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4667 unsigned char value2 = op2->__anon1.uc;
4670 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
4673 exp->expType = op1->type;
4675 op1->type->refCount++;
4680 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4682 int value2 = op2->__anon1.i;
4685 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4688 exp->expType = op1->type;
4690 op1->type->refCount++;
4695 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4697 unsigned int value2 = op2->__anon1.ui;
4700 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4703 exp->expType = op1->type;
4705 op1->type->refCount++;
4710 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4712 long long value2 = op2->__anon1.i64;
4715 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4718 exp->expType = op1->type;
4720 op1->type->refCount++;
4725 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4727 uint64 value2 = op2->__anon1.ui64;
4730 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4733 exp->expType = op1->type;
4735 op1->type->refCount++;
4740 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4742 short value2 = op2->__anon1.s;
4745 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
4748 exp->expType = op1->type;
4750 op1->type->refCount++;
4755 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4757 unsigned short value2 = op2->__anon1.us;
4760 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
4763 exp->expType = op1->type;
4765 op1->type->refCount++;
4770 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4772 char value2 = op2->__anon1.c;
4775 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
4778 exp->expType = op1->type;
4780 op1->type->refCount++;
4785 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4787 unsigned char value2 = op2->__anon1.uc;
4790 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
4793 exp->expType = op1->type;
4795 op1->type->refCount++;
4800 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4802 int value2 = op2->__anon1.i;
4805 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4808 exp->expType = op1->type;
4810 op1->type->refCount++;
4815 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4817 unsigned int value2 = op2->__anon1.ui;
4820 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4823 exp->expType = op1->type;
4825 op1->type->refCount++;
4830 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4832 long long value2 = op2->__anon1.i64;
4835 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4838 exp->expType = op1->type;
4840 op1->type->refCount++;
4845 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4847 uint64 value2 = op2->__anon1.ui64;
4850 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4853 exp->expType = op1->type;
4855 op1->type->refCount++;
4860 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4862 short value2 = op2->__anon1.s;
4865 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
4868 exp->expType = op1->type;
4870 op1->type->refCount++;
4875 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4877 unsigned short value2 = op2->__anon1.us;
4880 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
4883 exp->expType = op1->type;
4885 op1->type->refCount++;
4890 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4892 char value2 = op2->__anon1.c;
4895 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
4898 exp->expType = op1->type;
4900 op1->type->refCount++;
4905 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4907 unsigned char value2 = op2->__anon1.uc;
4910 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
4913 exp->expType = op1->type;
4915 op1->type->refCount++;
4920 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4922 int value2 = op2->__anon1.i;
4925 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4928 exp->expType = op1->type;
4930 op1->type->refCount++;
4935 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4937 unsigned int value2 = op2->__anon1.ui;
4940 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4943 exp->expType = op1->type;
4945 op1->type->refCount++;
4950 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4952 long long value2 = op2->__anon1.i64;
4955 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4958 exp->expType = op1->type;
4960 op1->type->refCount++;
4965 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4967 uint64 value2 = op2->__anon1.ui64;
4970 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4973 exp->expType = op1->type;
4975 op1->type->refCount++;
4980 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4982 short value2 = op2->__anon1.s;
4985 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
4988 exp->expType = op1->type;
4990 op1->type->refCount++;
4995 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4997 unsigned short value2 = op2->__anon1.us;
5000 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
5003 exp->expType = op1->type;
5005 op1->type->refCount++;
5010 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5012 char value2 = op2->__anon1.c;
5015 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
5018 exp->expType = op1->type;
5020 op1->type->refCount++;
5025 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5027 unsigned char value2 = op2->__anon1.uc;
5030 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
5033 exp->expType = op1->type;
5035 op1->type->refCount++;
5040 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5043 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5046 exp->expType = op1->type;
5048 op1->type->refCount++;
5053 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5056 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5059 exp->expType = op1->type;
5061 op1->type->refCount++;
5066 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5069 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5072 exp->expType = op1->type;
5074 op1->type->refCount++;
5079 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5082 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5085 exp->expType = op1->type;
5087 op1->type->refCount++;
5092 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5095 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5098 exp->expType = op1->type;
5100 op1->type->refCount++;
5105 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5108 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5111 exp->expType = op1->type;
5113 op1->type->refCount++;
5118 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5121 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5124 exp->expType = op1->type;
5126 op1->type->refCount++;
5131 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5134 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5137 exp->expType = op1->type;
5139 op1->type->refCount++;
5144 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5146 int value2 = op2->__anon1.i;
5149 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5152 exp->expType = op1->type;
5154 op1->type->refCount++;
5159 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5161 unsigned int value2 = op2->__anon1.ui;
5164 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5167 exp->expType = op1->type;
5169 op1->type->refCount++;
5174 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5176 long long value2 = op2->__anon1.i64;
5179 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5182 exp->expType = op1->type;
5184 op1->type->refCount++;
5189 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5191 uint64 value2 = op2->__anon1.ui64;
5194 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5197 exp->expType = op1->type;
5199 op1->type->refCount++;
5204 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5206 short value2 = op2->__anon1.s;
5209 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5212 exp->expType = op1->type;
5214 op1->type->refCount++;
5219 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5221 unsigned short value2 = op2->__anon1.us;
5224 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5227 exp->expType = op1->type;
5229 op1->type->refCount++;
5234 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5236 char value2 = op2->__anon1.c;
5239 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5242 exp->expType = op1->type;
5244 op1->type->refCount++;
5249 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5251 unsigned char value2 = op2->__anon1.uc;
5254 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5257 exp->expType = op1->type;
5259 op1->type->refCount++;
5264 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5266 int value2 = op2->__anon1.i;
5269 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5272 exp->expType = op1->type;
5274 op1->type->refCount++;
5279 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5281 unsigned int value2 = op2->__anon1.ui;
5284 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5287 exp->expType = op1->type;
5289 op1->type->refCount++;
5294 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5296 long long value2 = op2->__anon1.i64;
5299 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5302 exp->expType = op1->type;
5304 op1->type->refCount++;
5309 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5311 uint64 value2 = op2->__anon1.ui64;
5314 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5317 exp->expType = op1->type;
5319 op1->type->refCount++;
5324 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5326 short value2 = op2->__anon1.s;
5329 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5332 exp->expType = op1->type;
5334 op1->type->refCount++;
5339 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5341 unsigned short value2 = op2->__anon1.us;
5344 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5347 exp->expType = op1->type;
5349 op1->type->refCount++;
5354 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5356 char value2 = op2->__anon1.c;
5359 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5362 exp->expType = op1->type;
5364 op1->type->refCount++;
5369 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5371 unsigned char value2 = op2->__anon1.uc;
5374 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5377 exp->expType = op1->type;
5379 op1->type->refCount++;
5384 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5386 int value2 = op2->__anon1.i;
5389 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5392 exp->expType = op1->type;
5394 op1->type->refCount++;
5399 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5401 unsigned int value2 = op2->__anon1.ui;
5404 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5407 exp->expType = op1->type;
5409 op1->type->refCount++;
5414 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5416 long long value2 = op2->__anon1.i64;
5419 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5422 exp->expType = op1->type;
5424 op1->type->refCount++;
5429 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5431 uint64 value2 = op2->__anon1.ui64;
5434 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5437 exp->expType = op1->type;
5439 op1->type->refCount++;
5444 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5446 short value2 = op2->__anon1.s;
5449 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5452 exp->expType = op1->type;
5454 op1->type->refCount++;
5459 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5461 unsigned short value2 = op2->__anon1.us;
5464 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5467 exp->expType = op1->type;
5469 op1->type->refCount++;
5474 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5476 char value2 = op2->__anon1.c;
5479 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5482 exp->expType = op1->type;
5484 op1->type->refCount++;
5489 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5491 unsigned char value2 = op2->__anon1.uc;
5494 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5497 exp->expType = op1->type;
5499 op1->type->refCount++;
5504 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5506 int value2 = op2->__anon1.i;
5509 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5512 exp->expType = op1->type;
5514 op1->type->refCount++;
5519 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5521 unsigned int value2 = op2->__anon1.ui;
5524 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5527 exp->expType = op1->type;
5529 op1->type->refCount++;
5534 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5536 long long value2 = op2->__anon1.i64;
5539 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5542 exp->expType = op1->type;
5544 op1->type->refCount++;
5549 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5551 uint64 value2 = op2->__anon1.ui64;
5554 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5557 exp->expType = op1->type;
5559 op1->type->refCount++;
5564 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5566 short value2 = op2->__anon1.s;
5569 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5572 exp->expType = op1->type;
5574 op1->type->refCount++;
5579 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5581 unsigned short value2 = op2->__anon1.us;
5584 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5587 exp->expType = op1->type;
5589 op1->type->refCount++;
5594 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5596 char value2 = op2->__anon1.c;
5599 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5602 exp->expType = op1->type;
5604 op1->type->refCount++;
5609 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5611 unsigned char value2 = op2->__anon1.uc;
5614 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5617 exp->expType = op1->type;
5619 op1->type->refCount++;
5624 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5626 int value2 = op2->__anon1.i;
5629 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5632 exp->expType = op1->type;
5634 op1->type->refCount++;
5639 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5641 unsigned int value2 = op2->__anon1.ui;
5644 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5647 exp->expType = op1->type;
5649 op1->type->refCount++;
5654 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5656 long long value2 = op2->__anon1.i64;
5659 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5662 exp->expType = op1->type;
5664 op1->type->refCount++;
5669 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5671 uint64 value2 = op2->__anon1.ui64;
5674 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5677 exp->expType = op1->type;
5679 op1->type->refCount++;
5684 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5686 short value2 = op2->__anon1.s;
5689 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5692 exp->expType = op1->type;
5694 op1->type->refCount++;
5699 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5701 unsigned short value2 = op2->__anon1.us;
5704 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5707 exp->expType = op1->type;
5709 op1->type->refCount++;
5714 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5716 char value2 = op2->__anon1.c;
5719 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5722 exp->expType = op1->type;
5724 op1->type->refCount++;
5729 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5731 unsigned char value2 = op2->__anon1.uc;
5734 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5737 exp->expType = op1->type;
5739 op1->type->refCount++;
5744 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5747 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5750 exp->expType = op1->type;
5752 op1->type->refCount++;
5757 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5760 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5763 exp->expType = op1->type;
5765 op1->type->refCount++;
5770 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5773 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5776 exp->expType = op1->type;
5778 op1->type->refCount++;
5783 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5786 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5789 exp->expType = op1->type;
5791 op1->type->refCount++;
5796 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5799 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5802 exp->expType = op1->type;
5804 op1->type->refCount++;
5809 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5812 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5815 exp->expType = op1->type;
5817 op1->type->refCount++;
5822 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5825 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5828 exp->expType = op1->type;
5830 op1->type->refCount++;
5835 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5838 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5841 exp->expType = op1->type;
5843 op1->type->refCount++;
5848 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5850 int value2 = op2->__anon1.i;
5853 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5856 exp->expType = op1->type;
5858 op1->type->refCount++;
5863 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5865 unsigned int value2 = op2->__anon1.ui;
5868 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5871 exp->expType = op1->type;
5873 op1->type->refCount++;
5878 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5880 long long value2 = op2->__anon1.i64;
5883 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5886 exp->expType = op1->type;
5888 op1->type->refCount++;
5893 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5895 uint64 value2 = op2->__anon1.ui64;
5898 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5901 exp->expType = op1->type;
5903 op1->type->refCount++;
5908 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5910 short value2 = op2->__anon1.s;
5913 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5916 exp->expType = op1->type;
5918 op1->type->refCount++;
5923 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5925 unsigned short value2 = op2->__anon1.us;
5928 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5931 exp->expType = op1->type;
5933 op1->type->refCount++;
5938 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5940 char value2 = op2->__anon1.c;
5943 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5946 exp->expType = op1->type;
5948 op1->type->refCount++;
5953 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5955 unsigned char value2 = op2->__anon1.uc;
5958 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5961 exp->expType = op1->type;
5963 op1->type->refCount++;
5968 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5970 float value2 = op2->__anon1.f;
5973 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5976 exp->expType = op1->type;
5978 op1->type->refCount++;
5983 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5985 double value2 = op2->__anon1.d;
5988 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5991 exp->expType = op1->type;
5993 op1->type->refCount++;
5998 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6000 int value2 = op2->__anon1.i;
6003 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6006 exp->expType = op1->type;
6008 op1->type->refCount++;
6013 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6015 unsigned int value2 = op2->__anon1.ui;
6018 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6021 exp->expType = op1->type;
6023 op1->type->refCount++;
6028 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6030 long long value2 = op2->__anon1.i64;
6033 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6036 exp->expType = op1->type;
6038 op1->type->refCount++;
6043 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6045 uint64 value2 = op2->__anon1.ui64;
6048 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6051 exp->expType = op1->type;
6053 op1->type->refCount++;
6058 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6060 short value2 = op2->__anon1.s;
6063 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6066 exp->expType = op1->type;
6068 op1->type->refCount++;
6073 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6075 unsigned short value2 = op2->__anon1.us;
6078 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6081 exp->expType = op1->type;
6083 op1->type->refCount++;
6088 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6090 char value2 = op2->__anon1.c;
6093 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6096 exp->expType = op1->type;
6098 op1->type->refCount++;
6103 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6105 unsigned char value2 = op2->__anon1.uc;
6108 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6111 exp->expType = op1->type;
6113 op1->type->refCount++;
6118 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6120 float value2 = op2->__anon1.f;
6123 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6126 exp->expType = op1->type;
6128 op1->type->refCount++;
6133 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6135 double value2 = op2->__anon1.d;
6138 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6141 exp->expType = op1->type;
6143 op1->type->refCount++;
6148 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6150 int value2 = op2->__anon1.i;
6153 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6156 exp->expType = op1->type;
6158 op1->type->refCount++;
6163 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6165 unsigned int value2 = op2->__anon1.ui;
6168 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6171 exp->expType = op1->type;
6173 op1->type->refCount++;
6178 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6180 long long value2 = op2->__anon1.i64;
6183 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6186 exp->expType = op1->type;
6188 op1->type->refCount++;
6193 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6195 uint64 value2 = op2->__anon1.ui64;
6198 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6201 exp->expType = op1->type;
6203 op1->type->refCount++;
6208 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6210 short value2 = op2->__anon1.s;
6213 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6216 exp->expType = op1->type;
6218 op1->type->refCount++;
6223 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6225 unsigned short value2 = op2->__anon1.us;
6228 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6231 exp->expType = op1->type;
6233 op1->type->refCount++;
6238 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6240 char value2 = op2->__anon1.c;
6243 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6246 exp->expType = op1->type;
6248 op1->type->refCount++;
6253 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6255 unsigned char value2 = op2->__anon1.uc;
6258 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6261 exp->expType = op1->type;
6263 op1->type->refCount++;
6268 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6270 float value2 = op2->__anon1.f;
6273 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6276 exp->expType = op1->type;
6278 op1->type->refCount++;
6283 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6285 double value2 = op2->__anon1.d;
6288 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6291 exp->expType = op1->type;
6293 op1->type->refCount++;
6298 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6300 int value2 = op2->__anon1.i;
6303 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6306 exp->expType = op1->type;
6308 op1->type->refCount++;
6313 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6315 unsigned int value2 = op2->__anon1.ui;
6318 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6321 exp->expType = op1->type;
6323 op1->type->refCount++;
6328 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6330 long long value2 = op2->__anon1.i64;
6333 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6336 exp->expType = op1->type;
6338 op1->type->refCount++;
6343 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6345 uint64 value2 = op2->__anon1.ui64;
6348 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6351 exp->expType = op1->type;
6353 op1->type->refCount++;
6358 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6360 short value2 = op2->__anon1.s;
6363 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6366 exp->expType = op1->type;
6368 op1->type->refCount++;
6373 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6375 unsigned short value2 = op2->__anon1.us;
6378 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6381 exp->expType = op1->type;
6383 op1->type->refCount++;
6388 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6390 char value2 = op2->__anon1.c;
6393 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6396 exp->expType = op1->type;
6398 op1->type->refCount++;
6403 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6405 unsigned char value2 = op2->__anon1.uc;
6408 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6411 exp->expType = op1->type;
6413 op1->type->refCount++;
6418 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6420 float value2 = op2->__anon1.f;
6423 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6426 exp->expType = op1->type;
6428 op1->type->refCount++;
6433 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6435 double value2 = op2->__anon1.d;
6438 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6441 exp->expType = op1->type;
6443 op1->type->refCount++;
6448 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6450 int value2 = op2->__anon1.i;
6453 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6456 exp->expType = op1->type;
6458 op1->type->refCount++;
6463 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6465 unsigned int value2 = op2->__anon1.ui;
6468 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6471 exp->expType = op1->type;
6473 op1->type->refCount++;
6478 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6480 long long value2 = op2->__anon1.i64;
6483 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6486 exp->expType = op1->type;
6488 op1->type->refCount++;
6493 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6495 uint64 value2 = op2->__anon1.ui64;
6498 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6501 exp->expType = op1->type;
6503 op1->type->refCount++;
6508 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6510 short value2 = op2->__anon1.s;
6513 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6516 exp->expType = op1->type;
6518 op1->type->refCount++;
6523 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6525 unsigned short value2 = op2->__anon1.us;
6528 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6531 exp->expType = op1->type;
6533 op1->type->refCount++;
6538 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6540 char value2 = op2->__anon1.c;
6543 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6546 exp->expType = op1->type;
6548 op1->type->refCount++;
6553 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6555 unsigned char value2 = op2->__anon1.uc;
6558 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6561 exp->expType = op1->type;
6563 op1->type->refCount++;
6568 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6570 float value2 = op2->__anon1.f;
6573 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6576 exp->expType = op1->type;
6578 op1->type->refCount++;
6583 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6585 double value2 = op2->__anon1.d;
6588 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6591 exp->expType = op1->type;
6593 op1->type->refCount++;
6598 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6600 int value2 = op2->__anon1.i;
6603 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6606 exp->expType = op1->type;
6608 op1->type->refCount++;
6613 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6615 unsigned int value2 = op2->__anon1.ui;
6618 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6621 exp->expType = op1->type;
6623 op1->type->refCount++;
6628 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6630 long long value2 = op2->__anon1.i64;
6633 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6636 exp->expType = op1->type;
6638 op1->type->refCount++;
6643 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6645 uint64 value2 = op2->__anon1.ui64;
6648 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6651 exp->expType = op1->type;
6653 op1->type->refCount++;
6658 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6660 short value2 = op2->__anon1.s;
6663 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6666 exp->expType = op1->type;
6668 op1->type->refCount++;
6673 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6675 unsigned short value2 = op2->__anon1.us;
6678 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6681 exp->expType = op1->type;
6683 op1->type->refCount++;
6688 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6690 char value2 = op2->__anon1.c;
6693 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6696 exp->expType = op1->type;
6698 op1->type->refCount++;
6703 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6705 unsigned char value2 = op2->__anon1.uc;
6708 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6711 exp->expType = op1->type;
6713 op1->type->refCount++;
6718 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6720 float value2 = op2->__anon1.f;
6723 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6726 exp->expType = op1->type;
6728 op1->type->refCount++;
6733 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6735 double value2 = op2->__anon1.d;
6738 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6741 exp->expType = op1->type;
6743 op1->type->refCount++;
6748 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6750 int value2 = op2->__anon1.i;
6753 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6756 exp->expType = op1->type;
6758 op1->type->refCount++;
6763 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6765 unsigned int value2 = op2->__anon1.ui;
6768 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6771 exp->expType = op1->type;
6773 op1->type->refCount++;
6778 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6780 long long value2 = op2->__anon1.i64;
6783 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6786 exp->expType = op1->type;
6788 op1->type->refCount++;
6793 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6795 uint64 value2 = op2->__anon1.ui64;
6798 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6801 exp->expType = op1->type;
6803 op1->type->refCount++;
6808 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6810 short value2 = op2->__anon1.s;
6813 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6816 exp->expType = op1->type;
6818 op1->type->refCount++;
6823 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6825 unsigned short value2 = op2->__anon1.us;
6828 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6831 exp->expType = op1->type;
6833 op1->type->refCount++;
6838 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6840 char value2 = op2->__anon1.c;
6843 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6846 exp->expType = op1->type;
6848 op1->type->refCount++;
6853 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6855 unsigned char value2 = op2->__anon1.uc;
6858 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6861 exp->expType = op1->type;
6863 op1->type->refCount++;
6868 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6870 float value2 = op2->__anon1.f;
6873 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6876 exp->expType = op1->type;
6878 op1->type->refCount++;
6883 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6885 double value2 = op2->__anon1.d;
6888 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6891 exp->expType = op1->type;
6893 op1->type->refCount++;
6898 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6900 int value2 = op2->__anon1.i;
6903 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6906 exp->expType = op1->type;
6908 op1->type->refCount++;
6913 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6915 unsigned int value2 = op2->__anon1.ui;
6918 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6921 exp->expType = op1->type;
6923 op1->type->refCount++;
6928 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6930 long long value2 = op2->__anon1.i64;
6933 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6936 exp->expType = op1->type;
6938 op1->type->refCount++;
6943 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6945 uint64 value2 = op2->__anon1.ui64;
6948 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6951 exp->expType = op1->type;
6953 op1->type->refCount++;
6958 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6960 short value2 = op2->__anon1.s;
6963 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6966 exp->expType = op1->type;
6968 op1->type->refCount++;
6973 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6975 unsigned short value2 = op2->__anon1.us;
6978 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6981 exp->expType = op1->type;
6983 op1->type->refCount++;
6988 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6990 char value2 = op2->__anon1.c;
6993 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
6996 exp->expType = op1->type;
6998 op1->type->refCount++;
7003 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7005 unsigned char value2 = op2->__anon1.uc;
7008 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7011 exp->expType = op1->type;
7013 op1->type->refCount++;
7018 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7020 float value2 = op2->__anon1.f;
7023 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7026 exp->expType = op1->type;
7028 op1->type->refCount++;
7033 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7035 double value2 = op2->__anon1.d;
7038 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7041 exp->expType = op1->type;
7043 op1->type->refCount++;
7048 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7051 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7054 exp->expType = op1->type;
7056 op1->type->refCount++;
7061 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7064 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7067 exp->expType = op1->type;
7069 op1->type->refCount++;
7074 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7077 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7080 exp->expType = op1->type;
7082 op1->type->refCount++;
7087 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7090 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7093 exp->expType = op1->type;
7095 op1->type->refCount++;
7100 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7103 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7106 exp->expType = op1->type;
7108 op1->type->refCount++;
7113 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7116 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7119 exp->expType = op1->type;
7121 op1->type->refCount++;
7126 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7129 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7132 exp->expType = op1->type;
7134 op1->type->refCount++;
7139 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7142 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7145 exp->expType = op1->type;
7147 op1->type->refCount++;
7152 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7154 if(type->name && type->name[0])
7157 strcat(string, type->name);
7160 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7166 strcat(string, name);
7171 static void PrintAttribs(struct Type * type, char * string)
7176 strcat(string, "dllexport ");
7177 if(type->attrStdcall)
7178 strcat(string, "stdcall ");
7182 static struct Type * FindMember(struct Type * type, char * string)
7184 struct Type * memberType;
7186 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7188 if(!memberType->name)
7190 struct Type * subType = FindMember(memberType, string);
7195 else if(!strcmp(memberType->name, string))
7198 return (((void *)0));
7201 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7203 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7205 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7207 unsigned int result = 0;
7212 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7213 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7217 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7218 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7221 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)
7222 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7225 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)
7226 result = GetOpFloat(op, &op->__anon1.f);
7229 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)
7230 result = GetOpDouble(op, &op->__anon1.d);
7233 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)
7234 result = GetOpUInt64(op, &op->__anon1.ui64);
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 ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7241 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7242 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7245 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7246 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7252 struct OpTable floatOps =
7254 (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)
7257 struct OpTable doubleOps =
7259 (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)
7262 struct OpTable intOps =
7264 (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)
7267 struct OpTable uintOps =
7269 (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)
7272 struct OpTable int64Ops =
7274 (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)
7277 struct OpTable uint64Ops =
7279 (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)
7282 struct OpTable shortOps =
7284 (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)
7287 struct OpTable ushortOps =
7289 (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)
7292 struct OpTable charOps =
7294 (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)
7297 struct OpTable ucharOps =
7299 (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)
7302 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7304 struct Type * memberType;
7306 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7308 if(!memberType->name)
7310 struct Type * subType = FindMember(memberType, string);
7314 *offset += memberType->offset;
7318 else if(!strcmp(memberType->name, string))
7320 *offset += memberType->offset;
7324 return (((void *)0));
7327 struct __ecereNameSpace__ecere__com__Module;
7329 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);
7331 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7333 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);
7335 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);
7337 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7339 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7344 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7345 struct __ecereNameSpace__ecere__sys__BTNode * left;
7346 struct __ecereNameSpace__ecere__sys__BTNode * right;
7348 struct __ecereNameSpace__ecere__com__Instance * module;
7349 char * dataTypeString;
7350 struct Type * dataType;
7353 } __attribute__ ((gcc_struct));
7355 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);
7357 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7359 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);
7361 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7363 struct __ecereNameSpace__ecere__com__DefinedExpression;
7365 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7367 struct __ecereNameSpace__ecere__com__DefinedExpression
7369 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7370 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7373 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7374 } __attribute__ ((gcc_struct));
7376 struct __ecereNameSpace__ecere__sys__BinaryTree;
7378 struct __ecereNameSpace__ecere__sys__BinaryTree
7380 struct __ecereNameSpace__ecere__sys__BTNode * root;
7382 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7383 void (* FreeKey)(void * key);
7384 } __attribute__ ((gcc_struct));
7386 struct __ecereNameSpace__ecere__com__Class
7388 struct __ecereNameSpace__ecere__com__Class * prev;
7389 struct __ecereNameSpace__ecere__com__Class * next;
7395 unsigned int (* Constructor)(void * );
7396 void (* Destructor)(void * );
7399 struct __ecereNameSpace__ecere__com__Class * base;
7400 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7401 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7402 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7403 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7404 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7405 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7409 struct __ecereNameSpace__ecere__com__Instance * module;
7410 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7411 const char * dataTypeString;
7412 struct Type * dataType;
7414 int defaultAlignment;
7415 void (* Initialize)();
7417 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7418 const char * designerClass;
7419 unsigned int noExpansion;
7420 const char * defaultProperty;
7421 unsigned int comRedefinition;
7424 unsigned int internalDecl;
7426 unsigned int computeSize;
7427 short structAlignment;
7428 short pointerAlignment;
7429 int destructionWatchOffset;
7431 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7432 int inheritanceAccess;
7433 const char * fullName;
7435 struct __ecereNameSpace__ecere__sys__OldList conversions;
7436 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7437 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7438 struct __ecereNameSpace__ecere__com__Class * templateClass;
7439 struct __ecereNameSpace__ecere__sys__OldList templatized;
7441 unsigned int isInstanceClass;
7442 unsigned int byValueSystemClass;
7443 } __attribute__ ((gcc_struct));
7445 struct __ecereNameSpace__ecere__com__NameSpace
7448 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7449 struct __ecereNameSpace__ecere__com__NameSpace * left;
7450 struct __ecereNameSpace__ecere__com__NameSpace * right;
7452 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7453 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7454 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7455 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7456 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7457 } __attribute__ ((gcc_struct));
7459 struct __ecereNameSpace__ecere__com__DataMember
7461 struct __ecereNameSpace__ecere__com__DataMember * prev;
7462 struct __ecereNameSpace__ecere__com__DataMember * next;
7464 unsigned int isProperty;
7467 struct __ecereNameSpace__ecere__com__Class * _class;
7468 const char * dataTypeString;
7469 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7470 struct Type * dataType;
7474 struct __ecereNameSpace__ecere__sys__OldList members;
7475 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7477 short structAlignment;
7478 short pointerAlignment;
7479 } __attribute__ ((gcc_struct));
7481 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7483 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7485 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7487 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7489 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7491 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7493 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7497 if(type->kind == 11)
7499 struct Type * param;
7501 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7502 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7503 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7505 else if(type->kind == 13)
7506 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7507 else if(type->kind == 8)
7509 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7511 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7513 else if(type->kind == 9 || type->kind == 10)
7515 struct Type * member;
7517 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7518 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7520 else if(type->kind == 12)
7521 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7525 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7527 unsigned int status = 1;
7529 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))
7531 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7532 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7534 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7536 struct Type * sourceType = source, * destType = dest;
7538 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7539 sourceType = sourceType->__anon1.type;
7540 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7541 destType = destType->__anon1.type;
7542 if(!destType->constant && sourceType->constant)
7546 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7553 struct Operand GetOperand(struct Expression * exp)
7562 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
7565 struct Type * type = exp->expType;
7569 while(type->kind == 8 && 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))
7571 if(!type->__anon1._class->__anon1.registered->dataType)
7572 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7573 type = type->__anon1._class->__anon1.registered->dataType;
7575 if(exp->type == 3 && op.kind == 13)
7577 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7581 else if(exp->isConstant && exp->type == 2)
7583 op.kind = type->kind;
7590 if(exp->__anon1.__anon1.constant[0] == '\'')
7592 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7595 else if(type->isSigned)
7597 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7602 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7610 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7615 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7623 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7628 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7636 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7641 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7649 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7654 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(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);
7673 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7674 op.__anon1.f = __ecereMethod_float_inf();
7675 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7676 op.__anon1.f = -__ecereMethod_float_inf();
7677 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7678 op.__anon1.f = __ecereMethod_float_nan();
7679 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7680 op.__anon1.f = -__ecereMethod_float_nan();
7682 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7686 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7687 op.__anon1.d = __ecereMethod_double_inf();
7688 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7689 op.__anon1.d = -__ecereMethod_double_inf();
7690 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7691 op.__anon1.d = __ecereMethod_double_nan();
7692 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7693 op.__anon1.d = -__ecereMethod_double_nan();
7695 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7701 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7711 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7715 switch(_class->typeSize)
7718 if(!strcmp(_class->dataTypeString, "uint64"))
7719 v = (long long)*(uint64 *)ptr;
7721 v = *(long long *)ptr;
7724 if(!strcmp(_class->dataTypeString, "uint"))
7725 v = (long long)*(unsigned int *)ptr;
7727 v = (long long)*(int *)ptr;
7730 if(!strcmp(_class->dataTypeString, "uint16"))
7731 v = (long long)*(unsigned short *)ptr;
7733 v = (long long)*(short *)ptr;
7736 if(!strcmp(_class->dataTypeString, "byte"))
7737 v = (long long)*(unsigned char *)ptr;
7739 v = (long long)*(char *)ptr;
7745 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7747 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7748 ListAdd(specs, MkSpecifier(UNSIGNED));
7753 if(type->__anon1._class->__anon1.registered)
7755 if(!type->__anon1._class->__anon1.registered->dataType)
7756 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7757 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7762 ListAdd(specs, MkSpecifier(DOUBLE));
7765 ListAdd(specs, MkSpecifier(FLOAT));
7768 ListAdd(specs, MkSpecifier(CHAR));
7771 ListAdd(specs, MkSpecifier(_BOOL));
7774 ListAdd(specs, MkSpecifier(SHORT));
7777 ListAdd(specs, MkSpecifier(INT64));
7780 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7783 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7787 ListAdd(specs, MkSpecifier(INT));
7792 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7796 if(printConst && type->constant)
7797 strcat(string, "const ");
7802 struct Symbol * c = type->__anon1._class;
7803 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7805 if(type->classObjectType == 2 && isObjectBaseClass)
7806 strcat(string, "typed_object");
7807 else if(type->classObjectType == 3 && isObjectBaseClass)
7808 strcat(string, "any_object");
7812 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7814 if(type->byReference)
7815 strcat(string, " &");
7819 strcat(string, "void");
7822 strcat(string, type->isSigned ? "int" : "uint");
7825 strcat(string, type->isSigned ? "int64" : "uint64");
7828 strcat(string, type->isSigned ? "intptr" : "uintptr");
7831 strcat(string, type->isSigned ? "intsize" : "uintsize");
7834 strcat(string, type->isSigned ? "char" : "byte");
7837 strcat(string, "_Bool");
7840 strcat(string, type->isSigned ? "short" : "uint16");
7843 strcat(string, "float");
7846 strcat(string, "double");
7849 if(type->__anon1.__anon1.enumName)
7851 strcat(string, "struct ");
7852 strcat(string, type->__anon1.__anon1.enumName);
7854 else if(type->typeName)
7855 strcat(string, type->typeName);
7858 struct Type * member;
7860 strcat(string, "struct { ");
7861 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7863 PrintType(member, string, 1, fullName);
7864 strcat(string, "; ");
7866 strcat(string, "}");
7870 if(type->__anon1.__anon1.enumName)
7872 strcat(string, "union ");
7873 strcat(string, type->__anon1.__anon1.enumName);
7875 else if(type->typeName)
7876 strcat(string, type->typeName);
7879 strcat(string, "union ");
7880 strcat(string, "(unnamed)");
7884 if(type->__anon1.__anon1.enumName)
7886 strcat(string, "enum ");
7887 strcat(string, type->__anon1.__anon1.enumName);
7889 else if(type->typeName)
7890 strcat(string, type->typeName);
7892 strcat(string, "int");
7895 strcat(string, "...");
7898 strcat(string, "subclass(");
7899 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7900 strcat(string, ")");
7903 strcat(string, type->__anon1.templateParameter->identifier->string);
7906 strcat(string, "thisclass");
7909 strcat(string, "__builtin_va_list");
7915 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7917 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7919 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7921 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7923 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7925 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7927 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7929 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7931 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7933 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7935 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7939 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7941 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7943 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7945 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7959 struct __ecereNameSpace__ecere__com__Application
7962 const char * * argv;
7964 unsigned int isGUIApp;
7965 struct __ecereNameSpace__ecere__sys__OldList allModules;
7966 char * parsedCommand;
7967 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7968 } __attribute__ ((gcc_struct));
7970 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)
7974 *curMember = (*curMember)->next;
7975 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7977 *curMember = subMemberStack[--(*subMemberStackPos)];
7978 *curMember = (*curMember)->next;
7980 while((*curMember) && (*curMember)->isProperty)
7981 *curMember = (*curMember)->next;
7982 if(subMemberStackPos)
7984 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
7986 subMemberStack[(*subMemberStackPos)++] = *curMember;
7987 *curMember = (*curMember)->members.first;
7988 while(*curMember && (*curMember)->isProperty)
7989 *curMember = (*curMember)->next;
7997 if(subMemberStackPos && *subMemberStackPos)
7999 *curMember = subMemberStack[--(*subMemberStackPos)];
8000 *curMember = (*curMember)->next;
8004 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8006 if(*curClass == _class)
8008 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8010 *curMember = (*curClass)->membersAndProperties.first;
8012 while((*curMember) && (*curMember)->isProperty)
8013 *curMember = (*curMember)->next;
8014 if(subMemberStackPos)
8016 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8018 subMemberStack[(*subMemberStackPos)++] = *curMember;
8019 *curMember = (*curMember)->members.first;
8020 while(*curMember && (*curMember)->isProperty)
8021 *curMember = (*curMember)->next;
8028 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8030 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8031 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8032 struct __ecereNameSpace__ecere__com__NameSpace * child;
8036 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)))
8038 data = ScanGlobalData(child, name);
8046 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8048 int nsLen = strlen(nameSpace);
8049 struct Symbol * symbol;
8051 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)))
8053 char * s = symbol->string;
8055 if(!strncmp(s, nameSpace, nsLen))
8060 for(c = strlen(s) - 1; c >= 0; c--)
8063 namePart = s + c + 1;
8064 if(!strcmp(namePart, name))
8072 return (((void *)0));
8075 unsigned int GetInt(struct Expression * exp, int * value2)
8077 struct Operand op2 = GetOperand(exp);
8079 return GetOpInt(&op2, value2);
8082 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8084 struct Operand op2 = GetOperand(exp);
8086 return GetOpUInt(&op2, value2);
8089 unsigned int GetInt64(struct Expression * exp, long long * value2)
8091 struct Operand op2 = GetOperand(exp);
8093 return GetOpInt64(&op2, value2);
8096 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8098 struct Operand op2 = GetOperand(exp);
8100 return GetOpUInt64(&op2, value2);
8103 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8105 struct Operand op2 = GetOperand(exp);
8107 return GetOpIntPtr(&op2, value2);
8110 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8112 struct Operand op2 = GetOperand(exp);
8114 return GetOpUIntPtr(&op2, value2);
8117 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8119 struct Operand op2 = GetOperand(exp);
8121 return GetOpIntSize(&op2, value2);
8124 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8126 struct Operand op2 = GetOperand(exp);
8128 return GetOpUIntSize(&op2, value2);
8131 unsigned int GetShort(struct Expression * exp, short * value2)
8133 struct Operand op2 = GetOperand(exp);
8135 return GetOpShort(&op2, value2);
8138 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8140 struct Operand op2 = GetOperand(exp);
8142 return GetOpUShort(&op2, value2);
8145 unsigned int GetChar(struct Expression * exp, char * value2)
8147 struct Operand op2 = GetOperand(exp);
8149 return GetOpChar(&op2, value2);
8152 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8154 struct Operand op2 = GetOperand(exp);
8156 return GetOpUChar(&op2, value2);
8159 unsigned int GetFloat(struct Expression * exp, float * value2)
8161 struct Operand op2 = GetOperand(exp);
8163 return GetOpFloat(&op2, value2);
8166 unsigned int GetDouble(struct Expression * exp, double * value2)
8168 struct Operand op2 = GetOperand(exp);
8170 return GetOpDouble(&op2, value2);
8173 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8175 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8177 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8178 PrintAttribs(type, string);
8179 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8180 strcat(string, " const");
8181 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8182 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8183 strcat(string, " (");
8184 if(type->kind == 13)
8186 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8187 PrintAttribs(type->__anon1.type, string);
8189 if(type->kind == 13)
8191 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8192 strcat(string, "*");
8194 strcat(string, " *");
8196 if(printConst && type->constant && type->kind == 13)
8197 strcat(string, " const");
8200 PrintTypeSpecs(type, string, fullName, printConst);
8203 void PrintExpression(struct Expression * exp, char * string)
8206 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8208 unsigned int backOutputLineNumbers = outputLineNumbers;
8210 outputLineNumbers = 0;
8212 OutputExpression(exp, f);
8213 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8214 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8216 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8217 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8218 count = strlen(string);
8219 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8220 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8222 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8223 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8224 string[count] = '\0';
8225 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8226 outputLineNumbers = backOutputLineNumbers;
8230 struct Type * Dereference(struct Type * source)
8232 struct Type * type = (((void *)0));
8236 if(source->kind == 13 || source->kind == 12)
8238 type = source->__anon1.type;
8239 source->__anon1.type->refCount++;
8241 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8243 type = __extension__ ({
8244 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8246 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8249 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8255 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8260 static struct Type * Reference(struct Type * source)
8262 struct Type * type = (((void *)0));
8266 type = __extension__ ({
8267 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8269 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8276 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8278 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8280 FreeExpContents(checkedExp);
8281 FreeType(checkedExp->expType);
8282 FreeType(checkedExp->destType);
8283 *checkedExp = *newExp;
8284 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8285 checkedExp->prev = prev;
8286 checkedExp->next = next;
8289 void FinishTemplatesContext(struct Context * context)
8291 PopContext(context);
8292 FreeContext(context);
8293 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8296 static __attribute__((unused)) void UnusedFunction()
8300 ((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);
8303 struct Expression * ParseExpressionString(char * expression)
8306 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8307 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8308 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8310 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8311 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8313 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8315 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8316 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8318 parsedExpression = (((void *)0));
8320 expression_yyparse();
8321 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8322 return parsedExpression;
8325 struct __ecereNameSpace__ecere__com__Module
8327 struct __ecereNameSpace__ecere__com__Instance * application;
8328 struct __ecereNameSpace__ecere__sys__OldList classes;
8329 struct __ecereNameSpace__ecere__sys__OldList defines;
8330 struct __ecereNameSpace__ecere__sys__OldList functions;
8331 struct __ecereNameSpace__ecere__sys__OldList modules;
8332 struct __ecereNameSpace__ecere__com__Instance * prev;
8333 struct __ecereNameSpace__ecere__com__Instance * next;
8339 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8340 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8341 } __attribute__ ((gcc_struct));
8343 static struct GlobalData * FindGlobalData(char * name)
8346 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8348 nameSpace = globalData;
8349 for(c = 0; name[c]; c++)
8351 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8353 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8354 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8356 strncpy(spaceName, name + start, c - start);
8357 spaceName[c - start] = '\0';
8358 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8359 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8361 return (((void *)0));
8362 nameSpace = newSpace;
8370 return ScanGlobalData(nameSpace, name + start);
8372 return (((void *)0));
8375 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8378 char nameSpace[1024];
8379 const char * namePart;
8380 unsigned int gotColon = 0;
8382 nameSpace[0] = '\0';
8383 for(c = strlen(name) - 1; c >= 0; c--)
8389 namePart = name + c + 1;
8390 while(c >= 0 && name[c] == ':')
8394 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8398 memcpy(nameSpace, name, c + 1);
8399 nameSpace[c + 1] = (char)0;
8400 return ScanWithNameSpace(tree, nameSpace, namePart);
8404 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8410 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8414 return ScanWithNameSpace(tree, "", namePart);
8416 return (((void *)0));
8419 static void PrintArraySize(struct Type * arrayType, char * string)
8425 if(arrayType->__anon1.__anon4.enumClass)
8426 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8427 else if(arrayType->__anon1.__anon4.arraySizeExp)
8428 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8430 strcat(string, size);
8433 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8438 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8440 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8441 strcat(string, ")");
8442 if(type->kind == 12)
8443 PrintArraySize(type, string);
8444 else if(type->kind == 11)
8446 struct Type * param;
8448 strcat(string, "(");
8449 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8451 PrintType(param, string, 1, fullName);
8453 strcat(string, ", ");
8455 strcat(string, ")");
8457 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8458 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8461 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8463 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8464 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8465 strcat(string, " ");
8466 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8468 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8470 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8472 if(type->classObjectType == 1)
8473 strcat(string, "class");
8475 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8477 else if(_class && _class->string)
8479 char * s = _class->string;
8485 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8491 strcat(string, name);
8494 strcat(string, "::");
8496 if(printName && type->name)
8497 PrintName(type, string, fullName);
8498 PostPrintType(type, string, fullName);
8499 if(type->bitFieldCount)
8503 sprintf(count, ":%d", type->bitFieldCount);
8504 strcat(string, count);
8512 struct Conversion * prev, * next;
8513 struct __ecereNameSpace__ecere__com__Property * convert;
8515 struct Type * resultType;
8516 } __attribute__ ((gcc_struct));
8518 static void FreeConvert(struct Conversion * convert)
8520 if(convert->resultType)
8521 FreeType(convert->resultType);
8528 struct Enumerator * prev;
8529 struct Enumerator * next;
8530 struct Location loc;
8531 struct Identifier * id;
8532 struct Expression * exp;
8533 } __attribute__ ((gcc_struct));
8539 struct AsmField * prev;
8540 struct AsmField * next;
8541 struct Location loc;
8543 struct Expression * expression;
8544 struct Identifier * symbolic;
8545 } __attribute__ ((gcc_struct));
8547 struct ClassDefinition;
8551 struct Context * parent;
8552 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8553 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8554 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8555 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8558 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8559 struct ClassDefinition * classDef;
8560 unsigned int templateTypesOnly;
8561 unsigned int hasNameSpace;
8562 } __attribute__ ((gcc_struct));
8566 struct External * prev;
8567 struct External * next;
8568 struct Location loc;
8570 struct Symbol * symbol;
8573 struct FunctionDefinition * function;
8574 struct ClassDefinition * _class;
8575 struct Declaration * declaration;
8576 char * importString;
8577 struct Identifier * id;
8578 struct DBTableDef * table;
8579 } __attribute__ ((gcc_struct)) __anon1;
8581 struct External * fwdDecl;
8582 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8583 struct __ecereNameSpace__ecere__com__Instance * incoming;
8584 int nonBreakableIncoming;
8585 } __attribute__ ((gcc_struct));
8587 struct ClassDefinition
8589 struct ClassDefinition * prev;
8590 struct ClassDefinition * next;
8591 struct Location loc;
8592 struct Specifier * _class;
8593 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8594 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8595 struct Symbol * symbol;
8596 struct Location blockStart;
8597 struct Location nameLoc;
8599 unsigned int deleteWatchable;
8600 } __attribute__ ((gcc_struct));
8602 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8604 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8606 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8608 struct Symbol * symbol = data->symbol;
8610 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8615 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8618 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8621 struct Declaration * decl;
8622 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8623 struct Declarator * d;
8624 struct External * external;
8626 specifiers = MkList();
8627 declarators = MkList();
8628 ListAdd(specifiers, MkSpecifier(EXTERN));
8629 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8630 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8631 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8632 decl = MkDeclaration(specifiers, declarators);
8633 external = MkExternalDeclaration(decl);
8635 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8636 external->symbol = symbol;
8637 symbol->__anon2.__anon1.pointerExternal = external;
8638 DeclareType(external, data->dataType, 1, 1);
8641 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8642 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8645 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8647 struct Context * ctx;
8648 struct Symbol * symbol = (((void *)0));
8650 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8652 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8654 symbol = (((void *)0));
8659 strcpy(curName, thisNameSpace);
8660 strcat(curName, "::");
8661 strcat(curName, name);
8662 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8665 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8668 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8669 if(symbol || ctx == endContext)
8672 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8673 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8681 struct ClassDef * prev;
8682 struct ClassDef * next;
8683 struct Location loc;
8687 struct Declaration * decl;
8688 struct ClassFunction * function;
8689 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8690 struct PropertyDef * propertyDef;
8691 struct PropertyWatch * propertyWatch;
8693 struct Identifier * defaultProperty;
8696 struct Identifier * id;
8697 struct Initializer * initializer;
8698 } __attribute__ ((gcc_struct)) __anon1;
8699 } __attribute__ ((gcc_struct)) __anon1;
8702 } __attribute__ ((gcc_struct));
8706 struct PropertyDef * prev;
8707 struct PropertyDef * next;
8708 struct Location loc;
8709 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8710 struct Declarator * declarator;
8711 struct Identifier * id;
8712 struct Statement * getStmt;
8713 struct Statement * setStmt;
8714 struct Statement * issetStmt;
8715 struct Symbol * symbol;
8716 struct Expression * category;
8719 unsigned int conversion : 1;
8720 unsigned int isWatchable : 1;
8721 unsigned int isDBProp : 1;
8722 } __attribute__ ((gcc_struct)) __anon1;
8723 } __attribute__ ((gcc_struct));
8725 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8727 struct ClassDef * def;
8730 for(def = (*definitions).first; def; def = def->next)
8734 struct Declaration * decl = def->__anon1.decl;
8736 if(decl && decl->__anon1.__anon1.specifiers)
8738 struct Specifier * spec;
8739 unsigned int isStruct = 0;
8741 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8743 if(spec->type == 3 || spec->type == 4)
8745 if(spec->__anon1.__anon2.definitions)
8746 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8752 struct Declarator * d = (((void *)0));
8754 if(decl->__anon1.__anon1.declarators)
8756 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8758 struct Identifier * idDecl = GetDeclId(d);
8768 sprintf(id, "__anon%d", anonID++);
8769 if(!decl->__anon1.__anon1.declarators)
8770 decl->__anon1.__anon1.declarators = MkList();
8771 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8781 typedef union YYSTYPE
8786 struct Identifier * id;
8787 struct Expression * exp;
8788 struct Specifier * specifier;
8789 struct __ecereNameSpace__ecere__sys__OldList * list;
8790 struct Enumerator * enumerator;
8791 struct Declarator * declarator;
8792 struct Pointer * pointer;
8793 struct Initializer * initializer;
8794 struct InitDeclarator * initDeclarator;
8795 struct TypeName * typeName;
8796 struct Declaration * declaration;
8797 struct Statement * stmt;
8798 struct FunctionDefinition * function;
8799 struct External * external;
8800 struct Context * context;
8801 struct AsmField * asmField;
8802 struct Attrib * attrib;
8803 struct ExtDecl * extDecl;
8804 struct Attribute * attribute;
8805 struct Instantiation * instance;
8806 struct MembersInit * membersInit;
8807 struct MemberInit * memberInit;
8808 struct ClassFunction * classFunction;
8809 struct ClassDefinition * _class;
8810 struct ClassDef * classDef;
8811 struct PropertyDef * prop;
8813 struct Symbol * symbol;
8814 struct PropertyWatch * propertyWatch;
8815 struct TemplateParameter * templateParameter;
8816 struct TemplateArgument * templateArgument;
8817 struct TemplateDatatype * templateDatatype;
8818 struct DBTableEntry * dbtableEntry;
8819 struct DBIndexItem * dbindexItem;
8820 struct DBTableDef * dbtableDef;
8821 } __attribute__ ((gcc_struct)) YYSTYPE;
8823 extern YYSTYPE yylval;
8827 struct MemberInit * prev;
8828 struct MemberInit * next;
8829 struct Location loc;
8830 struct Location realLoc;
8831 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8832 struct Initializer * initializer;
8834 unsigned int variable;
8835 unsigned int takeOutExp;
8836 } __attribute__ ((gcc_struct));
8838 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8840 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8842 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8844 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8845 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8850 const char * dataTypeString;
8852 } __attribute__ ((gcc_struct)) __anon1;
8853 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8855 } __attribute__ ((gcc_struct));
8857 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8859 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8861 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8862 struct __ecereNameSpace__ecere__com__Class * sClass;
8864 for(sClass = _class; sClass; sClass = sClass->base)
8867 if(sClass->templateClass)
8868 sClass = sClass->templateClass;
8869 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8871 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8873 for(sClass = sClass->base; sClass; sClass = sClass->base)
8875 if(sClass->templateClass)
8876 sClass = sClass->templateClass;
8877 id += sClass->templateParams.count;
8888 arg = &_class->templateArgs[id];
8889 if(arg && param->type == 0)
8890 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8895 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8897 struct Context * context = PushContext();
8899 context->templateTypesOnly = 1;
8900 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8902 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8904 for(; param; param = param->next)
8906 if(param->type == 0 && param->identifier)
8908 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8910 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8916 struct __ecereNameSpace__ecere__com__Class * sClass;
8918 for(sClass = _class; sClass; sClass = sClass->base)
8920 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8922 for(p = sClass->templateParams.first; p; p = p->next)
8926 struct TemplateParameter * param = p->param;
8927 struct TemplatedType * type;
8931 p->param = param = __extension__ ({
8932 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8934 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8937 type = __extension__ ({
8938 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8940 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8942 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8950 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8952 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8954 unsigned int first = 1;
8956 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8958 char className[1024];
8960 strcpy(className, _class->fullName);
8961 for(param = _class->templateParams.first; param; param = param->next)
8965 strcat(className, "<");
8967 strcat(className, ", ");
8968 if(lastParam + 1 != p)
8970 strcat(className, param->name);
8971 strcat(className, " = ");
8973 strcat(className, param->name);
8981 int len = strlen(className);
8983 if(className[len - 1] == '>')
8984 className[len++] = ' ';
8985 className[len++] = '>';
8986 className[len++] = '\0';
8988 return __ecereNameSpace__ecere__sys__CopyString(className);
8991 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
8994 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
8998 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9000 unsigned int first = 1;
9002 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9004 char className[1024];
9006 strcpy(className, _class->fullName);
9007 for(param = _class->templateParams.first; param; param = param->next)
9011 strcat(className, "<");
9013 strcat(className, ", ");
9014 if(lastParam + 1 != p)
9016 strcat(className, param->name);
9017 strcat(className, " = ");
9019 strcat(className, param->name);
9027 int len = strlen(className);
9029 if(className[len - 1] == '>')
9030 className[len++] = ' ';
9031 className[len++] = '>';
9032 className[len++] = '\0';
9034 type = MkClassType(className);
9038 type = MkClassType(_class->fullName);
9043 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9045 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9046 struct __ecereNameSpace__ecere__com__DataMember * member;
9047 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9049 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9050 DeclareMembers(neededBy, _class->base, 0);
9051 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9053 if(!member->isProperty)
9055 switch(member->type)
9059 if(!member->dataType && member->dataTypeString)
9060 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9061 if(member->dataType)
9062 DeclareType(neededBy, member->dataType, 1, 0);
9068 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9075 FinishTemplatesContext(context);
9076 return topMember ? topMember->memberID : _class->memberID;
9079 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9081 if(!method->dataType)
9083 struct Context * context = SetupTemplatesContext(method->_class);
9085 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9086 FinishTemplatesContext(context);
9087 if(method->type != 1 && method->dataType)
9089 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9091 if(!method->_class->symbol)
9092 method->_class->symbol = FindClass(method->_class->fullName);
9093 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9099 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9103 struct Context * context = SetupTemplatesContext(prop->_class);
9105 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9106 FinishTemplatesContext(context);
9110 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9112 if(specs != (((void *)0)) && _class)
9114 struct Specifier * spec;
9116 for(spec = specs->first; spec; spec = spec->next)
9118 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9121 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9122 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9128 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9130 struct Identifier * id = exp->__anon1.__anon1.identifier;
9131 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9132 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9133 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9134 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9136 if(_class && _class->type == 4)
9138 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9139 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9143 struct __ecereNameSpace__ecere__com__Class * baseClass;
9145 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9147 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9149 for(value = e->values.first; value; value = value->next)
9151 if(!strcmp(value->name, id->string))
9156 exp->isConstant = 1;
9157 if(inCompiler || inPreCompiler || inDebugger)
9161 FreeExpContents(exp);
9163 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9164 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9166 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9167 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9169 exp->expType = MkClassType(baseClass->fullName);
9177 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9179 ProcessMethodType(method);
9180 exp->expType = __extension__ ({
9181 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9183 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9187 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9190 ProcessPropertyType(prop);
9191 exp->expType = prop->dataType;
9193 prop->dataType->refCount++;
9196 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9198 if(!member->dataType)
9199 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9200 exp->expType = member->dataType;
9201 if(member->dataType)
9202 member->dataType->refCount++;
9205 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9207 if(!classProp->dataType)
9208 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9209 if(classProp->constant)
9211 FreeExpContents(exp);
9212 exp->isConstant = 1;
9213 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9216 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9223 sprintf(constant, "%d", (int)classProp->Get(_class));
9224 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9230 exp->expType = classProp->dataType;
9231 if(classProp->dataType)
9232 classProp->dataType->refCount++;
9238 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9240 struct Symbol * symbol = prop->symbol;
9241 unsigned int imported = 0;
9242 unsigned int dllImport = 0;
9243 struct External * structExternal = (((void *)0));
9244 struct External * instExternal = (((void *)0));
9246 strcpy(setName, "__ecereProp_");
9247 FullClassNameCat(setName, prop->_class->fullName, 0);
9248 strcat(setName, "_Set_");
9249 FullClassNameCat(setName, prop->name, 1);
9250 strcpy(getName, "__ecereProp_");
9251 FullClassNameCat(getName, prop->_class->fullName, 0);
9252 strcat(getName, "_Get_");
9253 FullClassNameCat(getName, prop->name, 1);
9254 if(!symbol || symbol->_import)
9258 struct Symbol * classSym;
9260 if(!prop->_class->symbol)
9261 prop->_class->symbol = FindClass(prop->_class->fullName);
9262 classSym = prop->_class->symbol;
9263 if(classSym && !classSym->_import)
9265 struct ModuleImport * module;
9267 if(prop->_class->module)
9268 module = FindModule(prop->_class->module);
9270 module = mainModule;
9271 classSym->_import = __extension__ ({
9272 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9274 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9276 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9278 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9279 symbol->_import = (struct ClassImport *)__extension__ ({
9280 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9282 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9285 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9288 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)
9293 struct Context * context = SetupTemplatesContext(prop->_class);
9295 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9296 FinishTemplatesContext(context);
9298 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9300 if(prop->_class->type == 0 && prop->_class->structSize)
9301 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9302 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9304 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9306 struct Declaration * decl;
9307 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9308 struct Declarator * d;
9309 struct __ecereNameSpace__ecere__sys__OldList * params;
9310 struct Specifier * spec = (((void *)0));
9311 struct External * external;
9312 struct Declarator * typeDecl;
9313 unsigned int simple = 0;
9314 unsigned int needReference;
9316 specifiers = MkList();
9317 declarators = MkList();
9319 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9320 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9322 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9324 struct Context * context = SetupTemplatesContext(prop->_class);
9326 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9327 FinishTemplatesContext(context);
9329 needReference = !typeDecl || typeDecl->type == 1;
9330 for(spec = (*specifiers).first; spec; spec = spec->next)
9334 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9338 symbol->_class = classSym->__anon1.registered;
9339 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9346 d = PlugDeclarator(typeDecl, d);
9349 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9350 specifiers = MkList();
9352 d = MkDeclaratorFunction(d, params);
9354 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9355 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9356 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9358 ListAdd(specifiers, MkSpecifier(VOID));
9359 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9360 decl = MkDeclaration(specifiers, declarators);
9361 external = MkExternalDeclaration(decl);
9363 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9365 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9367 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9368 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9369 external->symbol = symbol;
9370 symbol->__anon2.__anon2.externalGet = external;
9371 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9373 FreeDeclarator(typeDecl);
9375 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9377 struct Declaration * decl;
9378 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9379 struct Declarator * d;
9380 struct __ecereNameSpace__ecere__sys__OldList * params;
9381 struct Specifier * spec = (((void *)0));
9382 struct External * external;
9383 struct Declarator * typeDecl;
9384 unsigned int needReference;
9386 declarators = MkList();
9388 if(!prop->conversion || prop->_class->type == 1)
9390 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9392 specifiers = MkList();
9394 struct Context * context = SetupTemplatesContext(prop->_class);
9396 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9397 FinishTemplatesContext(context);
9399 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9400 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9401 ListAdd(params, MkTypeName(specifiers, d));
9402 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9404 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9405 d = MkDeclaratorFunction(d, params);
9406 needReference = !typeDecl || typeDecl->type == 1;
9407 for(spec = (*specifiers).first; spec; spec = spec->next)
9411 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9414 symbol->_class = classSym->__anon1.registered;
9418 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9419 specifiers = MkList();
9421 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9422 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9423 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9424 if(!prop->conversion || prop->_class->type == 1)
9425 ListAdd(specifiers, MkSpecifier(VOID));
9427 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9428 decl = MkDeclaration(specifiers, declarators);
9429 external = MkExternalDeclaration(decl);
9431 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9433 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9435 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9436 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9437 external->symbol = symbol;
9438 symbol->__anon2.__anon2.externalSet = external;
9439 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9441 if(!symbol->__anon2.__anon2.externalPtr)
9443 struct Declaration * decl;
9444 struct External * external;
9445 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9446 char propName[1024];
9449 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9453 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9455 ListAdd(specifiers, MkSpecifierName("Property"));
9456 strcpy(propName, "__ecereProp_");
9457 FullClassNameCat(propName, prop->_class->fullName, 0);
9458 strcat(propName, "_");
9459 FullClassNameCat(propName, prop->name, 1);
9461 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9463 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9466 strcpy(propName, "__ecerePropM_");
9467 FullClassNameCat(propName, prop->_class->fullName, 0);
9468 strcat(propName, "_");
9469 FullClassNameCat(propName, prop->name, 1);
9470 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9472 decl = MkDeclaration(specifiers, list);
9474 external = MkExternalDeclaration(decl);
9475 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9476 external->symbol = symbol;
9477 symbol->__anon2.__anon2.externalPtr = external;
9479 if(inCompiler && neededBy)
9481 if(symbol->__anon2.__anon2.externalPtr)
9482 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9483 if(symbol->__anon2.__anon2.externalGet)
9484 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9485 if(symbol->__anon2.__anon2.externalSet)
9486 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9490 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9492 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9494 struct Symbol * symbol = method->symbol;
9496 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9498 unsigned int dllImport = 0;
9500 if(!method->dataType)
9501 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9503 if(!symbol || method->type == 1)
9505 struct Symbol * classSym;
9507 if(!method->_class->symbol)
9508 method->_class->symbol = FindClass(method->_class->fullName);
9509 classSym = method->_class->symbol;
9510 if(!classSym->_import)
9512 struct ModuleImport * module;
9514 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9515 module = FindModule(method->_class->module);
9517 module = mainModule;
9518 classSym->_import = __extension__ ({
9519 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9521 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9523 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9527 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9529 if(!symbol->_import)
9531 symbol->_import = (struct ClassImport *)__extension__ ({
9532 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9534 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9536 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9540 symbol->type = method->dataType;
9542 symbol->type->refCount++;
9545 if(!method->dataType->dllExport)
9547 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)
9553 struct Declaration * decl;
9554 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9555 struct Declarator * d;
9556 struct Declarator * funcDecl;
9557 struct External * external;
9559 specifiers = MkList();
9560 declarators = MkList();
9562 ListAdd(specifiers, MkSpecifier(EXTERN));
9563 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9564 ListAdd(specifiers, MkSpecifier(STATIC));
9565 if(method->type == 1)
9567 ListAdd(specifiers, MkSpecifier(INT));
9568 d = MkDeclaratorIdentifier(MkIdentifier(name));
9572 d = MkDeclaratorIdentifier(MkIdentifier(name));
9574 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9576 struct Context * context = SetupTemplatesContext(method->_class);
9578 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9579 FinishTemplatesContext(context);
9581 funcDecl = GetFuncDecl(d);
9584 struct Specifier * spec, * next;
9586 for(spec = (*specifiers).first; spec; spec = next)
9591 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9592 FreeSpecifier(spec);
9596 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9598 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9600 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9601 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")));
9602 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9603 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9605 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9607 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9609 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9610 FreeTypeName(param);
9612 if(!funcDecl->__anon1.function.parameters)
9613 funcDecl->__anon1.function.parameters = MkList();
9614 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9618 ProcessDeclarator(d, 1);
9619 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9620 decl = MkDeclaration(specifiers, declarators);
9621 ReplaceThisClassSpecifiers(specifiers, method->_class);
9622 external = MkExternalDeclaration(decl);
9623 external->symbol = symbol;
9624 symbol->__anon2.__anon1.pointerExternal = external;
9625 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9626 DeclareStruct(external, method->_class->fullName, 1, 1);
9627 if(method->dataType)
9628 DeclareType(external, method->dataType, 1, 1);
9631 if(inCompiler && neededFor)
9633 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9635 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9639 struct __ecereNameSpace__ecere__com__GlobalFunction;
9641 struct __ecereNameSpace__ecere__com__GlobalFunction
9643 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9644 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9647 struct __ecereNameSpace__ecere__com__Instance * module;
9648 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9649 const char * dataTypeString;
9650 struct Type * dataType;
9652 } __attribute__ ((gcc_struct));
9654 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9656 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);
9658 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9660 struct Symbol * symbol = function->symbol;
9662 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9664 unsigned int imported = 0;
9665 unsigned int dllImport = 0;
9667 if(!function->dataType)
9669 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9670 if(!function->dataType->__anon1.__anon2.thisClass)
9671 function->dataType->__anon1.__anon2.staticMethod = 1;
9677 struct ModuleImport * module = FindModule(function->module);
9679 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9682 if(!function->dataType->dllExport)
9684 symbol->_import = (struct ClassImport *)__extension__ ({
9685 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9687 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9689 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9693 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9694 if(!symbol->type->__anon1.__anon2.thisClass)
9695 symbol->type->__anon1.__anon2.staticMethod = 1;
9698 imported = symbol->_import ? 1 : 0;
9699 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9705 struct Declaration * decl;
9706 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9707 struct Declarator * d;
9708 struct Declarator * funcDecl;
9709 struct External * external;
9711 specifiers = MkList();
9712 declarators = MkList();
9713 ListAdd(specifiers, MkSpecifier(EXTERN));
9714 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9716 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9717 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9718 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9720 struct Specifier * spec;
9722 for(spec = (*specifiers).first; spec; spec = spec->next)
9723 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9725 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9726 FreeSpecifier(spec);
9730 funcDecl = GetFuncDecl(d);
9731 if(funcDecl && !funcDecl->__anon1.function.parameters)
9733 funcDecl->__anon1.function.parameters = MkList();
9734 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9736 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9738 struct Context * oldCtx = curContext;
9740 curContext = globalContext;
9741 decl = MkDeclaration(specifiers, declarators);
9742 curContext = oldCtx;
9744 external = MkExternalDeclaration(decl);
9745 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9746 external->symbol = symbol;
9747 symbol->__anon2.__anon1.pointerExternal = external;
9748 DeclareType(external, function->dataType, 1, 1);
9752 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9753 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9754 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;
9757 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9759 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9766 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9767 strcpy(name, "__ecereFunction_");
9768 FullClassNameCat(name, s, 0);
9769 DeclareFunction(neededBy, function, name);
9772 FindSymbol(s, globalContext, globalContext, 0, 0);
9775 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9777 char propName[1024], propNameM[1024];
9778 char getName[1024], setName[1024];
9779 struct __ecereNameSpace__ecere__sys__OldList * args;
9781 DeclareProperty(curExternal, prop, setName, getName);
9782 strcpy(propName, "__ecereProp_");
9783 FullClassNameCat(propName, prop->_class->fullName, 0);
9784 strcat(propName, "_");
9785 FullClassNameCat(propName, prop->name, 1);
9786 strcpy(propNameM, "__ecerePropM_");
9787 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9788 strcat(propNameM, "_");
9789 FullClassNameCat(propNameM, prop->name, 1);
9790 if(prop->isWatchable)
9793 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9794 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9795 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9797 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9798 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9799 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9800 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9804 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9805 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9806 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9808 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9809 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9810 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9811 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9813 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9814 curFunction->propSet->fireWatchersDone = 1;
9817 struct __ecereNameSpace__ecere__com__SubModule;
9819 struct __ecereNameSpace__ecere__com__SubModule
9821 struct __ecereNameSpace__ecere__com__SubModule * prev;
9822 struct __ecereNameSpace__ecere__com__SubModule * next;
9823 struct __ecereNameSpace__ecere__com__Instance * module;
9825 } __attribute__ ((gcc_struct));
9827 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9829 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9831 if(searchFor == searchIn)
9833 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9835 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9837 if(ModuleVisibility(subModule->module, searchFor))
9844 void ProcessExpressionType(struct Expression * exp);
9846 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9848 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9850 struct Identifier * id = exp->__anon1.__anon1.identifier;
9851 struct Context * ctx;
9852 struct Symbol * symbol = (((void *)0));
9854 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9856 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9858 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9863 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))))
9865 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9866 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9867 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9868 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9872 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9874 if(!prop && !method)
9875 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9876 if(!prop && !method && !member)
9878 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9880 if(prop || method || member || classProp)
9883 exp->__anon1.member.member = id;
9884 exp->__anon1.member.memberType = 0;
9885 exp->__anon1.member.exp = QMkExpId("this");
9888 else if(_class && _class->templateParams.first)
9890 struct __ecereNameSpace__ecere__com__Class * sClass;
9892 for(sClass = _class; sClass; sClass = sClass->base)
9894 if(sClass->templateParams.first)
9896 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9898 for(param = sClass->templateParams.first; param; param = param->next)
9900 if(param->type == 2 && !strcmp(param->name, id->string))
9902 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9906 struct Declarator * decl;
9907 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9909 FreeIdentifier(exp->__anon1.member.member);
9910 ProcessExpressionType(argExp);
9911 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9912 exp->expType = ProcessType(specs, decl);
9914 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9925 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9927 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9929 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9931 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9932 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9935 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9936 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9938 void * ptr = inst->data + dataMember->offset + offset;
9939 char * result = (((void *)0));
9941 exp->loc = member->loc = inst->loc;
9942 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9943 if(!dataMember->dataType)
9944 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9945 type = dataMember->dataType;
9948 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9950 if(_class->type == 4)
9952 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9956 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9957 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9959 for(item = e->values.first; item; item = item->next)
9961 if(item->data == GetEnumValue(_class, ptr))
9963 result = item->name;
9969 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9971 exp->destType = MkClassType(_class->fullName);
9972 ProcessExpressionType(exp);
9976 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9978 if(!_class->dataType)
9979 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9980 type = _class->dataType;
9989 FreeExpContents(exp);
9990 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
9996 FreeExpContents(exp);
9997 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10003 FreeExpContents(exp);
10004 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10010 FreeExpContents(exp);
10011 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10017 FreeExpContents(exp);
10018 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10024 FreeExpContents(exp);
10025 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10030 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10033 ListAdd(memberList, member);
10035 if(parentDataMember->type == 1)
10040 void CheckTemplateTypes(struct Expression * exp)
10042 struct Expression * nbExp = GetNonBracketsExp(exp);
10044 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10046 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10047 struct Context * context;
10048 int kind = exp->expType->kind;
10052 exp->destType->refCount++;
10054 exp->expType->refCount++;
10055 newExp->prev = (((void *)0));
10056 newExp->next = (((void *)0));
10057 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10059 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10061 if(c->type == 2 || c->type == 4 || c->type == 3)
10064 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10065 kind = c->dataType->kind;
10071 if(exp->destType->classObjectType)
10074 exp->destType->refCount--;
10076 exp->expType->refCount--;
10077 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10081 struct __ecereNameSpace__ecere__sys__OldList * specs;
10082 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10083 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10085 context = PushContext();
10086 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10087 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10088 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10090 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10091 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10092 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10093 exp->__anon1.compound->__anon1.compound.context = context;
10094 PopContext(context);
10099 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10100 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))
10101 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10103 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10108 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10110 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10111 struct Context * context;
10112 int kind = exp->expType->kind;
10116 exp->destType->refCount++;
10118 exp->expType->refCount++;
10119 newExp->prev = (((void *)0));
10120 newExp->next = (((void *)0));
10121 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10123 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10125 if(c->type == 2 || c->type == 4 || c->type == 3)
10128 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10129 kind = c->dataType->kind;
10135 if(exp->destType->classObjectType)
10138 exp->destType->refCount--;
10140 exp->expType->refCount--;
10141 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10145 struct __ecereNameSpace__ecere__sys__OldList * specs;
10146 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10147 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10149 context = PushContext();
10150 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10151 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10152 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10154 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10155 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10156 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10157 exp->__anon1.compound->__anon1.compound.context = context;
10158 PopContext(context);
10163 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10166 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10167 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)));
10168 ProcessExpressionType((*exp->__anon1.list).first);
10174 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10176 exp->needTemplateCast = 2;
10177 newExp->needCast = 1;
10178 newExp->needTemplateCast = 2;
10179 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10181 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10182 exp->needTemplateCast = 2;
10183 newExp->needCast = 1;
10184 newExp->needTemplateCast = 2;
10185 ProcessExpressionType((*exp->__anon1.list).first);
10191 if(exp->expType->kind == 20)
10193 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10197 FreeType(exp->destType);
10198 FreeType(exp->expType);
10199 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10204 char typeString[1024];
10205 struct Declarator * decl;
10206 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10208 typeString[0] = '\0';
10209 PrintType(exp->expType, typeString, 0, 0);
10210 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10212 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10213 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10214 exp->__anon1.cast.exp->needCast = 1;
10215 exp->needTemplateCast = 2;
10216 newExp->needTemplateCast = 2;
10224 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10229 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10231 if(init->__anon1.exp && !init->__anon1.exp->destType)
10233 FreeType(init->__anon1.exp->destType);
10234 init->__anon1.exp->destType = type;
10238 if(init->__anon1.exp)
10240 ProcessExpressionType(init->__anon1.exp);
10241 init->isConstant = init->__anon1.exp->isConstant;
10247 struct Expression * exp = init->__anon1.exp;
10248 struct Instantiation * inst = exp->__anon1.instance;
10249 struct MembersInit * members;
10252 init->__anon1.list = MkList();
10255 for(members = (*inst->members).first; members; members = members->next)
10257 if(members->type == 0)
10259 struct MemberInit * member;
10261 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10263 ListAdd(init->__anon1.list, member->initializer);
10264 member->initializer = (((void *)0));
10269 FreeExpression(exp);
10273 struct Initializer * i;
10274 struct Type * initializerType = (((void *)0));
10275 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10276 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10277 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10278 int subMemberStackPos = 0;
10280 if(type && type->kind == 12)
10281 initializerType = Dereference(type);
10282 else if(type && (type->kind == 9 || type->kind == 10))
10283 initializerType = type->__anon1.__anon1.members.first;
10284 for(i = (*init->__anon1.list).first; i; i = i->next)
10286 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10288 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10291 if(!curMember->dataType)
10292 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10293 initializerType = curMember->dataType;
10296 ProcessInitializer(i, initializerType);
10297 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10298 initializerType = initializerType->next;
10300 init->isConstant = 0;
10302 if(type && type->kind == 12)
10303 FreeType(initializerType);
10304 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))
10306 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10313 void PopulateInstance(struct Instantiation * inst)
10315 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10316 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10317 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10318 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10321 inst->members = MkListOne(MkMembersInitList(memberList));
10323 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10324 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10326 if(!dataMember->isProperty)
10328 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10329 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10332 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10333 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10334 struct Type * type;
10335 void * ptr = inst->data + dataMember->offset;
10336 char * result = (((void *)0));
10338 exp->loc = member->loc = inst->loc;
10339 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10340 if(!dataMember->dataType)
10341 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10342 type = dataMember->dataType;
10343 if(type->kind == 8)
10345 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10347 if(_class->type == 4)
10349 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10353 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10354 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10356 for(item = e->values.first; item; item = item->next)
10358 if(item->data == GetEnumValue(_class, ptr))
10360 result = item->name;
10367 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10369 exp->destType = MkClassType(_class->fullName);
10370 ProcessExpressionType(exp);
10373 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10375 if(!_class->dataType)
10376 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10377 type = _class->dataType;
10386 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10392 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10398 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10404 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10410 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10415 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10418 ListAdd(memberList, member);
10424 int ComputeTypeSize(struct Type * type);
10426 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10428 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10429 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10431 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))
10433 int unionMemberOffset = 0;
10438 member->memberOffset = 0;
10439 if(targetBits < sizeof(void *) * 8)
10440 member->structAlignment = (short)0;
10442 else if(targetBits < sizeof(void *) * 8)
10443 _class->structAlignment = (short)0;
10444 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10445 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10446 if(!member && _class->destructionWatchOffset)
10447 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10449 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10451 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10453 if(!dataMember->isProperty)
10455 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10457 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10463 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10465 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10467 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10469 if(!isMember && _class->type == 2 && dataMember->dataType)
10471 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10475 ComputeTypeSize(dataMember->dataType);
10476 if(bitMember->pos == -1)
10477 bitMember->pos = _class->memberOffset;
10478 if(!bitMember->size)
10479 bitMember->size = dataMember->dataType->size * 8;
10480 _class->memberOffset = bitMember->pos + bitMember->size;
10481 for(d = 0; d < bitMember->size; d++)
10487 bitMember->mask = mask << bitMember->pos;
10489 else if(dataMember->type == 0 && dataMember->dataType)
10494 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)))
10495 ComputeTypeSize(dataMember->dataType);
10496 if(dataMember->dataType->bitFieldCount)
10498 bitFields += dataMember->dataType->bitFieldCount;
10505 int size = (bitFields + 7) / 8;
10509 int __simpleStruct0;
10513 short __simpleStruct0;
10515 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10516 if(member->memberOffset % alignment)
10517 member->memberOffset += alignment - (member->memberOffset % alignment);
10519 dataMember->offset = member->memberOffset;
10520 if(member->type == 1)
10521 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10524 member->memberOffset += size;
10531 short __simpleStruct0;
10533 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10534 if(_class->memberOffset % alignment)
10535 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10537 dataMember->offset = _class->memberOffset;
10538 _class->memberOffset += size;
10542 size = dataMember->dataType->size;
10543 alignment = dataMember->dataType->alignment;
10547 int __simpleStruct0;
10551 short __simpleStruct0;
10553 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10554 if(member->memberOffset % alignment)
10555 member->memberOffset += alignment - (member->memberOffset % alignment);
10557 dataMember->offset = member->memberOffset;
10558 if(member->type == 1)
10559 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10562 member->memberOffset += size;
10569 short __simpleStruct0;
10571 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10572 if(_class->memberOffset % alignment)
10573 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10575 dataMember->offset = _class->memberOffset;
10576 _class->memberOffset += size;
10583 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10584 alignment = dataMember->structAlignment;
10587 int __simpleStruct0;
10591 short __simpleStruct0;
10593 if(member->memberOffset % alignment)
10594 member->memberOffset += alignment - (member->memberOffset % alignment);
10595 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10597 dataMember->offset = member->memberOffset;
10598 if(member->type == 1)
10599 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10601 member->memberOffset += dataMember->memberOffset;
10607 short __simpleStruct0;
10609 if(_class->memberOffset % alignment)
10610 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10611 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10613 dataMember->offset = _class->memberOffset;
10614 _class->memberOffset += dataMember->memberOffset;
10622 int size = (bitFields + 7) / 8;
10626 int __simpleStruct0;
10630 short __simpleStruct0;
10632 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10633 if(member->memberOffset % alignment)
10634 member->memberOffset += alignment - (member->memberOffset % alignment);
10636 if(member->type == 1)
10637 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10640 member->memberOffset += size;
10647 short __simpleStruct0;
10649 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10650 if(_class->memberOffset % alignment)
10651 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10653 _class->memberOffset += size;
10658 if(member && member->type == 1)
10660 member->memberOffset = unionMemberOffset;
10664 if(_class->type != 2)
10668 if(_class->structAlignment)
10670 if(_class->memberOffset % _class->structAlignment)
10671 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10673 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10676 struct __ecereNameSpace__ecere__com__Property * prop;
10678 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10680 if(prop->isProperty && prop->isWatchable)
10682 prop->watcherOffset = _class->structSize;
10683 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10688 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10690 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10692 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10694 if(deriv->computeSize)
10696 deriv->offset = _class->structSize;
10697 deriv->memberOffset = 0;
10698 deriv->structSize = deriv->offset;
10699 ComputeClassMembers(deriv, 0);
10707 FinishTemplatesContext(context);
10710 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)
10712 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10713 unsigned int totalSize = 0;
10714 unsigned int maxSize = 0;
10717 struct __ecereNameSpace__ecere__com__DataMember * member;
10719 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10723 if(!isMember && _class->base)
10725 maxSize = _class->structSize;
10727 if(_class->type == 1 || _class->type == 5)
10728 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10731 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10733 if(maxSize > baseSize)
10734 maxSize -= baseSize;
10740 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10742 if(!member->isProperty)
10744 switch(member->type)
10748 if(member->dataTypeString)
10750 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10751 struct Declarator * decl;
10753 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10754 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10755 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10756 if(!member->dataType)
10757 member->dataType = ProcessType(specs, decl);
10758 ReplaceThisClassSpecifiers(specs, topClass);
10760 struct Type * type = ProcessType(specs, decl);
10762 DeclareType(neededBy, member->dataType, 1, 0);
10765 ComputeTypeSize(member->dataType);
10766 size = member->dataType->size;
10767 alignment = member->dataType->alignment;
10770 if(totalSize % alignment)
10771 totalSize += alignment - (totalSize % alignment);
10780 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10783 sprintf(id, "__anon%d", anonID++);
10785 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10786 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10787 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10788 alignment = member->structAlignment;
10791 if(totalSize % alignment)
10792 totalSize += alignment - (totalSize % alignment);
10802 unsigned int __simpleStruct0;
10804 if(topMember && topMember->type == 1)
10805 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10807 *retSize += totalSize;
10809 else if(totalSize < maxSize && _class->type != 1000)
10811 int autoPadding = 0;
10813 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10814 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10815 if(totalSize + autoPadding < maxSize)
10817 char sizeString[50];
10819 sprintf(sizeString, "%d", maxSize - totalSize);
10820 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10826 FinishTemplatesContext(context);
10827 return topMember ? topMember->memberID : _class->memberID;
10830 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)
10835 CheckConstCompatibility(source, dest, 1);
10836 if(source->kind == 20 && dest->kind != 20)
10838 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10843 if(dest->kind == 20 && source->kind != 20)
10845 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10850 if(dest->classObjectType == 2 && dest->kind != 11)
10852 if(source->classObjectType != 3)
10856 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10864 if(source->kind != 11 && source->classObjectType == 3)
10866 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10869 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10871 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))
10874 if(dest->kind == 14 && source->kind != 0)
10876 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))
10878 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))
10880 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10882 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10884 if(conversions != (((void *)0)))
10886 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10891 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10893 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10895 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10897 if(sourceBase == destBase)
10901 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))
10905 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4 && ((source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type != 4) || source->kind == 8))
10907 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10914 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10918 if(source->kind == 8)
10920 struct __ecereNameSpace__ecere__com__Class * _class;
10922 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10924 struct __ecereNameSpace__ecere__com__Property * convert;
10926 for(convert = _class->conversions.first; convert; convert = convert->next)
10928 if(convert->memberAccess == 1 || _class->module == privateModule)
10930 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10932 if(!convert->dataType)
10933 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10934 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))
10936 if(!conversions && !convert->Get)
10938 else if(conversions != (((void *)0)))
10940 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))
10944 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10946 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10955 if(dest->kind == 8)
10957 struct __ecereNameSpace__ecere__com__Class * _class;
10959 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10961 struct __ecereNameSpace__ecere__com__Property * convert;
10963 for(convert = _class->conversions.first; convert; convert = convert->next)
10965 if(convert->memberAccess == 1 || _class->module == privateModule)
10967 struct Type * constType = (((void *)0));
10968 unsigned int success = 0;
10970 if(!convert->dataType)
10971 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10972 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10974 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10976 constType = __extension__ ({
10977 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10979 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10981 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10982 ptrType->constant = 1;
10984 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10986 if(!conversions && !convert->Set)
10988 else if(conversions != (((void *)0)))
10990 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))
10994 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10996 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
11002 FreeType(constType);
11008 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11010 if(!dest->__anon1._class->__anon1.registered->dataType)
11011 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11012 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11014 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))
11021 if(source->kind == 8)
11023 struct __ecereNameSpace__ecere__com__Class * _class;
11025 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11027 struct __ecereNameSpace__ecere__com__Property * convert;
11029 for(convert = _class->conversions.first; convert; convert = convert->next)
11031 if(convert->memberAccess == 1 || _class->module == privateModule)
11033 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11035 if(!convert->dataType)
11036 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11037 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))
11039 if(!conversions && !convert->Get)
11041 else if(conversions != (((void *)0)))
11043 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))
11047 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11049 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11057 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11059 if(!source->__anon1._class->__anon1.registered->dataType)
11060 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11061 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11063 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))
11065 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11071 if(source->kind == 8 || source->kind == 19)
11073 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11075 else if(dest->kind == 7 && source->kind == 6)
11077 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11079 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11081 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11083 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11085 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11087 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))
11089 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))
11091 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)))
11093 struct Type * paramSource, * paramDest;
11095 if(dest->kind == 16)
11096 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11097 if(source->kind == 16)
11098 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11099 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11100 dest = dest->__anon1.type;
11101 if(source->kind == 13 && source->__anon1.type->kind == 11)
11102 source = source->__anon1.type;
11103 if(dest->kind == 16)
11104 dest = dest->__anon1.__anon3.method->dataType;
11105 if(source->kind == 16)
11106 source = source->__anon1.__anon3.method->dataType;
11107 paramSource = source->__anon1.__anon2.params.first;
11108 if(paramSource && paramSource->kind == 0)
11109 paramSource = (((void *)0));
11110 paramDest = dest->__anon1.__anon2.params.first;
11111 if(paramDest && paramDest->kind == 0)
11112 paramDest = (((void *)0));
11113 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11115 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))))
11117 if(paramDest && paramDest->kind == 8)
11118 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11120 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11123 paramDest = paramDest->next;
11125 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11127 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11129 if(dest->__anon1.__anon2.thisClass)
11131 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11133 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11139 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11141 if(owningClassDest)
11142 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11144 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11148 paramSource = paramSource->next;
11152 if(dest->__anon1.__anon2.thisClass)
11154 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11156 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11162 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11164 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11170 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11172 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11176 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11177 for(; paramDest; paramDest = paramDest->next)
11181 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11185 struct Type * paramDestType = paramDest;
11186 struct Type * paramSourceType = paramSource;
11187 struct Type * type = paramDestType;
11189 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11192 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11193 struct __ecereNameSpace__ecere__com__Class * sClass;
11195 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11198 if(sClass->templateClass)
11199 sClass = sClass->templateClass;
11200 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11202 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11204 for(sClass = sClass->base; sClass; sClass = sClass->base)
11206 if(sClass->templateClass)
11207 sClass = sClass->templateClass;
11208 id += sClass->templateParams.count;
11219 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11221 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11224 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)))
11229 PrintType(paramDest, type, 0, 1);
11230 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11231 if(paramDestType != paramDest)
11232 FreeType(paramDestType);
11235 if(paramDestType != paramDest)
11236 FreeType(paramDestType);
11238 paramSource = paramSource->next;
11242 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11247 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11251 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11253 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))
11255 ComputeTypeSize(source->__anon1.type);
11256 ComputeTypeSize(dest->__anon1.type);
11257 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))
11265 void ComputeInstantiation(struct Expression * exp)
11267 struct Instantiation * inst = exp->__anon1.instance;
11268 struct MembersInit * members;
11269 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11270 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11271 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11272 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11273 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11274 int subMemberStackPos = 0;
11277 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11281 if(_class->type == 0 || _class->type == 5)
11283 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11284 if(_class->type == 0)
11285 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11288 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11292 for(members = (*inst->members).first; members; members = members->next)
11294 switch(members->type)
11298 if(members->__anon1.dataMembers)
11300 struct MemberInit * member;
11302 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11304 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11305 unsigned int found = 0;
11306 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11307 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11308 unsigned int dataMemberOffset;
11312 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11315 if(curMember->isProperty)
11316 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11319 dataMember = curMember;
11320 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11321 if(_class->type == 0)
11322 dataMemberOffset += _class->base->structSize;
11329 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11333 if(prop->memberAccess == 1)
11335 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11336 curClass = prop->_class;
11341 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11342 int _subMemberStackPos = 0;
11344 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11348 if(dataMember->memberAccess == 1)
11350 curMember = dataMember;
11351 curClass = dataMember->_class;
11352 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11353 subMemberStackPos = _subMemberStackPos;
11358 if(found && member->initializer && member->initializer->type == 0)
11360 struct Expression * value = member->initializer->__anon1.exp;
11361 struct Type * type = (((void *)0));
11362 unsigned int deepMember = 0;
11366 type = prop->dataType;
11368 else if(dataMember)
11370 if(!dataMember->dataType)
11371 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11372 type = dataMember->dataType;
11374 if(ident && ident->next)
11377 for(ident = ident->next; ident && type; ident = ident->next)
11379 if(type->kind == 8)
11381 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11383 type = prop->dataType;
11386 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11388 type = dataMember->dataType;
11391 else if(type->kind == 9 || type->kind == 10)
11393 struct Type * memberType;
11395 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11397 if(!strcmp(memberType->name, ident->string))
11408 FreeType(value->destType);
11409 value->destType = type;
11412 ComputeExpression(value);
11414 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11416 if(type->kind == 8)
11418 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11420 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11422 if(!_class->dataType)
11423 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11424 type = _class->dataType;
11429 void * ptr = inst->data + dataMemberOffset;
11431 if(value->type == 2)
11437 GetInt(value, (int *)ptr);
11442 GetInt64(value, (long long *)ptr);
11447 GetIntPtr(value, (intptr_t *)ptr);
11452 GetIntSize(value, (ssize_t *)ptr);
11457 GetFloat(value, (float *)ptr);
11462 GetDouble(value, (double *)ptr);
11467 else if(value->type == 1)
11469 if(type->kind == 8)
11471 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11473 if(_class->type == 1)
11475 ComputeTypeSize(type);
11476 if(value->__anon1.instance->data)
11477 memcpy(ptr, value->__anon1.instance->data, type->size);
11482 else if(prop && prop->Set != (void *)(intptr_t)1)
11484 if(value->type == 1 && value->__anon1.instance->data)
11486 if(type->kind == 8)
11488 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11490 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)))
11492 void (* Set)(void *, void *) = (void *)prop->Set;
11494 Set(inst->data, value->__anon1.instance->data);
11495 PopulateInstance(inst);
11499 else if(value->type == 2)
11505 void (* Set)(void *, double) = (void *)prop->Set;
11507 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11512 void (* Set)(void *, float) = (void *)prop->Set;
11514 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11519 void (* Set)(void *, int) = (void *)prop->Set;
11521 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11526 void (* Set)(void *, long long) = (void *)prop->Set;
11528 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11533 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11535 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11540 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11542 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11547 else if(value->type == 3)
11551 ReadString(temp, value->__anon1.__anon2.string);
11552 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11556 else if(!deepMember && type && _class->type == 3)
11560 if(value->type == 2)
11562 if(type->kind == 8)
11564 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11566 if(_class->type == 3)
11568 if(!_class->dataType)
11569 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11570 type = _class->dataType;
11578 float (* Set)(float) = (void *)prop->Set;
11580 GetFloat(member->initializer->__anon1.exp, &fValue);
11581 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11588 double (* Set)(double) = (void *)prop->Set;
11590 GetDouble(member->initializer->__anon1.exp, &dValue);
11591 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11599 else if(!deepMember && type && _class->type == 2)
11603 if(value->type == 1 && value->__anon1.instance->data)
11605 unsigned int (* Set)(void *) = (void *)prop->Set;
11607 bits = Set(value->__anon1.instance->data);
11609 else if(value->type == 2)
11613 else if(dataMember)
11615 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11616 struct Type * type;
11619 bits = (bits & ~bitMember->mask);
11620 if(!bitMember->dataType)
11621 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11622 type = bitMember->dataType;
11623 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11625 if(!type->__anon1._class->__anon1.registered->dataType)
11626 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11627 type = type->__anon1._class->__anon1.registered->dataType;
11636 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11644 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11653 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11661 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11669 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11677 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11682 bits |= part << bitMember->pos;
11688 if(_class && _class->type == 3)
11690 ComputeExpression(member->initializer->__anon1.exp);
11691 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11693 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11703 if(_class && _class->type == 2)
11705 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11710 FreeInstance(inst);
11714 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11716 if(exp->__anon1.op.op == SIZEOF)
11718 FreeExpContents(exp);
11720 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11724 if(!exp->__anon1.op.exp1)
11726 switch(exp->__anon1.op.op)
11730 struct Expression * exp2 = exp->__anon1.op.exp2;
11732 exp->__anon1.op.exp2 = (((void *)0));
11733 FreeExpContents(exp);
11734 FreeType(exp->expType);
11735 FreeType(exp->destType);
11737 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11743 FreeExpContents(exp);
11744 op1->ops.Neg(exp, op1);
11748 if(op1->ops.BitNot)
11750 FreeExpContents(exp);
11751 op1->ops.BitNot(exp, op1);
11757 FreeExpContents(exp);
11758 op1->ops.Not(exp, op1);
11765 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11767 if(Promote(op2, op1->kind, op1->type->isSigned))
11768 op2->kind = op1->kind, op2->ops = op1->ops;
11769 else if(Promote(op1, op2->kind, op2->type->isSigned))
11770 op1->kind = op2->kind, op1->ops = op2->ops;
11772 switch(exp->__anon1.op.op)
11777 FreeExpContents(exp);
11778 op1->ops.Add(exp, op1, op2);
11784 FreeExpContents(exp);
11785 op1->ops.Sub(exp, op1, op2);
11791 FreeExpContents(exp);
11792 op1->ops.Mul(exp, op1, op2);
11798 FreeExpContents(exp);
11799 op1->ops.Div(exp, op1, op2);
11805 FreeExpContents(exp);
11806 op1->ops.Mod(exp, op1, op2);
11810 if(exp->__anon1.op.exp2)
11812 if(op1->ops.BitAnd)
11814 FreeExpContents(exp);
11815 op1->ops.BitAnd(exp, op1, op2);
11822 FreeExpContents(exp);
11823 op1->ops.BitOr(exp, op1, op2);
11827 if(op1->ops.BitXor)
11829 FreeExpContents(exp);
11830 op1->ops.BitXor(exp, op1, op2);
11834 if(op1->ops.LShift)
11836 FreeExpContents(exp);
11837 op1->ops.LShift(exp, op1, op2);
11841 if(op1->ops.RShift)
11843 FreeExpContents(exp);
11844 op1->ops.RShift(exp, op1, op2);
11850 FreeExpContents(exp);
11851 op1->ops.Equ(exp, op1, op2);
11857 FreeExpContents(exp);
11858 op1->ops.Nqu(exp, op1, op2);
11864 FreeExpContents(exp);
11865 op1->ops.And(exp, op1, op2);
11871 FreeExpContents(exp);
11872 op1->ops.Or(exp, op1, op2);
11878 FreeExpContents(exp);
11879 op1->ops.Grt(exp, op1, op2);
11885 FreeExpContents(exp);
11886 op1->ops.Sma(exp, op1, op2);
11890 if(op1->ops.GrtEqu)
11892 FreeExpContents(exp);
11893 op1->ops.GrtEqu(exp, op1, op2);
11897 if(op1->ops.SmaEqu)
11899 FreeExpContents(exp);
11900 op1->ops.SmaEqu(exp, op1, op2);
11908 void ApplyAnyObjectLogic(struct Expression * e)
11910 struct Type * destType = e->destType;
11912 if(destType && (destType->classObjectType == 3))
11914 if(e && e->expType)
11916 struct Type * type = e->expType;
11917 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11919 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11921 _class = type->__anon1._class->__anon1.registered;
11923 else if(type->kind == 19)
11925 _class = FindClass("ecere::com::Class")->__anon1.registered;
11929 char string[1024] = "";
11930 struct Symbol * classSym;
11932 PrintTypeNoConst(type, string, 0, 1);
11933 classSym = FindClass(string);
11935 _class = classSym->__anon1.registered;
11937 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)))
11939 if(!_class || strcmp(_class->fullName, "char *"))
11941 struct Expression * checkedExp = e, * newExp;
11943 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11945 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11947 if(checkedExp->type == 23)
11949 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11952 checkedExp = (*checkedExp->__anon1.list).last;
11954 else if(checkedExp->type == 11)
11955 checkedExp = checkedExp->__anon1.cast.exp;
11957 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11959 newExp = checkedExp->__anon1.op.exp2;
11960 checkedExp->__anon1.op.exp2 = (((void *)0));
11961 FreeExpContents(checkedExp);
11962 if(e->expType && e->expType->passAsTemplate)
11966 ComputeTypeSize(e->expType);
11967 sprintf(size, "%d", e->expType->size);
11968 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))))));
11970 ReplaceExpContents(checkedExp, newExp);
11971 e->byReference = 1;
11973 else if(!e->byReference || (_class && _class->type == 5))
11975 struct Expression * checkedExp;
11978 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;
11980 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11982 struct Context * context = PushContext();
11983 struct Declarator * decl;
11984 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11985 char typeString[1024];
11986 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11988 typeString[0] = '\0';
11990 newExp->prev = (((void *)0));
11991 newExp->next = (((void *)0));
11992 newExp->expType = (((void *)0));
11993 PrintTypeNoConst(e->expType, typeString, 0, 1);
11994 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11995 newExp->destType = ProcessType(specs, decl);
11996 curContext = context;
12000 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
12003 sprintf(name, "__internalValue%03X", internalValueCounter++);
12004 if(!curCompound->__anon1.compound.declarations)
12005 curCompound->__anon1.compound.declarations = MkList();
12006 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12007 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12008 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12009 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12012 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12014 struct Type * type = e->destType;
12016 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12017 CopyTypeInto(e->destType, type);
12018 e->destType->refCount = 1;
12019 e->destType->classObjectType = 0;
12022 e->__anon1.compound->__anon1.compound.context = context;
12023 PopContext(context);
12024 curContext = context->parent;
12028 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12030 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12032 if(checkedExp->type == 23)
12034 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12037 checkedExp = (*checkedExp->__anon1.list).last;
12039 else if(checkedExp->type == 11)
12040 checkedExp = checkedExp->__anon1.cast.exp;
12043 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12045 *operand = *checkedExp;
12046 __ecereMethod_Expression_Clear(checkedExp);
12047 checkedExp->destType = ProcessTypeString("void *", 0);
12048 checkedExp->expType = checkedExp->destType;
12049 checkedExp->destType->refCount++;
12050 checkedExp->type = 4;
12051 checkedExp->__anon1.op.op = '&';
12052 checkedExp->__anon1.op.exp1 = (((void *)0));
12053 checkedExp->__anon1.op.exp2 = operand;
12062 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))))
12064 if(e->expType->classObjectType && destType && destType->classObjectType)
12070 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12073 thisExp->prev = (((void *)0));
12074 thisExp->next = (((void *)0));
12075 __ecereMethod_Expression_Clear(e);
12077 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12078 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12079 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12081 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12082 CopyTypeInto(e->expType, thisExp->expType);
12083 e->expType->byReference = 0;
12084 e->expType->refCount = 1;
12085 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))
12087 e->expType->classObjectType = 0;
12092 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12094 if(destType->kind == 14)
12096 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12098 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))
12100 unsigned int byReference = e->expType->byReference;
12101 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12102 struct Declarator * decl;
12103 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12104 char typeString[1024];
12105 struct Type * type;
12106 int backupClassObjectType;
12107 unsigned int backupByReference;
12109 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12113 backupClassObjectType = type->classObjectType;
12114 backupByReference = type->byReference;
12115 type->classObjectType = 0;
12116 type->byReference = 0;
12117 typeString[0] = '\0';
12118 PrintType(type, typeString, 0, 1);
12119 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12120 type->classObjectType = backupClassObjectType;
12121 type->byReference = backupByReference;
12123 thisExp->prev = (((void *)0));
12124 thisExp->next = (((void *)0));
12125 __ecereMethod_Expression_Clear(e);
12126 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)))
12128 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12131 destType->refCount++;
12133 e->__anon1.op.op = '*';
12134 e->__anon1.op.exp1 = (((void *)0));
12135 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12136 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12137 CopyTypeInto(t, thisExp->destType);
12138 t->passAsTemplate = 0;
12139 FreeType(thisExp->destType);
12140 thisExp->destType = t;
12141 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12142 CopyTypeInto(t, destType);
12143 t->passAsTemplate = passAsTemplate;
12144 FreeType(destType);
12146 destType->refCount = 0;
12147 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12148 CopyTypeInto(e->expType, type);
12149 if(type->passAsTemplate)
12151 e->expType->classObjectType = 0;
12152 e->expType->passAsTemplate = 0;
12154 e->expType->byReference = 0;
12155 e->expType->refCount = 1;
12160 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12161 e->__anon1.cast.exp = thisExp;
12162 e->byReference = 1;
12167 FreeType(e->destType);
12168 e->destType = destType;
12169 destType->refCount++;
12174 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12176 struct __ecereNameSpace__ecere__com__Class * _class;
12177 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12179 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12180 ComputeModuleClasses(subModule->data);
12181 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12182 ComputeClassMembers(_class, 0);
12185 int ComputeTypeSize(struct Type * type)
12187 unsigned int size = type ? type->size : 0;
12189 if(!size && type && !type->computing)
12191 type->computing = 1;
12195 type->alignment = size = sizeof(char);
12198 type->alignment = size = sizeof(char);
12201 type->alignment = size = sizeof(int);
12204 type->alignment = size = sizeof(long long);
12207 type->alignment = size = targetBits / 8;
12208 type->pointerAlignment = 1;
12211 type->alignment = size = targetBits / 8;
12212 type->pointerAlignment = 1;
12215 type->alignment = size = sizeof(long);
12218 type->alignment = size = sizeof(short);
12221 type->alignment = size = sizeof(float);
12224 type->alignment = size = sizeof(double);
12228 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12230 if(_class && _class->type == 1)
12232 ComputeClassMembers(_class, 0);
12233 type->alignment = _class->structAlignment;
12234 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12235 size = _class->structSize;
12236 if(type->alignment && size % type->alignment)
12237 size += type->alignment - (size % type->alignment);
12239 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12241 if(!_class->dataType)
12242 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12243 size = type->alignment = ComputeTypeSize(_class->dataType);
12247 size = type->alignment = targetBits / 8;
12248 type->pointerAlignment = 1;
12254 size = type->alignment = targetBits / 8;
12255 type->pointerAlignment = 1;
12258 if(type->__anon1.__anon4.arraySizeExp)
12260 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12261 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12262 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)))
12264 struct Location oldLoc = yylloc;
12265 char expression[10240];
12267 expression[0] = '\0';
12268 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12269 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12271 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12272 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12275 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12277 else if(type->__anon1.__anon4.enumClass)
12279 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12281 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12284 type->__anon1.__anon4.arraySize = 0;
12288 type->__anon1.__anon4.arraySize = 0;
12290 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12291 if(type->__anon1.type)
12293 type->alignment = type->__anon1.type->alignment;
12294 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12299 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12301 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12303 if(symbol && symbol->type)
12305 ComputeTypeSize(symbol->type);
12306 size = symbol->type->size;
12311 struct Type * member;
12313 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12315 int __simpleStruct0, __simpleStruct1;
12316 unsigned int addSize = ComputeTypeSize(member);
12318 member->offset = size;
12319 if(member->alignment && size % member->alignment)
12320 member->offset += member->alignment - (size % member->alignment);
12321 size = member->offset;
12322 if(member->pointerAlignment && type->size <= 4)
12323 type->pointerAlignment = 1;
12324 else if(!member->pointerAlignment && member->alignment >= 8)
12325 type->pointerAlignment = 0;
12326 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12329 if(type->alignment && size % type->alignment)
12330 size += type->alignment - (size % type->alignment);
12336 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12338 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12340 if(symbol && symbol->type)
12342 ComputeTypeSize(symbol->type);
12343 size = symbol->type->size;
12344 type->alignment = symbol->type->alignment;
12349 struct Type * member;
12351 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12353 int __simpleStruct0, __simpleStruct1;
12354 unsigned int addSize = ComputeTypeSize(member);
12356 member->offset = size;
12357 if(member->alignment && size % member->alignment)
12358 member->offset += member->alignment - (size % member->alignment);
12359 size = member->offset;
12360 if(member->pointerAlignment && type->size <= 4)
12361 type->pointerAlignment = 1;
12362 else if(!member->pointerAlignment && member->alignment >= 8)
12363 type->pointerAlignment = 0;
12364 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12365 size = ((size > addSize) ? size : addSize);
12367 if(type->alignment && size % type->alignment)
12368 size += type->alignment - (size % type->alignment);
12374 struct TemplateParameter * param = type->__anon1.templateParameter;
12375 struct Type * baseType = ProcessTemplateParameterType(param);
12379 size = ComputeTypeSize(baseType);
12380 type->alignment = baseType->alignment;
12381 type->pointerAlignment = baseType->pointerAlignment;
12384 type->alignment = size = sizeof(uint64);
12389 type->alignment = size = sizeof(enum
12397 type->alignment = size = targetBits / 8;
12398 type->pointerAlignment = 1;
12403 type->computing = 0;
12408 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12410 struct External * external = (((void *)0));
12411 struct Symbol * classSym = FindClass(name);
12412 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12413 struct Specifier * curSpec = (((void *)0));
12415 if(!inCompiler || !classSym)
12416 return (((void *)0));
12417 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12418 return (((void *)0));
12419 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12420 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12421 external = classSym->__anon2.__anon1.structExternal;
12422 if(external && external->__anon1.declaration)
12424 struct Specifier * spec;
12426 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12427 if(spec->type == 3 || spec->type == 4)
12430 curDeclarations = spec->__anon1.__anon2.definitions;
12434 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12436 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12437 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12438 char structName[1024];
12439 unsigned int addedPadding = 0;
12441 classSym->declaring++;
12442 if(strchr(classSym->string, '<'))
12444 if(classSym->__anon1.registered->templateClass)
12446 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12447 classSym->declaring--;
12451 structName[0] = (char)0;
12452 FullClassNameCat(structName, name, 0);
12453 classSym->declaredStructSym = 1;
12454 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12456 unsigned int add = 0;
12460 external = MkExternalDeclaration((((void *)0)));
12461 classSym->__anon2.__anon1.structExternal = external;
12462 external->symbol = classSym;
12467 declarations = MkList();
12468 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12470 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12472 FreeList(declarations, (void *)(FreeClassDef));
12473 declarations = (((void *)0));
12475 if(classSym->__anon1.registered->type != 5 && !declarations)
12477 FreeExternal(external);
12478 external = (((void *)0));
12479 classSym->__anon2.__anon1.structExternal = (((void *)0));
12484 curSpec->__anon1.__anon2.definitions = declarations;
12487 char className[1024];
12489 strcpy(className, "__ecereClass_");
12490 FullClassNameCat(className, classSym->string, 1);
12491 specifiers = MkList();
12492 declarators = MkList();
12493 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12494 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12497 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12500 classSym->declaring--;
12502 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12504 classSym->declaredStructSym = 1;
12505 if(classSym->__anon1.registered)
12506 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12507 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12509 struct Specifier * spec;
12511 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12513 if(spec->__anon1.__anon2.definitions)
12514 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12518 if(inCompiler && neededBy && (external || !classSym->imported))
12522 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12523 external->symbol = classSym;
12524 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12528 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12530 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12531 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12534 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12539 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)
12541 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12542 unsigned int found = 0;
12543 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12544 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12545 unsigned int freeType = 0;
12547 yylloc = member->loc;
12552 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12556 dataMember = *curMember;
12562 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12563 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12564 int _subMemberStackPos = 0;
12567 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12570 dataMember = thisMember;
12571 if(curMember && thisMember->memberAccess == 1)
12573 *curMember = thisMember;
12574 *curClass = thisMember->_class;
12575 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12576 *subMemberStackPos = _subMemberStackPos;
12582 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12583 if(method && method->type == 1)
12586 method = (((void *)0));
12591 struct Type * type = (((void *)0));
12595 if(!dataMember->dataType && dataMember->dataTypeString)
12597 struct Context * context = SetupTemplatesContext(_class);
12599 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12600 FinishTemplatesContext(context);
12602 type = dataMember->dataType;
12606 if(!method->dataType)
12607 ProcessMethodType(method);
12608 type = method->dataType;
12610 if(ident && ident->next)
12612 for(ident = ident->next; ident && type; ident = ident->next)
12614 if(type->kind == 8)
12616 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12618 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12620 type = dataMember->dataType;
12622 else if(type->kind == 9 || type->kind == 10)
12624 struct Type * memberType;
12626 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12628 if(!strcmp(memberType->name, ident->string))
12637 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12640 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12641 struct __ecereNameSpace__ecere__com__Class * sClass;
12643 for(sClass = _class; sClass; sClass = sClass->base)
12646 if(sClass->templateClass)
12647 sClass = sClass->templateClass;
12648 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12650 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12652 for(sClass = sClass->base; sClass; sClass = sClass->base)
12654 if(sClass->templateClass)
12655 sClass = sClass->templateClass;
12656 id += sClass->templateParams.count;
12667 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12669 if(arg.__anon1.__anon1.dataTypeString)
12671 unsigned int constant = type->constant;
12673 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12674 if(type->kind == 8 && constant)
12675 type->constant = 1;
12676 else if(type->kind == 13)
12678 struct Type * t = type->__anon1.type;
12680 while(t->kind == 13)
12681 t = t->__anon1.type;
12683 t->constant = constant;
12686 if(type && _class->templateClass)
12687 type->passAsTemplate = 1;
12694 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12696 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12697 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12698 int paramCount = 0;
12699 int lastParam = -1;
12700 char templateString[1024];
12701 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12703 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12704 for(cClass = expClass; cClass; cClass = cClass->base)
12708 if(cClass->templateClass)
12709 cClass = cClass->templateClass;
12710 for(param = cClass->templateParams.first; param; param = param->next)
12713 struct __ecereNameSpace__ecere__com__Class * sClass;
12714 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12716 for(sClass = cClass->base; sClass; sClass = sClass->base)
12718 if(sClass->templateClass)
12719 sClass = sClass->templateClass;
12720 id += sClass->templateParams.count;
12722 arg = expClass->templateArgs[id];
12723 for(sClass = _class; sClass; sClass = sClass->base)
12725 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12727 struct __ecereNameSpace__ecere__com__Class * nextClass;
12729 if(sClass->templateClass)
12730 sClass = sClass->templateClass;
12731 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12733 if(nextClass->templateClass)
12734 nextClass = nextClass->templateClass;
12735 p += nextClass->templateParams.count;
12737 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12739 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12741 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12743 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12744 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12751 char argument[256];
12753 argument[0] = '\0';
12754 switch(param->type)
12758 char expString[1024];
12759 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12760 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12761 struct Expression * exp;
12762 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12764 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12765 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12766 ProcessExpressionType(exp);
12767 ComputeExpression(exp);
12768 expString[0] = '\0';
12769 PrintExpression(exp, expString);
12770 strcat(argument, expString);
12771 FreeExpression(exp);
12776 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12781 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12782 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12789 strcat(templateString, ", ");
12790 if(lastParam != p - 1)
12792 strcat(templateString, param->name);
12793 strcat(templateString, " = ");
12795 strcat(templateString, argument);
12804 int len = strlen(templateString);
12806 if(templateString[len - 1] == '<')
12810 if(templateString[len - 1] == '>')
12811 templateString[len++] = ' ';
12812 templateString[len++] = '>';
12814 templateString[len++] = '\0';
12817 struct Context * context = SetupTemplatesContext(_class);
12821 type = ProcessTypeString(templateString, 0);
12823 FinishTemplatesContext(context);
12826 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12828 ProcessExpressionType(member->initializer->__anon1.exp);
12829 if(!member->initializer->__anon1.exp->expType)
12833 char expString[10240];
12835 expString[0] = '\0';
12836 PrintExpression(member->initializer->__anon1.exp, expString);
12837 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12838 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12841 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12843 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12846 else if(member->initializer)
12848 ProcessInitializer(member->initializer, type);
12855 if(_class && _class->type == 3)
12857 if(member->initializer)
12859 struct Type * type = MkClassType(_class->fullName);
12861 ProcessInitializer(member->initializer, type);
12867 if(member->initializer)
12869 ProcessInitializer(member->initializer, (((void *)0)));
12875 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12879 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12881 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12885 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12890 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12892 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12894 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)))
12896 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12898 if(_class->type == 4)
12900 struct __ecereNameSpace__ecere__sys__OldList converts =
12904 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12907 if(!_class->symbol)
12908 _class->symbol = FindClass(_class->fullName);
12909 type->__anon1._class = _class->symbol;
12910 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))
12912 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12913 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12917 struct __ecereNameSpace__ecere__com__Class * baseClass;
12919 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12921 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12923 for(value = e->values.first; value; value = value->next)
12925 if(!strcmp(value->name, string))
12930 FreeType(sourceExp->expType);
12931 sourceExp->isConstant = 1;
12932 sourceExp->expType = MkClassType(baseClass->fullName);
12933 if(inCompiler || inPreCompiler || inDebugger)
12935 char constant[256];
12937 FreeExpContents(sourceExp);
12938 sourceExp->type = 2;
12939 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12940 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12942 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12943 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12945 while(converts.first)
12947 struct Conversion * convert = converts.first;
12949 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12950 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12952 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12959 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12960 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12963 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)))
12964 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12969 void ComputeExpression(struct Expression * exp)
12975 struct Identifier * id = exp->__anon1.__anon1.identifier;
12977 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12979 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12981 if(c && c->type == 4)
12983 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12987 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12988 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
12990 for(value = e->values.first; value; value = value->next)
12992 if(!strcmp(value->name, id->string))
12997 const char * dts = c->dataTypeString;
12999 FreeExpContents(exp);
13001 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13010 ComputeInstantiation(exp);
13015 struct Expression * exp1, * exp2 = (((void *)0));
13016 struct Operand op1 =
13023 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
13026 struct Operand op2 =
13033 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
13037 if(exp->__anon1.op.exp2)
13039 struct Expression * e = exp->__anon1.op.exp2;
13041 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13043 if(e->type == 5 || e->type == 32 || e->type == 23)
13046 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13048 e = (*e->__anon1.list).last;
13051 if(exp->__anon1.op.op == 261 && e && e->expType)
13053 if(e->type == 3 && e->__anon1.__anon2.string)
13055 char * string = e->__anon1.__anon2.string;
13056 int len = strlen(string);
13057 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13059 len = UnescapeString(tmp, string + 1, len - 2);
13060 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13061 FreeExpContents(exp);
13063 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13067 struct Type * type = e->expType;
13070 FreeExpContents(exp);
13072 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13078 ComputeExpression(exp->__anon1.op.exp2);
13080 if(exp->__anon1.op.exp1)
13082 ComputeExpression(exp->__anon1.op.exp1);
13083 exp1 = exp->__anon1.op.exp1;
13084 exp2 = exp->__anon1.op.exp2;
13085 op1 = GetOperand(exp1);
13087 op1.type->refCount++;
13090 op2 = GetOperand(exp2);
13092 op2.type->refCount++;
13097 exp1 = exp->__anon1.op.exp2;
13098 op1 = GetOperand(exp1);
13100 op1.type->refCount++;
13102 CallOperator(exp, exp1, exp2, &op1, &op2);
13104 FreeType(op1.type);
13106 FreeType(op2.type);
13112 struct Expression * e, * n;
13114 for(e = (*exp->__anon1.list).first; e; e = n)
13119 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13120 struct Expression * prev = exp->prev;
13121 struct Expression * next = exp->next;
13123 ComputeExpression(e);
13124 FreeType(exp->expType);
13125 FreeType(exp->destType);
13129 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13130 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13141 struct Expression * memberExp = exp->__anon1.member.exp;
13142 struct Identifier * memberID = exp->__anon1.member.member;
13143 struct Type * type;
13145 ComputeExpression(exp->__anon1.member.exp);
13146 type = exp->__anon1.member.exp->expType;
13149 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)));
13150 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13151 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13152 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13154 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13155 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13159 struct Symbol * classSym;
13162 PrintTypeNoConst(type, string, 0, 1);
13163 classSym = FindClass(string);
13164 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13166 if(exp->__anon1.member.member)
13168 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13170 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13172 if(!prop && !member && _class && exp->__anon1.member.member)
13174 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13176 convertTo = _class;
13177 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13178 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13184 struct Type * type = prop->dataType;
13186 if(_class->type == 3)
13188 if(type->kind == 8)
13190 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13192 if(_class->type == 3)
13194 if(!_class->dataType)
13195 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13196 type = _class->dataType;
13204 float (* Get)(float) = (void *)prop->Get;
13206 GetFloat(exp->__anon1.member.exp, &value);
13207 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13214 double (* Get)(double);
13216 GetDouble(exp->__anon1.member.exp, &value);
13218 Get = (void *)prop->Set;
13220 Get = (void *)prop->Get;
13221 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13231 struct Expression * value = exp->__anon1.member.exp;
13232 struct Type * type;
13234 if(!prop->dataType)
13235 ProcessPropertyType(prop);
13236 type = prop->dataType;
13240 else if(_class->type == 1)
13246 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13248 if(propertyClass->type == 1 && value->type == 1)
13250 void (* Set)(void *, void *) = (void *)prop->Set;
13252 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13253 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13254 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13255 exp->__anon1.instance->loc = exp->loc;
13257 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13258 PopulateInstance(exp->__anon1.instance);
13265 void (* Set)(void *, int) = (void *)prop->Set;
13267 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13268 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13269 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13270 exp->__anon1.instance->loc = exp->loc;
13272 GetInt(value, &intValue);
13273 Set(exp->__anon1.instance->data, intValue);
13274 PopulateInstance(exp->__anon1.instance);
13279 long long intValue;
13280 void (* Set)(void *, long long) = (void *)prop->Set;
13282 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13283 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13284 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13285 exp->__anon1.instance->loc = exp->loc;
13287 GetInt64(value, &intValue);
13288 Set(exp->__anon1.instance->data, intValue);
13289 PopulateInstance(exp->__anon1.instance);
13295 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13297 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13298 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13299 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13300 exp->__anon1.instance->loc = exp->loc;
13302 GetIntPtr(value, &intValue);
13303 Set(exp->__anon1.instance->data, intValue);
13304 PopulateInstance(exp->__anon1.instance);
13310 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13312 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13313 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13314 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13315 exp->__anon1.instance->loc = exp->loc;
13317 GetIntSize(value, &intValue);
13318 Set(exp->__anon1.instance->data, intValue);
13319 PopulateInstance(exp->__anon1.instance);
13325 void (* Set)(void *, float) = (void *)prop->Set;
13327 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13328 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13329 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13330 exp->__anon1.instance->loc = exp->loc;
13332 GetFloat(value, &floatValue);
13333 Set(exp->__anon1.instance->data, floatValue);
13334 PopulateInstance(exp->__anon1.instance);
13339 double doubleValue;
13340 void (* Set)(void *, double) = (void *)prop->Set;
13342 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13343 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13344 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13345 exp->__anon1.instance->loc = exp->loc;
13347 GetDouble(value, &doubleValue);
13348 Set(exp->__anon1.instance->data, doubleValue);
13349 PopulateInstance(exp->__anon1.instance);
13354 else if(_class->type == 2)
13360 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13362 if(propertyClass->type == 1 && value->__anon1.instance->data)
13364 unsigned int (* Set)(void *) = (void *)prop->Set;
13365 unsigned int bits = Set(value->__anon1.instance->data);
13367 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13371 else if(_class->type == 2)
13373 unsigned int value;
13374 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13377 GetUInt(exp->__anon1.member.exp, &value);
13379 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13388 if(_class->type == 2)
13390 unsigned int value;
13392 GetUInt(exp->__anon1.member.exp, &value);
13397 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13399 if(_class->type == 1)
13401 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13403 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13404 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13405 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13406 exp->__anon1.instance->loc = exp->loc;
13408 Get(value, exp->__anon1.instance->data);
13409 PopulateInstance(exp->__anon1.instance);
13411 else if(_class->type == 2)
13413 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13414 uint64 bits = Get(value);
13416 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13423 else if(_class->type == 1)
13425 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13431 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13433 if(_class->type == 1 && value)
13435 void (* Get)(void *, void *) = (void *)prop->Get;
13437 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13438 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13439 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13440 exp->__anon1.instance->loc = exp->loc;
13442 Get(value, exp->__anon1.instance->data);
13443 PopulateInstance(exp->__anon1.instance);
13454 exp->isConstant = 0;
13463 FreeExpression(memberExp);
13464 FreeIdentifier(memberID);
13470 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13472 FreeExpContents(exp);
13473 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13480 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13482 if(classSym && classSym->__anon1.registered)
13484 if(classSym->__anon1.registered->fixed)
13486 FreeSpecifier(exp->__anon1._class);
13487 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13492 char className[1024];
13494 strcpy(className, "__ecereClass_");
13495 FullClassNameCat(className, classSym->string, 1);
13496 DeclareClass(curExternal, classSym, className);
13497 FreeExpContents(exp);
13499 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13500 exp->__anon1.member.member = MkIdentifier("structSize");
13507 struct Type * type;
13508 struct Expression * e = exp;
13510 if(exp->type == 11)
13512 if(exp->__anon1.cast.exp)
13513 ComputeExpression(exp->__anon1.cast.exp);
13514 e = exp->__anon1.cast.exp;
13516 if(e && exp->expType)
13518 type = exp->expType;
13519 if(type->kind == 8)
13521 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13523 if(_class && (_class->type == 3 || _class->type == 2))
13525 if(!_class->dataType)
13526 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13527 type = _class->dataType;
13536 char value = (char)0;
13538 if(GetChar(e, &value))
13540 FreeExpContents(exp);
13541 exp->__anon1.__anon1.constant = PrintChar(value);
13547 unsigned char value = (unsigned char)0;
13549 if(GetUChar(e, &value))
13551 FreeExpContents(exp);
13552 exp->__anon1.__anon1.constant = PrintUChar(value);
13560 short value = (short)0;
13562 if(GetShort(e, &value))
13564 FreeExpContents(exp);
13565 exp->__anon1.__anon1.constant = PrintShort(value);
13571 unsigned short value = (unsigned short)0;
13573 if(GetUShort(e, &value))
13575 FreeExpContents(exp);
13576 exp->__anon1.__anon1.constant = PrintUShort(value);
13586 if(GetInt(e, &value))
13588 FreeExpContents(exp);
13589 exp->__anon1.__anon1.constant = PrintInt(value);
13595 unsigned int value = 0;
13597 if(GetUInt(e, &value))
13599 FreeExpContents(exp);
13600 exp->__anon1.__anon1.constant = PrintUInt(value);
13608 long long value = 0;
13610 if(GetInt64(e, &value))
13612 FreeExpContents(exp);
13613 exp->__anon1.__anon1.constant = PrintInt64(value);
13621 if(GetUInt64(e, &value))
13623 FreeExpContents(exp);
13624 exp->__anon1.__anon1.constant = PrintUInt64(value);
13632 intptr_t value = 0;
13634 if(GetIntPtr(e, &value))
13636 FreeExpContents(exp);
13637 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13643 uintptr_t value = 0;
13645 if(GetUIntPtr(e, &value))
13647 FreeExpContents(exp);
13648 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13658 if(GetIntSize(e, &value))
13660 FreeExpContents(exp);
13661 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13669 if(GetUIntSize(e, &value))
13671 FreeExpContents(exp);
13672 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13681 if(GetFloat(e, &value))
13683 FreeExpContents(exp);
13684 exp->__anon1.__anon1.constant = PrintFloat(value);
13693 if(GetDouble(e, &value))
13695 FreeExpContents(exp);
13696 exp->__anon1.__anon1.constant = PrintDouble(value);
13707 struct Operand op1 =
13714 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
13717 struct Operand op2 =
13724 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
13727 struct Operand op3 =
13734 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
13738 if(exp->__anon1.cond.exp)
13739 ComputeExpression((*exp->__anon1.cond.exp).last);
13740 if(exp->__anon1.cond.elseExp)
13741 ComputeExpression(exp->__anon1.cond.elseExp);
13742 if(exp->__anon1.cond.cond)
13743 ComputeExpression(exp->__anon1.cond.cond);
13744 op1 = GetOperand(exp->__anon1.cond.cond);
13746 op1.type->refCount++;
13747 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13749 op2.type->refCount++;
13750 op3 = GetOperand(exp->__anon1.cond.elseExp);
13752 op3.type->refCount++;
13755 FreeExpContents(exp);
13756 op1.ops.Cond(exp, &op1, &op2, &op3);
13759 FreeType(op1.type);
13761 FreeType(op2.type);
13763 FreeType(op3.type);
13769 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13771 struct __ecereNameSpace__ecere__com__Instance * module;
13773 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))
13775 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))
13777 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))
13779 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)
13781 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13787 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13789 struct Type * source;
13790 struct Type * realDest = dest;
13791 struct Type * backupSourceExpType = (((void *)0));
13792 struct Expression * computedExp = sourceExp;
13795 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)
13797 computedExp = CopyExpression(sourceExp);
13798 ComputeExpression(computedExp);
13800 source = sourceExp->expType;
13801 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13803 if(computedExp != sourceExp)
13805 FreeExpression(computedExp);
13806 computedExp = sourceExp;
13811 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13813 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13815 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13817 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13819 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13821 if(sourceBase == destBase)
13823 if(computedExp != sourceExp)
13825 FreeExpression(computedExp);
13826 computedExp = sourceExp;
13835 struct __ecereNameSpace__ecere__sys__OldList * specs;
13836 unsigned int flag = 0;
13837 long long value = (((int)0x7fffffff));
13839 source->refCount++;
13840 if(computedExp->type == 2)
13842 if(source->isSigned)
13843 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13845 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13847 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13849 if(source->isSigned)
13850 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13852 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13854 if(computedExp != sourceExp)
13856 FreeExpression(computedExp);
13857 computedExp = sourceExp;
13859 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13862 source = __extension__ ({
13863 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13865 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13868 if(dest->kind == 8)
13870 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13872 if(_class && _class->type == 3)
13874 if(source->kind != 8)
13876 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13877 struct Type * tempDest, * tempSource;
13879 for(; _class->base->type != 1000; _class = _class->base)
13882 tempDest = tempType;
13883 tempType->kind = 8;
13884 if(!_class->symbol)
13885 _class->symbol = FindClass(_class->fullName);
13886 tempType->__anon1._class = _class->symbol;
13887 tempType->truth = dest->truth;
13888 if(tempType->__anon1._class)
13889 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13890 backupSourceExpType = sourceExp->expType;
13891 if(dest->passAsTemplate)
13893 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13894 CopyTypeInto(sourceExp->expType, dest);
13895 sourceExp->expType->passAsTemplate = 0;
13899 sourceExp->expType = dest;
13903 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13906 if(_class && _class->type == 2 && source->kind != 8)
13908 if(!dest->__anon1._class->__anon1.registered->dataType)
13909 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13910 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13913 FreeType(sourceExp->expType);
13914 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13915 source->refCount++;
13918 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13920 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13921 struct Declarator * decl;
13924 ReadString(string, sourceExp->__anon1.__anon2.string);
13925 decl = SpecDeclFromString(string, specs, (((void *)0)));
13926 FreeExpContents(sourceExp);
13927 FreeType(sourceExp->expType);
13928 sourceExp->type = 24;
13929 sourceExp->__anon1._classExp.specifiers = specs;
13930 sourceExp->__anon1._classExp.decl = decl;
13931 sourceExp->expType = dest;
13935 if(backupSourceExpType)
13936 FreeType(backupSourceExpType);
13940 else if(source->kind == 8)
13942 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13944 if(_class && (_class->type == 3 || _class->type == 2))
13946 if(dest->kind != 8)
13948 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13949 struct Type * tempDest, * tempSource;
13951 if(!source->__anon1._class->__anon1.registered->dataType)
13952 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13953 for(; _class->base->type != 1000; _class = _class->base)
13956 tempSource = tempType;
13957 tempType->kind = 8;
13958 tempType->__anon1._class = FindClass(_class->fullName);
13959 tempType->truth = source->truth;
13960 tempType->classObjectType = source->classObjectType;
13961 if(tempType->__anon1._class)
13962 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13963 if(conversions && conversions->last)
13965 ((struct Conversion *)conversions->last)->resultType = dest;
13968 FreeType(sourceExp->expType);
13969 sourceExp->expType = MkClassType(_class->fullName);
13970 sourceExp->expType->truth = source->truth;
13971 sourceExp->expType->classObjectType = source->classObjectType;
13972 if(!sourceExp->destType)
13974 FreeType(sourceExp->destType);
13975 sourceExp->destType = sourceExp->expType;
13976 if(sourceExp->expType)
13977 sourceExp->expType->refCount++;
13979 if(!_class->dataType)
13980 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13982 dest = MkClassType(source->__anon1._class->string);
13983 dest->truth = source->truth;
13984 dest->classObjectType = source->classObjectType;
13986 source = _class->dataType;
13987 source->refCount++;
13988 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13994 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14001 if(dest->kind == 8)
14003 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14004 unsigned int fittingValue = 0;
14006 if(_class && _class->type == 4)
14008 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14009 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14011 if(c && value >= 0 && value <= c->largest)
14014 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14016 if(_class->type == 0 || _class->type == 5)
14018 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14020 *newExp = *sourceExp;
14021 if(sourceExp->destType)
14022 sourceExp->destType->refCount++;
14023 if(sourceExp->expType)
14024 sourceExp->expType->refCount++;
14025 sourceExp->type = 11;
14026 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14027 sourceExp->__anon1.cast.exp = newExp;
14028 FreeType(sourceExp->expType);
14029 sourceExp->expType = (((void *)0));
14030 ProcessExpressionType(sourceExp);
14033 FreeType(sourceExp->expType);
14034 sourceExp->expType = dest;
14039 if(backupSourceExpType)
14040 FreeType(backupSourceExpType);
14043 if(!_class->dataType)
14044 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14046 dest = _class->dataType;
14049 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))
14051 specs = MkListOne(MkSpecifier(DOUBLE));
14053 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))
14055 specs = MkListOne(MkSpecifier(FLOAT));
14057 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))
14060 if(!dest->isSigned)
14061 ListAdd(specs, MkSpecifier(UNSIGNED));
14062 ListAdd(specs, MkSpecifier(INT64));
14064 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14067 if(!dest->isSigned)
14068 ListAdd(specs, MkSpecifier(UNSIGNED));
14069 ListAdd(specs, MkSpecifier(INT));
14071 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14074 if(!dest->isSigned)
14075 ListAdd(specs, MkSpecifier(UNSIGNED));
14076 ListAdd(specs, MkSpecifier(SHORT));
14078 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14081 if(!dest->isSigned)
14082 ListAdd(specs, MkSpecifier(UNSIGNED));
14083 ListAdd(specs, MkSpecifier(CHAR));
14089 if(backupSourceExpType)
14091 if(sourceExp->expType)
14092 FreeType(sourceExp->expType);
14093 sourceExp->expType = backupSourceExpType;
14098 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))
14100 specs = MkListOne(MkSpecifier(DOUBLE));
14102 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))
14104 specs = MkListOne(MkSpecifier(FLOAT));
14106 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14109 ListAdd(specs, MkSpecifier(BOOL));
14111 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)))
14114 if(!dest->isSigned)
14115 ListAdd(specs, MkSpecifier(UNSIGNED));
14116 ListAdd(specs, MkSpecifier(CHAR));
14118 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)))))
14121 if(!dest->isSigned)
14122 ListAdd(specs, MkSpecifier(UNSIGNED));
14123 ListAdd(specs, MkSpecifier(SHORT));
14125 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14128 if(!dest->isSigned)
14129 ListAdd(specs, MkSpecifier(UNSIGNED));
14130 ListAdd(specs, MkSpecifier(INT));
14132 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14135 if(!dest->isSigned)
14136 ListAdd(specs, MkSpecifier(UNSIGNED));
14137 ListAdd(specs, MkSpecifier(INT64));
14139 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14141 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14147 if(backupSourceExpType)
14149 if(sourceExp->expType)
14150 FreeType(sourceExp->expType);
14151 sourceExp->expType = backupSourceExpType;
14155 if(!flag && !sourceExp->opDestType)
14157 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14159 *newExp = *sourceExp;
14160 newExp->prev = (((void *)0));
14161 newExp->next = (((void *)0));
14162 if(sourceExp->destType)
14163 sourceExp->destType->refCount++;
14164 if(sourceExp->expType)
14165 sourceExp->expType->refCount++;
14166 sourceExp->type = 11;
14167 if(realDest->kind == 8)
14169 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14170 FreeList(specs, (void *)(FreeSpecifier));
14173 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14174 if(newExp->type == 4)
14176 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14179 sourceExp->__anon1.cast.exp = newExp;
14180 FreeType(sourceExp->expType);
14181 sourceExp->expType = (((void *)0));
14182 ProcessExpressionType(sourceExp);
14185 FreeList(specs, (void *)(FreeSpecifier));
14188 if(backupSourceExpType)
14189 FreeType(backupSourceExpType);
14194 if(computedExp != sourceExp)
14196 FreeExpression(computedExp);
14197 computedExp = sourceExp;
14199 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14200 sourceExp = (*sourceExp->__anon1.list).last;
14201 if(sourceExp->type == 0)
14203 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14205 if(dest->kind == 8)
14207 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14209 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14210 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14214 for(; _class && _class->type == 4; _class = _class->base)
14216 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14217 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14219 for(value = e->values.first; value; value = value->next)
14221 if(!strcmp(value->name, id->string))
14226 FreeType(sourceExp->expType);
14227 sourceExp->isConstant = 1;
14228 sourceExp->expType = MkClassType(_class->fullName);
14229 if(inCompiler || inPreCompiler || inDebugger)
14231 FreeExpContents(sourceExp);
14232 sourceExp->type = 2;
14233 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14234 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14236 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14245 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14256 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14258 unsigned int result = 1;
14262 struct __ecereNameSpace__ecere__sys__OldList converts =
14266 struct Conversion * convert;
14268 if(destType->kind == 0)
14270 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14274 for(convert = converts.first; convert; convert = convert->next)
14276 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14280 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14281 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14284 newExp->prev = (((void *)0));
14285 newExp->next = (((void *)0));
14286 newExp->destType = (((void *)0));
14290 exp->addedThis = 1;
14291 exp->__anon1.member.exp = newExp;
14292 FreeType(exp->__anon1.member.exp->expType);
14293 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14294 exp->__anon1.member.exp->expType->classObjectType = objectType;
14295 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14296 exp->__anon1.member.memberType = 1;
14297 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14300 exp->expType->refCount++;
14301 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14307 exp->addedThis = 1;
14308 exp->__anon1.member.exp = newExp;
14309 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)
14311 newExp->byReference = 1;
14313 FreeType(exp->__anon1.member.exp->expType);
14314 exp->__anon1.member.exp->expType = (((void *)0));
14315 if(convert->convert->dataType)
14317 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14318 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14319 exp->__anon1.member.exp->expType->refCount = 1;
14320 exp->__anon1.member.exp->expType->classObjectType = objectType;
14321 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14323 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14324 exp->__anon1.member.memberType = 4;
14325 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14327 if(convert->resultType)
14328 convert->resultType->refCount++;
14334 FreeType(exp->expType);
14337 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14338 if(exp->destType->casted)
14341 exp->expType->refCount++;
14345 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14346 if(exp->destType->casted)
14348 if(convert->resultType)
14349 convert->resultType->refCount++;
14353 if(exp->isConstant && inCompiler)
14354 ComputeExpression(exp);
14355 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14357 if(!result && exp->expType && converts.count)
14359 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14361 if(!result && exp->expType && exp->destType)
14363 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))
14370 static void ProcessFunction(struct FunctionDefinition * function);
14372 void ProcessInstantiationType(struct Instantiation * inst)
14374 yylloc = inst->loc;
14377 struct MembersInit * members;
14378 struct Symbol * classSym;
14379 struct __ecereNameSpace__ecere__com__Class * _class;
14381 classSym = inst->_class->__anon1.__anon1.symbol;
14382 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14383 if(!_class || _class->type != 5)
14384 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14385 afterExternal = afterExternal ? afterExternal : curExternal;
14387 ProcessExpressionType(inst->exp);
14388 inst->isConstant = 1;
14391 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14392 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14393 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14394 int subMemberStackPos = 0;
14396 for(members = (*inst->members).first; members; members = members->next)
14398 switch(members->type)
14403 static unsigned int instMethodID = 0;
14404 struct External * external = curExternal;
14405 struct Context * context = curContext;
14406 struct Declarator * declarator = members->__anon1.function->declarator;
14407 struct Identifier * nameID = GetDeclId(declarator);
14408 char * unmangled = nameID ? nameID->string : (((void *)0));
14409 struct Expression * exp;
14410 struct External * createdExternal = (((void *)0));
14416 strcpy(name, "__ecereInstMeth_");
14417 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14419 strcat(name, nameID->string);
14421 sprintf(number, "_%08d", instMethodID++);
14422 strcat(name, number);
14423 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14427 struct Symbol * symbol = declarator->symbol;
14428 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14430 if(method && method->type == 1)
14432 symbol->__anon1.method = method;
14433 ProcessMethodType(method);
14434 if(!symbol->type->__anon1.__anon2.thisClass)
14436 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14438 if(!currentClass->symbol)
14439 currentClass->symbol = FindClass(currentClass->fullName);
14440 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14444 if(!_class->symbol)
14445 _class->symbol = FindClass(_class->fullName);
14446 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14449 DeclareType(curExternal, symbol->type, 1, 1);
14453 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14456 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14459 FreeSpecifier(nameID->_class);
14460 nameID->_class = (((void *)0));
14462 curExternal = createdExternal;
14465 if(createdExternal->__anon1.function)
14466 ProcessFunction(createdExternal->__anon1.function);
14468 else if(declarator)
14470 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14471 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14473 curExternal = external;
14474 curContext = context;
14477 FreeClassFunction(members->__anon1.function);
14478 exp = QMkExpId(name);
14480 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14481 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14487 if(members->__anon1.dataMembers && classSym)
14489 struct MemberInit * member;
14490 struct Location oldyyloc = yylloc;
14492 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14494 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14495 if(member->initializer && !member->initializer->isConstant)
14496 inst->isConstant = 0;
14508 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14510 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14516 if(spec->__anon1.specifier == THISCLASS)
14521 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14522 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14523 ProcessSpecifier(spec, declareStruct, 0);
14530 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14533 DeclareType(curExternal, symbol->type, 1, 1);
14534 else if(spec->__anon1.__anon1.symbol)
14536 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14538 if(warnClasses && !c)
14539 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14540 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14546 struct Enumerator * e;
14548 if(spec->__anon1.__anon2.list)
14550 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14553 ProcessExpressionType(e->exp);
14562 if(spec->__anon1.__anon2.definitions)
14564 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14566 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14573 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14578 if(decl->__anon1.identifier->classSym)
14580 FreeSpecifier(decl->__anon1.identifier->_class);
14581 decl->__anon1.identifier->_class = (((void *)0));
14585 if(decl->__anon1.array.exp)
14586 ProcessExpressionType(decl->__anon1.array.exp);
14594 struct Identifier * id = (((void *)0));
14595 struct Specifier * classSpec = (((void *)0));
14597 if(decl->type == 4)
14599 id = GetDeclId(decl);
14600 if(id && id->_class)
14602 classSpec = id->_class;
14603 id->_class = (((void *)0));
14606 if(decl->declarator)
14607 ProcessDeclarator(decl->declarator, isFunction);
14608 if(decl->type == 4)
14612 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14614 if(!decl->__anon1.function.parameters)
14615 decl->__anon1.function.parameters = MkList();
14616 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14618 if(decl->__anon1.function.parameters)
14620 struct TypeName * param;
14622 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14624 if(param->qualifiers)
14626 struct Specifier * spec;
14628 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14630 if(spec->type == 0)
14632 if(spec->__anon1.specifier == TYPED_OBJECT)
14634 struct Declarator * d = param->declarator;
14635 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);
14638 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14639 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14640 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14641 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14642 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14643 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14647 else if(spec->__anon1.specifier == ANY_OBJECT)
14649 struct Declarator * d = param->declarator;
14651 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14652 param->qualifiers = MkListOne(MkSpecifier(VOID));
14654 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14655 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14658 else if(spec->__anon1.specifier == THISCLASS)
14663 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14664 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14665 ProcessSpecifier(spec, 0, 0);
14670 else if(spec->type == 1)
14672 ProcessSpecifier(spec, isFunction, 1);
14676 if(param->declarator)
14677 ProcessDeclarator(param->declarator, 0);
14686 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14688 yylloc = decl->loc;
14693 unsigned int declareStruct = 0;
14695 if(decl->__anon1.__anon1.declarators)
14697 struct InitDeclarator * d;
14699 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14701 struct Type * type, * subType;
14703 ProcessDeclarator(d->declarator, 0);
14704 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14707 ProcessInitializer(d->initializer, type);
14708 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14710 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14712 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14714 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14715 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14716 if(decl->__anon1.__anon1.specifiers)
14717 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14718 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14721 decl->__anon1.inst = inst;
14725 for(subType = type; subType; )
14727 if(subType->kind == 8)
14732 else if(subType->kind == 13)
14734 else if(subType->kind == 12)
14735 subType = subType->__anon1.__anon4.arrayType;
14744 if(decl->__anon1.__anon1.specifiers)
14746 struct Specifier * s;
14748 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14750 ProcessSpecifier(s, declareStruct, 1);
14757 ProcessInstantiationType(decl->__anon1.inst);
14762 struct Specifier * spec;
14763 struct Declarator * d;
14764 unsigned int declareStruct = 0;
14766 if(decl->__anon1.__anon1.declarators)
14768 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14770 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14771 struct Type * subType;
14773 ProcessDeclarator(d, 0);
14774 for(subType = type; subType; )
14776 if(subType->kind == 8)
14781 else if(subType->kind == 13)
14783 else if(subType->kind == 12)
14784 subType = subType->__anon1.__anon4.arrayType;
14791 if(decl->__anon1.__anon1.specifiers)
14793 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14794 ProcessSpecifier(spec, declareStruct, warnClasses);
14801 static void ProcessStatement(struct Statement * stmt)
14803 yylloc = stmt->loc;
14807 ProcessStatement(stmt->__anon1.labeled.stmt);
14810 if(stmt->__anon1.caseStmt.exp)
14812 FreeType(stmt->__anon1.caseStmt.exp->destType);
14813 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14815 curSwitchType->refCount++;
14816 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14817 ComputeExpression(stmt->__anon1.caseStmt.exp);
14819 if(stmt->__anon1.caseStmt.stmt)
14820 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14824 if(stmt->__anon1.compound.context)
14826 struct Declaration * decl;
14827 struct Statement * s;
14828 struct Statement * prevCompound = curCompound;
14829 struct Context * prevContext = curContext;
14831 if(!stmt->__anon1.compound.isSwitch)
14832 curCompound = stmt;
14833 curContext = stmt->__anon1.compound.context;
14834 if(stmt->__anon1.compound.declarations)
14836 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14837 ProcessDeclaration(decl, 1);
14839 if(stmt->__anon1.compound.statements)
14841 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14842 ProcessStatement(s);
14844 curContext = prevContext;
14845 curCompound = prevCompound;
14851 struct Expression * exp;
14853 if(stmt->__anon1.expressions)
14855 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14856 ProcessExpressionType(exp);
14862 struct Expression * exp;
14864 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14865 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14866 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14867 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14869 ProcessExpressionType(exp);
14871 if(stmt->__anon1.ifStmt.stmt)
14872 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14873 if(stmt->__anon1.ifStmt.elseStmt)
14874 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14879 struct Type * oldSwitchType = curSwitchType;
14881 if(stmt->__anon1.switchStmt.exp)
14883 struct Expression * exp;
14885 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14889 ProcessExpressionType(exp);
14892 curSwitchType = exp->expType;
14895 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14896 curSwitchType = oldSwitchType;
14901 if(stmt->__anon1.whileStmt.exp)
14903 struct Expression * exp;
14905 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14906 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14907 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14908 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14910 ProcessExpressionType(exp);
14913 if(stmt->__anon1.whileStmt.stmt)
14914 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14919 if(stmt->__anon1.doWhile.exp)
14921 struct Expression * exp;
14923 if((*stmt->__anon1.doWhile.exp).last)
14925 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14926 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14927 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14929 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14931 ProcessExpressionType(exp);
14934 if(stmt->__anon1.doWhile.stmt)
14935 ProcessStatement(stmt->__anon1.doWhile.stmt);
14940 struct Expression * exp;
14942 if(stmt->__anon1.forStmt.init)
14943 ProcessStatement(stmt->__anon1.forStmt.init);
14944 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14946 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14947 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14948 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14950 if(stmt->__anon1.forStmt.check)
14951 ProcessStatement(stmt->__anon1.forStmt.check);
14952 if(stmt->__anon1.forStmt.increment)
14954 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14955 ProcessExpressionType(exp);
14957 if(stmt->__anon1.forStmt.stmt)
14958 ProcessStatement(stmt->__anon1.forStmt.stmt);
14963 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14964 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14965 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14966 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14967 char iteratorType[1024];
14968 struct Type * source;
14969 struct Expression * e;
14970 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));
14971 struct Expression * arrayExp;
14972 const char * typeString = (((void *)0));
14973 int builtinCount = 0;
14975 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14979 FreeType(e->destType);
14980 e->destType = ProcessTypeString("Container", 0);
14982 if(!isBuiltin || e->next)
14983 ProcessExpressionType(e);
14985 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
14986 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)))
14988 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
14989 struct Symbol * symbol;
14990 struct Expression * expIt = (((void *)0));
14991 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
14992 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
14993 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
14994 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
14999 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15000 stmt->__anon1.compound.context->parent = curContext;
15001 curContext = stmt->__anon1.compound.context;
15003 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15005 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15007 isCustomAVLTree = 1;
15008 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15011 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15013 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15015 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15018 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15020 if(inCompiler && isArray)
15022 struct Declarator * decl;
15023 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15025 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15026 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15027 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15031 struct Type * type = (((void *)0));
15032 char typeStringBuf[1024];
15034 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15035 if(((struct Expression *)(*exp).last)->type == 11)
15037 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15040 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15042 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)
15044 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15046 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15048 else if(arrayExp->__anon1.list)
15050 struct Expression * e;
15052 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15054 ProcessExpressionType(e);
15064 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15068 e->expType = (((void *)0));
15069 e = (*arrayExp->__anon1.list).first;
15070 ProcessExpressionType(e);
15073 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15075 FreeType(e->expType);
15076 e->expType = (((void *)0));
15078 type = (((void *)0));
15086 FreeType(e->expType);
15087 e->expType = (((void *)0));
15093 typeStringBuf[0] = '\0';
15094 PrintType(type, typeStringBuf, 0, 1);
15095 typeString = typeStringBuf;
15103 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15104 struct Declarator * decl;
15105 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15107 if(arrayExp->__anon1.list)
15109 struct Expression * e;
15111 builtinCount = (*arrayExp->__anon1.list).count;
15112 type = ProcessTypeString(typeString, 0);
15113 while((e = (*arrayExp->__anon1.list).first))
15115 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15116 e->destType = type;
15118 ProcessExpressionType(e);
15120 ListAdd(initializers, MkInitializerAssignment(e));
15123 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15125 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15126 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15127 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15128 FreeList(exp, (void *)(FreeExpression));
15130 else if(arrayExp->__anon1.list)
15132 struct Expression * e;
15134 type = ProcessTypeString(typeString, 0);
15135 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15137 e->destType = type;
15139 ProcessExpressionType(e);
15146 arrayExp->expType = ProcessTypeString("Container", 0);
15147 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15150 else if(inCompiler && isLinkList && !isList)
15152 struct Declarator * decl;
15153 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15155 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15156 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15157 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15159 else if(inCompiler && _class->templateArgs)
15162 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15164 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15165 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)))))))));
15169 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15172 switch(block->type)
15175 if(block->__anon1.compound.context)
15176 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15179 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15180 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15181 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15182 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15185 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15186 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15189 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15190 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15193 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15194 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15197 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15198 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15201 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15202 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15208 block = MkIfStmt(filter, block, (((void *)0)));
15212 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));
15213 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15214 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15215 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15221 sprintf(count, "%d", builtinCount);
15222 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));
15223 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15224 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15225 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15227 else if(isLinkList && !isList)
15229 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15230 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15232 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15234 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));
15238 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15239 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15241 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));
15243 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15244 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15245 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15249 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15251 ProcessExpressionType(expIt);
15252 if((*stmt->__anon1.compound.declarations).first)
15253 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15255 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15256 ProcessStatement(stmt);
15259 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15261 curContext = stmt->__anon1.compound.context->parent;
15266 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15278 struct Expression * exp;
15280 if(stmt->__anon1.expressions)
15282 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15286 if(curFunction && !curFunction->type)
15287 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15288 FreeType(exp->destType);
15289 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15291 exp->destType->refCount++;
15293 ProcessExpressionType(exp);
15300 ProcessDeclaration(stmt->__anon1.decl, 1);
15305 struct AsmField * field;
15307 if(stmt->__anon1.asmStmt.inputFields)
15309 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15310 if(field->expression)
15311 ProcessExpressionType(field->expression);
15313 if(stmt->__anon1.asmStmt.outputFields)
15315 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15316 if(field->expression)
15317 ProcessExpressionType(field->expression);
15319 if(stmt->__anon1.asmStmt.clobberedFields)
15321 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15323 if(field->expression)
15324 ProcessExpressionType(field->expression);
15331 struct PropertyWatch * propWatch;
15332 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15333 struct Expression * object = stmt->__anon1._watch.object;
15334 struct Expression * watcher = stmt->__anon1._watch.watcher;
15337 ProcessExpressionType(watcher);
15339 ProcessExpressionType(object);
15342 if(watcher || thisClass)
15344 struct External * external = curExternal;
15345 struct Context * context = curContext;
15348 stmt->__anon1.expressions = MkList();
15349 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15351 struct ClassFunction * func;
15352 char watcherName[1024];
15353 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;
15354 struct External * createdExternal;
15356 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15357 if(propWatch->deleteWatch)
15358 strcat(watcherName, "_delete");
15361 struct Identifier * propID;
15363 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15365 strcat(watcherName, "_");
15366 strcat(watcherName, propID->string);
15369 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15371 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)));
15372 ProcessClassFunctionBody(func, propWatch->compound);
15373 propWatch->compound = (((void *)0));
15374 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15375 FreeClassFunction(func);
15376 curExternal = createdExternal;
15377 ProcessFunction(createdExternal->__anon1.function);
15378 if(propWatch->deleteWatch)
15380 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15382 ListAdd(args, CopyExpression(object));
15383 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15384 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15385 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15389 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15390 struct Identifier * propID;
15392 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15394 char propName[1024];
15395 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15399 char getName[1024], setName[1024];
15400 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15402 DeclareProperty(createdExternal, prop, setName, getName);
15403 strcpy(propName, "__ecereProp_");
15404 FullClassNameCat(propName, prop->_class->fullName, 0);
15405 strcat(propName, "_");
15406 FullClassNameCat(propName, prop->name, 1);
15407 ListAdd(args, CopyExpression(object));
15408 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15409 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15410 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15411 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15412 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15415 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15420 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15422 curExternal = external;
15423 curContext = context;
15425 FreeExpression(watcher);
15427 FreeExpression(object);
15428 FreeList(watches, (void *)(FreePropertyWatch));
15431 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15435 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15437 ProcessStatement(propWatch->compound);
15444 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15445 struct Expression * object = stmt->__anon1._watch.object;
15446 struct __ecereNameSpace__ecere__com__Class * _class;
15449 ProcessExpressionType(object);
15452 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15455 struct Identifier * propID;
15458 stmt->__anon1.expressions = MkList();
15459 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15461 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15468 for(propID = (*watches).first; propID; propID = propID->next)
15470 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15474 CreateFireWatcher(prop, object, stmt);
15477 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15482 struct __ecereNameSpace__ecere__com__Property * prop;
15483 struct __ecereNameSpace__ecere__com__Class * base;
15485 for(base = _class; base; base = base->base)
15487 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15489 if(prop->isProperty && prop->isWatchable)
15491 CreateFireWatcher(prop, object, stmt);
15497 FreeExpression(object);
15498 FreeList(watches, (void *)(FreeIdentifier));
15501 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15507 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15508 struct Expression * object = stmt->__anon1._watch.object;
15509 struct Expression * watcher = stmt->__anon1._watch.watcher;
15510 struct __ecereNameSpace__ecere__com__Class * _class;
15513 ProcessExpressionType(object);
15515 ProcessExpressionType(watcher);
15518 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15519 if(watcher || thisClass)
15523 struct Identifier * propID;
15526 stmt->__anon1.expressions = MkList();
15529 struct __ecereNameSpace__ecere__sys__OldList * args;
15532 ListAdd(args, CopyExpression(object));
15533 ListAdd(args, MkExpConstant("0"));
15534 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15535 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15539 for(propID = (*watches).first; propID; propID = propID->next)
15541 char propName[1024];
15542 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15546 char getName[1024], setName[1024];
15547 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15549 DeclareProperty(curExternal, prop, setName, getName);
15550 strcpy(propName, "__ecereProp_");
15551 FullClassNameCat(propName, prop->_class->fullName, 0);
15552 strcat(propName, "_");
15553 FullClassNameCat(propName, prop->name, 1);
15554 ListAdd(args, CopyExpression(object));
15555 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15556 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15557 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15560 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15564 FreeExpression(object);
15566 FreeExpression(watcher);
15567 FreeList(watches, (void *)(FreeIdentifier));
15570 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15573 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15580 void ComputeDataTypes()
15582 struct External * external;
15584 currentClass = (((void *)0));
15585 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15586 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15587 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15588 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15589 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15590 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15591 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15592 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15593 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15594 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15595 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15596 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15597 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15598 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15599 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15600 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15601 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15602 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15603 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15604 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15605 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15606 for(external = (*ast).first; external; external = external->next)
15608 afterExternal = curExternal = external;
15609 if(external->type == 0)
15613 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15614 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15616 currentClass = external->__anon1.function->_class;
15617 ProcessFunction(external->__anon1.function);
15619 else if(external->type == 1)
15621 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15623 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15624 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15626 currentClass = (((void *)0));
15627 if(external->__anon1.declaration)
15628 ProcessDeclaration(external->__anon1.declaration, 1);
15630 else if(external->type == 2)
15632 struct ClassDefinition * _class = external->__anon1._class;
15634 currentClass = external->symbol->__anon1.registered;
15637 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15638 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15640 if(_class->definitions)
15642 ProcessClass(_class->definitions, _class->symbol);
15646 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15647 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15650 else if(external->type == 4)
15652 thisNameSpace = external->__anon1.id->string;
15655 currentClass = (((void *)0));
15656 thisNameSpace = (((void *)0));
15657 curExternal = (((void *)0));
15660 void ProcessExpressionType(struct Expression * exp)
15662 unsigned int unresolved = 0;
15663 struct Location oldyylloc = yylloc;
15664 unsigned int notByReference = 0;
15666 if(!exp || exp->expType)
15673 struct Identifier * id = exp->__anon1.__anon1.identifier;
15675 if(!id || !topContext)
15677 if(id->_class && id->_class->__anon1.__anon1.name)
15679 id->classSym = id->_class->__anon1.__anon1.symbol;
15681 if(!strcmp(id->string, "__runtimePlatform"))
15683 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15686 else if(strstr(id->string, "__ecereClass") == id->string)
15688 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15691 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15693 ReplaceClassMembers(exp, thisClass);
15696 ProcessExpressionType(exp);
15699 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15704 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15708 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15714 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15717 ProcessExpressionType(exp);
15721 else if(currentClass && !id->_class)
15723 if(ResolveIdWithClass(exp, currentClass, 1))
15726 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15731 struct Type * type = symbol->type;
15732 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15734 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15736 struct Context * context = SetupTemplatesContext(_class);
15738 type = ReplaceThisClassType(_class);
15739 FinishTemplatesContext(context);
15741 type->refCount = 0;
15743 FreeSpecifier(id->_class);
15744 id->_class = (((void *)0));
15745 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15746 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15747 id->classSym = (((void *)0));
15748 exp->expType = type;
15751 if(type && (type->kind == 15))
15752 exp->isConstant = 1;
15753 if(symbol->isParam || !strcmp(id->string, "this"))
15755 if(_class && _class->type == 1 && !type->declaredWithStruct)
15756 exp->byReference = 1;
15758 if(symbol->isIterator)
15760 if(symbol->isIterator == 3)
15763 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15764 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15765 exp->expType = (((void *)0));
15766 ProcessExpressionType(exp);
15768 else if(symbol->isIterator != 4)
15771 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15772 exp->__anon1.member.exp->expType = exp->expType;
15773 exp->__anon1.member.member = MkIdentifier("data");
15774 exp->expType = (((void *)0));
15775 ProcessExpressionType(exp);
15782 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15784 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15788 strcpy(name, thisNameSpace);
15789 strcat(name, "::");
15790 strcat(name, id->string);
15791 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15794 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15799 for(c = 0; c < definedExpStackPos; c++)
15800 if(definedExpStack[c] == definedExp)
15802 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15804 struct Location backupYylloc = yylloc;
15805 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15807 definedExpStack[definedExpStackPos++] = definedExp;
15808 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15809 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15810 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15812 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15813 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15814 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15815 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15817 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15818 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15820 parsedExpression = (((void *)0));
15822 expression_yyparse();
15823 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15825 fileInput = backInput;
15826 yylloc = backupYylloc;
15827 if(parsedExpression)
15829 FreeIdentifier(id);
15831 exp->__anon1.list = MkListOne(parsedExpression);
15832 ApplyLocation(parsedExpression, &yylloc);
15833 ProcessExpressionType(exp);
15834 definedExpStackPos--;
15837 definedExpStackPos--;
15843 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15849 struct GlobalData * data = (((void *)0));
15851 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15855 strcpy(name, thisNameSpace);
15856 strcat(name, "::");
15857 strcat(name, id->string);
15858 data = FindGlobalData(name);
15861 data = FindGlobalData(id->string);
15864 DeclareGlobalData(curExternal, data);
15865 exp->expType = data->dataType;
15867 data->dataType->refCount++;
15868 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15869 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15870 FreeSpecifier(id->_class);
15871 id->_class = (((void *)0));
15876 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15878 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15882 strcpy(name, thisNameSpace);
15883 strcat(name, "::");
15884 strcat(name, id->string);
15885 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15888 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15893 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15894 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15896 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15897 strcpy(name, "__ecereFunction_");
15898 FullClassNameCat(name, id->string, 0);
15899 if(DeclareFunction(curExternal, function, name))
15901 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15902 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15904 exp->expType = function->dataType;
15905 if(function->dataType)
15906 function->dataType->refCount++;
15907 FreeSpecifier(id->_class);
15908 id->_class = (((void *)0));
15920 if(!exp->__anon1.instance->_class)
15922 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15924 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15927 ProcessInstantiationType(exp->__anon1.instance);
15928 exp->isConstant = exp->__anon1.instance->isConstant;
15929 if(exp->__anon1.instance->_class)
15931 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15939 char * constant = exp->__anon1.__anon1.constant;
15940 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15942 exp->expType = type;
15943 if(constant[0] == '\'')
15945 if((int)((unsigned char *)constant)[1] > 127)
15948 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15952 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15953 exp->__anon1.__anon1.constant = PrintUInt(ch);
15955 type->__anon1._class = FindClass("unichar");
15956 type->isSigned = 0;
15961 type->isSigned = 1;
15966 char * dot = strchr(constant, '.');
15967 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15972 exponent = strchr(constant, 'p');
15974 exponent = strchr(constant, 'P');
15978 exponent = strchr(constant, 'e');
15980 exponent = strchr(constant, 'E');
15982 if(dot || exponent)
15984 if(strchr(constant, 'f') || strchr(constant, 'F'))
15988 type->isSigned = 1;
15992 unsigned int isSigned = constant[0] == '-';
15993 char * endP = (((void *)0));
15994 long long i64 = strtoll(constant, &endP, 0);
15995 uint64 ui64 = strtoull(constant, &endP, 0);
15996 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
15997 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16001 if(i64 < (((int)0x80000000)))
16006 if(ui64 > (((int)0x7fffffff)))
16008 if(ui64 > (0xffffffff))
16011 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16015 else if(constant[0] != '0' || !constant[1])
16020 type->kind = is64Bit ? 4 : 3;
16021 type->isSigned = isSigned;
16024 exp->isConstant = 1;
16025 if(exp->destType && exp->destType->kind == 7)
16027 else if(exp->destType && exp->destType->kind == 6)
16029 else if(exp->destType && exp->destType->kind == 4)
16036 exp->isConstant = 1;
16037 exp->expType = __extension__ ({
16038 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16040 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16041 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16043 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16044 }), __ecereInstance2;
16050 ProcessExpressionType(exp->__anon1._new.size);
16051 exp->expType = __extension__ ({
16052 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16054 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16056 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16060 ProcessExpressionType(exp->__anon1._renew.size);
16061 ProcessExpressionType(exp->__anon1._renew.exp);
16062 exp->expType = __extension__ ({
16063 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16065 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16067 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16071 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16072 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16073 unsigned int useDestType = 0, useSideType = 0;
16074 struct Location oldyylloc = yylloc;
16075 unsigned int useSideUnit = 0;
16076 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16077 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16079 switch(exp->__anon1.op.op)
16133 if(exp->__anon1.op.exp1)
16140 if(exp->__anon1.op.op == '&')
16142 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16144 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16145 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16147 if(symbol && symbol->isIterator == 2)
16150 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16151 exp->__anon1.member.member = MkIdentifier("key");
16152 exp->expType = (((void *)0));
16153 exp->__anon1.op.exp2->expType = symbol->type;
16154 symbol->type->refCount++;
16155 ProcessExpressionType(exp);
16161 if(exp->__anon1.op.exp1)
16163 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16165 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16167 if(exp->__anon1.op.exp1->destType)
16168 FreeType(exp->__anon1.op.exp1->destType);
16169 exp->__anon1.op.exp1->destType = exp->destType;
16170 exp->__anon1.op.exp1->opDestType = 1;
16172 exp->destType->refCount++;
16176 if(exp->__anon1.op.exp1->destType)
16177 FreeType(exp->__anon1.op.exp1->destType);
16178 exp->__anon1.op.exp1->destType = dummy;
16181 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16182 exp->__anon1.op.exp1->destType->count++;
16183 ProcessExpressionType(exp->__anon1.op.exp1);
16184 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16185 exp->__anon1.op.exp1->destType->count--;
16186 exp->__anon1.op.exp1->opDestType = 0;
16187 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)
16189 exp->__anon1.op.exp2 = MkExpConstant("1");
16190 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16193 if(exp->__anon1.op.exp1->destType == dummy)
16196 exp->__anon1.op.exp1->destType = (((void *)0));
16198 type1 = exp->__anon1.op.exp1->expType;
16200 if(exp->__anon1.op.exp2)
16202 char expString[10240];
16204 expString[0] = '\0';
16205 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16207 if(exp->__anon1.op.exp1)
16209 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16210 if(exp->__anon1.op.exp1->expType)
16211 exp->__anon1.op.exp1->expType->refCount++;
16215 exp->__anon1.op.exp2->destType = exp->destType;
16216 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16217 exp->__anon1.op.exp2->opDestType = 1;
16219 exp->destType->refCount++;
16223 exp->expType = type1;
16228 PrintExpression(exp->__anon1.op.exp2, expString);
16229 if(type1 && type1->kind == 13)
16231 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)
16232 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16233 else if(exp->__anon1.op.op == '=')
16235 if(exp->__anon1.op.exp2->destType)
16236 FreeType(exp->__anon1.op.exp2->destType);
16237 exp->__anon1.op.exp2->destType = type1;
16244 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)
16248 if(exp->__anon1.op.exp2->destType)
16249 FreeType(exp->__anon1.op.exp2->destType);
16250 exp->__anon1.op.exp2->destType = type1;
16257 exp->expType = type1;
16259 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16261 if(exp->__anon1.op.exp2->destType)
16262 FreeType(exp->__anon1.op.exp2->destType);
16263 exp->__anon1.op.exp2->destType = exp->destType;
16264 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16265 exp->__anon1.op.exp2->opDestType = 1;
16267 exp->destType->refCount++;
16271 if(exp->__anon1.op.exp2->destType)
16272 FreeType(exp->__anon1.op.exp2->destType);
16273 exp->__anon1.op.exp2->destType = dummy;
16276 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))
16278 FreeType(exp->__anon1.op.exp2->destType);
16279 exp->__anon1.op.exp2->destType = type1;
16282 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16283 exp->__anon1.op.exp2->destType->count++;
16284 if(exp->__anon1.op.op == SIZEOF)
16286 struct Expression * e = exp->__anon1.op.exp2;
16288 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16290 if(e->type == 5 || e->type == 32 || e->type == 23)
16293 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16295 e = (*e->__anon1.list).last;
16298 if(e->type == 11 && e->__anon1.cast.exp)
16299 e->__anon1.cast.exp->needCast = 1;
16301 ProcessExpressionType(exp->__anon1.op.exp2);
16302 exp->__anon1.op.exp2->opDestType = 0;
16303 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16304 exp->__anon1.op.exp2->destType->count--;
16305 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16307 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)
16309 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16310 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16312 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)))
16314 if(exp->__anon1.op.op == ADD_ASSIGN)
16315 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16317 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))
16319 if(exp->__anon1.op.op == ADD_ASSIGN)
16320 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16322 else if(inCompiler)
16324 char type1String[1024];
16325 char type2String[1024];
16327 type1String[0] = '\0';
16328 type2String[0] = '\0';
16329 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16330 PrintType(type1, type2String, 0, 1);
16331 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16332 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16335 if(exp->__anon1.op.exp2->destType == dummy)
16338 exp->__anon1.op.exp2->destType = (((void *)0));
16340 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16342 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16343 type2->refCount = 1;
16344 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16345 type2->isSigned = 1;
16347 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))
16349 type2 = __extension__ ({
16350 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16352 __ecereInstance1->kind = 3, __ecereInstance1;
16354 type2->refCount = 1;
16355 type2->isSigned = 1;
16359 type2 = exp->__anon1.op.exp2->expType;
16365 if(exp->__anon1.op.op == SIZEOF)
16367 exp->expType = __extension__ ({
16368 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16370 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16372 exp->isConstant = 1;
16374 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16376 exp->expType = Dereference(type2);
16377 if(type2 && type2->kind == 8)
16378 notByReference = 1;
16380 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16381 exp->expType = Reference(type2);
16386 if(exp->__anon1.op.exp1)
16388 if(exp->__anon1.op.exp1->destType)
16389 FreeType(exp->__anon1.op.exp1->destType);
16390 exp->__anon1.op.exp1->destType = MkClassType("bool");
16391 exp->__anon1.op.exp1->destType->truth = 1;
16392 if(!exp->__anon1.op.exp1->expType)
16393 ProcessExpressionType(exp->__anon1.op.exp1);
16395 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16396 FreeType(exp->__anon1.op.exp1->expType);
16397 exp->__anon1.op.exp1->expType = MkClassType("bool");
16398 exp->__anon1.op.exp1->expType->truth = 1;
16400 if(exp->__anon1.op.exp2)
16402 if(exp->__anon1.op.exp2->destType)
16403 FreeType(exp->__anon1.op.exp2->destType);
16404 exp->__anon1.op.exp2->destType = MkClassType("bool");
16405 exp->__anon1.op.exp2->destType->truth = 1;
16406 if(!exp->__anon1.op.exp2->expType)
16407 ProcessExpressionType(exp->__anon1.op.exp2);
16409 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16410 FreeType(exp->__anon1.op.exp2->expType);
16411 exp->__anon1.op.exp2->expType = MkClassType("bool");
16412 exp->__anon1.op.exp2->expType->truth = 1;
16415 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")))))
16417 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"))))
16419 if(exp->__anon1.op.op == '-' && ((type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4) || (type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)))
16421 struct Type * intType;
16423 if(!type1->__anon1._class->__anon1.registered->dataType)
16424 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16425 if(!type2->__anon1._class->__anon1.registered->dataType)
16426 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16427 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16428 if(exp->__anon1.op.exp1->destType)
16429 FreeType(exp->__anon1.op.exp1->destType);
16430 if(exp->__anon1.op.exp2->destType)
16431 FreeType(exp->__anon1.op.exp2->destType);
16432 exp->__anon1.op.exp1->destType = intType;
16433 exp->__anon1.op.exp2->destType = intType;
16434 intType->refCount++;
16438 if(exp->__anon1.op.exp2->destType)
16439 FreeType(exp->__anon1.op.exp2->destType);
16440 exp->__anon1.op.exp2->destType = type1;
16442 if(exp->__anon1.op.exp1->destType)
16443 FreeType(exp->__anon1.op.exp1->destType);
16444 exp->__anon1.op.exp1->destType = type2;
16447 if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1->__anon1._class->__anon1.registered != type2->__anon1._class->__anon1.registered)
16448 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);
16449 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16451 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16455 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16457 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16458 ProcessExpressionType(exp->__anon1.op.exp1);
16459 if(type2->kind != 13)
16461 ProcessExpressionType(classExp);
16462 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16463 if(!exp->__anon1.op.exp2->expType)
16467 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16470 ProcessExpressionType(exp->__anon1.op.exp2);
16474 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)))
16476 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16477 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16478 exp->expType = type1;
16482 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)))
16484 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16485 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16486 exp->expType = type2;
16490 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))
16492 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16496 unsigned int success = 0;
16498 if(type1->kind == 13 && type2->kind == 13)
16500 if(exp->__anon1.op.op == '+')
16501 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16502 else if(exp->__anon1.op.op == '-')
16504 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16506 exp->expType = __extension__ ({
16507 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16509 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16512 if(type1->__anon1.type->kind == 20)
16514 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16518 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16520 ProcessExpressionType(classExp);
16522 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"))));
16523 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16531 if(!success && exp->__anon1.op.exp1->type == 2)
16533 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16536 FreeType(exp->expType);
16537 exp->expType = exp->__anon1.op.exp1->destType;
16538 if(exp->__anon1.op.exp1->destType)
16539 exp->__anon1.op.exp1->destType->refCount++;
16542 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16545 FreeType(exp->expType);
16546 exp->expType = exp->__anon1.op.exp2->destType;
16547 if(exp->__anon1.op.exp2->destType)
16548 exp->__anon1.op.exp2->destType->refCount++;
16554 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16557 FreeType(exp->expType);
16558 exp->expType = exp->__anon1.op.exp2->destType;
16559 if(exp->__anon1.op.exp2->destType)
16560 exp->__anon1.op.exp2->destType->refCount++;
16563 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16566 FreeType(exp->expType);
16567 exp->expType = exp->__anon1.op.exp1->destType;
16568 if(exp->__anon1.op.exp1->destType)
16569 exp->__anon1.op.exp1->destType->refCount++;
16575 char expString1[10240];
16576 char expString2[10240];
16580 expString1[0] = '\0';
16581 expString2[0] = '\0';
16586 PrintExpression(exp->__anon1.op.exp1, expString1);
16587 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16588 PrintExpression(exp->__anon1.op.exp2, expString2);
16589 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16590 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16591 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16593 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16597 else if(!boolResult && (!useSideUnit) && type2 && type1 && type2->kind == 8 && type1->kind != 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16599 if(exp->__anon1.op.exp1->destType)
16600 FreeType(exp->__anon1.op.exp1->destType);
16601 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16602 if(type2->__anon1._class->__anon1.registered->dataType)
16603 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16604 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16605 exp->expType = type2;
16609 else if(!boolResult && (!useSideUnit) && type1 && type2 && type1->kind == 8 && type2->kind != 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16611 if(exp->__anon1.op.exp2->destType)
16612 FreeType(exp->__anon1.op.exp2->destType);
16613 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16614 if(type1->__anon1._class->__anon1.registered->dataType)
16615 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16616 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16617 exp->expType = type1;
16623 unsigned int valid = 0;
16625 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16627 if(exp->__anon1.op.exp2->destType)
16628 FreeType(exp->__anon1.op.exp2->destType);
16629 if(!type1->__anon1._class->__anon1.registered->dataType)
16630 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16631 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16632 exp->__anon1.op.exp2->destType->refCount++;
16633 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16636 type2 = exp->__anon1.op.exp2->destType;
16639 exp->expType = type2;
16642 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16644 if(exp->__anon1.op.exp1->destType)
16645 FreeType(exp->__anon1.op.exp1->destType);
16646 if(!type2->__anon1._class->__anon1.registered->dataType)
16647 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16648 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16649 exp->__anon1.op.exp1->destType->refCount++;
16650 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16651 type1 = exp->__anon1.op.exp1->destType;
16652 exp->expType = type1;
16655 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16657 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16658 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16660 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16662 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16664 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16667 FreeType(exp->expType);
16668 exp->expType = exp->__anon1.op.exp2->expType;
16669 if(exp->__anon1.op.exp2->expType)
16670 exp->__anon1.op.exp2->expType->refCount++;
16674 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16676 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16679 FreeType(exp->expType);
16680 exp->expType = exp->__anon1.op.exp1->expType;
16681 if(exp->__anon1.op.exp1->expType)
16682 exp->__anon1.op.exp1->expType->refCount++;
16689 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16691 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16694 FreeType(exp->expType);
16695 exp->expType = exp->__anon1.op.exp1->expType;
16696 if(exp->__anon1.op.exp1->expType)
16697 exp->__anon1.op.exp1->expType->refCount++;
16701 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16703 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16706 FreeType(exp->expType);
16707 exp->expType = exp->__anon1.op.exp2->expType;
16708 if(exp->__anon1.op.exp2->expType)
16709 exp->__anon1.op.exp2->expType->refCount++;
16717 if(type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && (type1->kind != 8 || !type1->__anon1._class || !type1->__anon1._class->__anon1.registered || type1->__anon1._class->__anon1.registered->type != 3))
16719 if(exp->__anon1.op.exp1->destType)
16720 FreeType(exp->__anon1.op.exp1->destType);
16721 exp->__anon1.op.exp1->destType = type2;
16723 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16726 FreeType(exp->expType);
16727 exp->expType = exp->__anon1.op.exp1->destType;
16728 if(exp->__anon1.op.exp1->destType)
16729 exp->__anon1.op.exp1->destType->refCount++;
16734 if(exp->__anon1.op.exp2->destType)
16735 FreeType(exp->__anon1.op.exp2->destType);
16736 exp->__anon1.op.exp2->destType = type1;
16738 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16741 FreeType(exp->expType);
16742 exp->expType = exp->__anon1.op.exp2->destType;
16743 if(exp->__anon1.op.exp2->destType)
16744 exp->__anon1.op.exp2->destType->refCount++;
16746 else if(type1 && type2)
16748 char expString1[10240];
16749 char expString2[10240];
16750 char type1String[1024];
16751 char type2String[1024];
16753 expString1[0] = '\0';
16754 expString2[0] = '\0';
16755 type1String[0] = '\0';
16756 type2String[0] = '\0';
16759 PrintExpression(exp->__anon1.op.exp1, expString1);
16760 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16761 PrintExpression(exp->__anon1.op.exp2, expString2);
16762 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16763 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16764 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16766 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16767 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16769 exp->expType = exp->__anon1.op.exp1->expType;
16770 if(exp->__anon1.op.exp1->expType)
16771 exp->__anon1.op.exp1->expType->refCount++;
16773 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16775 exp->expType = exp->__anon1.op.exp2->expType;
16776 if(exp->__anon1.op.exp2->expType)
16777 exp->__anon1.op.exp2->expType->refCount++;
16785 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16787 struct Type * oldType = exp->__anon1.op.exp1->expType;
16789 exp->__anon1.op.exp1->expType = (((void *)0));
16790 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16793 exp->__anon1.op.exp1->expType = oldType;
16795 if(exp->__anon1.op.exp1->destType)
16796 FreeType(exp->__anon1.op.exp1->destType);
16797 exp->__anon1.op.exp1->destType = type2;
16799 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16802 FreeType(exp->expType);
16803 exp->expType = exp->__anon1.op.exp1->destType;
16804 if(exp->__anon1.op.exp1->destType)
16805 exp->__anon1.op.exp1->destType->refCount++;
16809 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16811 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16813 if(exp->__anon1.op.exp1->destType)
16814 FreeType(exp->__anon1.op.exp1->destType);
16815 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16816 if(type2->__anon1._class->__anon1.registered->dataType)
16817 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16818 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16820 if(exp->__anon1.op.op == '!')
16822 exp->expType = MkClassType("bool");
16823 exp->expType->truth = 1;
16827 exp->expType = type2;
16832 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16834 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16836 if(exp->__anon1.op.exp2->destType)
16837 FreeType(exp->__anon1.op.exp2->destType);
16838 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16839 if(type1->__anon1._class->__anon1.registered->dataType)
16840 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16841 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16843 exp->expType = type1;
16849 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16851 char expString[10000];
16853 expString[0] = '\0';
16856 PrintExpression(exp->__anon1.op.exp1, expString);
16857 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16860 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16862 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16864 char expString[10240];
16866 expString[0] = '\0';
16869 PrintExpression(exp->__anon1.op.exp2, expString);
16870 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16873 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16877 FreeType(exp->expType);
16878 exp->expType = MkClassType("bool");
16879 exp->expType->truth = 1;
16881 if(exp->__anon1.op.op != SIZEOF)
16882 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16883 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16885 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16887 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16888 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16889 yylloc = oldyylloc;
16898 struct Expression * e;
16900 exp->isConstant = 1;
16901 for(e = (*exp->__anon1.list).first; e; e = e->next)
16905 FreeType(e->destType);
16906 e->opDestType = exp->opDestType;
16907 e->destType = exp->destType;
16910 exp->destType->refCount++;
16913 ProcessExpressionType(e);
16914 if(!exp->expType && !e->next)
16916 exp->expType = e->expType;
16918 e->expType->refCount++;
16921 exp->isConstant = 0;
16923 e = (*exp->__anon1.list).first;
16924 if(!e->next && e->type == 8)
16926 struct Expression * next = exp->next, * prev = exp->prev;
16928 FreeType(exp->expType);
16929 FreeType(exp->destType);
16930 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16934 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16935 ProcessExpressionType(exp);
16941 struct Expression * e;
16943 exp->isConstant = 1;
16944 ProcessExpressionType(exp->__anon1.index.exp);
16945 if(!exp->__anon1.index.exp->isConstant)
16946 exp->isConstant = 0;
16947 if(exp->__anon1.index.exp->expType)
16949 struct Type * source = exp->__anon1.index.exp->expType;
16951 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16953 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16954 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16956 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
16958 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
16959 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
16961 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
16963 if(type->kind == 8)
16964 type->constant = 1;
16965 else if(type->kind == 13)
16967 struct Type * t = type;
16969 while(t->kind == 13)
16970 t = t->__anon1.type;
16973 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
16978 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
16980 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
16983 FreeType(e->destType);
16984 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
16986 ProcessExpressionType(e);
16991 exp->isConstant = 0;
16994 exp->expType = Dereference(exp->__anon1.index.exp->expType);
16996 DeclareType(curExternal, exp->expType, 1, 0);
17001 struct Expression * e;
17002 struct Type * functionType;
17003 struct Type * methodType = (((void *)0));
17009 PrintExpression(exp->__anon1.call.exp, name);
17010 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17012 PrintExpression(exp->__anon1.call.exp, name);
17015 if(exp->__anon1.call.exp->type == 0)
17017 struct Expression * idExp = exp->__anon1.call.exp;
17018 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17020 if(!strcmp(id->string, "__builtin_frame_address"))
17022 exp->expType = ProcessTypeString("void *", 1);
17023 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17024 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17027 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17029 exp->expType = ProcessTypeString("int", 1);
17030 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17031 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17034 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17036 struct Expression * a = (((void *)0));
17037 struct Expression * b = (((void *)0));
17038 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17040 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17042 a = (*exp->__anon1.call.arguments).first;
17043 b = (*exp->__anon1.call.arguments).last;
17047 else if((*exp->__anon1.call.arguments).count == 1)
17049 a = (*exp->__anon1.call.arguments).first;
17054 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17055 idExp->__anon1.__anon1.identifier = (((void *)0));
17056 FreeExpContents(exp);
17057 ProcessExpressionType(a);
17059 ProcessExpressionType(b);
17061 exp->__anon1.list = MkList();
17062 if(a->expType && (!b || b->expType))
17064 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17068 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17069 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17070 struct Declaration * decl;
17071 char temp1[1024], temp2[1024];
17073 GetTypeSpecs(a->expType, specs);
17074 if(a && !a->isConstant && a->type != 0)
17076 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17077 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17078 tempExp1 = QMkExpId(temp1);
17079 tempExp1->expType = a->expType;
17081 a->expType->refCount++;
17082 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17084 if(b && !b->isConstant && b->type != 0)
17086 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17087 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17088 tempExp2 = QMkExpId(temp2);
17089 tempExp2->expType = b->expType;
17091 b->expType->refCount++;
17092 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17094 decl = MkDeclaration(specs, decls);
17095 if(!curCompound->__anon1.compound.declarations)
17096 curCompound->__anon1.compound.declarations = MkList();
17097 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17101 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17103 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17105 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17106 exp->expType = a->expType;
17108 a->expType->refCount++;
17110 else if(!strcmp(id->string, "Abs"))
17112 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17113 exp->expType = a->expType;
17115 a->expType->refCount++;
17117 else if(!strcmp(id->string, "Sgn"))
17119 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"))))));
17120 exp->expType = ProcessTypeString("int", 0);
17122 FreeExpression(tempExp1);
17124 FreeExpression(tempExp2);
17125 FreeIdentifier(id);
17131 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17133 if(!exp->__anon1.call.exp->destType)
17135 exp->__anon1.call.exp->destType = dummy;
17138 ProcessExpressionType(exp->__anon1.call.exp);
17139 if(exp->__anon1.call.exp->destType == dummy)
17142 exp->__anon1.call.exp->destType = (((void *)0));
17146 functionType = exp->__anon1.call.exp->expType;
17147 if(functionType && functionType->kind == 16)
17149 methodType = functionType;
17150 functionType = methodType->__anon1.__anon3.method->dataType;
17151 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17153 char typeString[1024];
17155 typeString[0] = '\0';
17157 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17159 functionType->__anon1.__anon2.thisClass = (((void *)0));
17160 PrintType(functionType, typeString, 1, 1);
17161 functionType->__anon1.__anon2.thisClass = back;
17163 if(strstr(typeString, "thisclass"))
17165 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17166 struct Declarator * decl;
17169 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17171 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17172 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))
17173 thisClassParams = 0;
17174 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17176 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17178 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17179 ProcessDeclarator(decl, 1);
17180 thisClass = backupThisClass;
17182 thisClassParams = 1;
17183 functionType = ProcessType(specs, decl);
17184 functionType->refCount = 0;
17185 FinishTemplatesContext(context);
17187 struct Type * p, * op;
17189 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)
17192 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17195 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17197 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17200 FreeList(specs, (void *)(FreeSpecifier));
17201 FreeDeclarator(decl);
17205 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17207 struct Type * type = functionType->__anon1.type;
17209 if(!functionType->refCount)
17211 functionType->__anon1.type = (((void *)0));
17212 FreeType(functionType);
17214 functionType = type;
17216 if(functionType && functionType->kind != 11)
17218 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17220 else if(functionType)
17222 unsigned int emptyParams = 0, noParams = 0;
17223 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17224 struct Type * type = functionType->__anon1.__anon2.params.first;
17225 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17227 struct Location oldyylloc = yylloc;
17231 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17233 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17236 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17238 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)
17240 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17243 e->destType = type;
17245 type = functionType->__anon1.__anon2.params.first;
17248 type->refCount = 0;
17250 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17252 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17253 type->byReference = functionType->byReference;
17254 type->typedByReference = functionType->typedByReference;
17257 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17259 e->destType = type;
17261 type = functionType->__anon1.__anon2.params.first;
17264 type->refCount = 0;
17267 if(type && type->kind == 0)
17270 if(!type->refCount)
17272 type = (((void *)0));
17274 for(; e; e = e->next)
17276 if(!type && !emptyParams)
17279 if(methodType && methodType->__anon1.__anon3.methodClass)
17280 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);
17282 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);
17285 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17287 struct Type * templatedType = (((void *)0));
17288 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17289 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17292 if(_class && _class->templateArgs)
17294 struct __ecereNameSpace__ecere__com__Class * sClass;
17296 for(sClass = _class; sClass; sClass = sClass->base)
17298 if(sClass->templateClass)
17299 sClass = sClass->templateClass;
17301 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17303 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17305 struct __ecereNameSpace__ecere__com__Class * nextClass;
17307 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17309 if(nextClass->templateClass)
17310 nextClass = nextClass->templateClass;
17311 id += nextClass->templateParams.count;
17321 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17323 unsigned int constant = type->constant;
17324 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17327 struct Context * context = SetupTemplatesContext(_class);
17329 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17330 FinishTemplatesContext(context);
17332 if(templatedType->kind == 8 && constant)
17333 templatedType->constant = 1;
17334 else if(templatedType->kind == 13)
17336 struct Type * t = templatedType->__anon1.type;
17338 while(t->kind == 13)
17339 t = t->__anon1.type;
17341 t->constant = constant;
17343 e->destType = templatedType;
17346 templatedType->passAsTemplate = 1;
17351 e->destType = type;
17358 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17360 e->destType = type->prev;
17361 e->destType->refCount++;
17365 e->destType = type;
17370 if(type && type->kind != 14)
17372 struct Type * next = type->next;
17374 if(!type->refCount)
17379 if(type && type->kind != 14)
17381 if(methodType && methodType->__anon1.__anon3.methodClass)
17382 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);
17384 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);
17386 yylloc = oldyylloc;
17387 if(type && !type->refCount)
17392 functionType = __extension__ ({
17393 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17395 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17397 if(exp->__anon1.call.exp->type == 0)
17399 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17403 struct Symbol * symbol;
17404 struct Location oldyylloc = yylloc;
17406 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17407 if(strstr(string, "__builtin_") == string)
17411 functionType->__anon1.__anon2.returnType = exp->destType;
17412 exp->destType->refCount++;
17416 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17417 symbol = __extension__ ({
17418 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17420 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17422 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17423 if(strstr(symbol->string, "::"))
17424 globalContext->hasNameSpace = 1;
17425 yylloc = oldyylloc;
17428 else if(exp->__anon1.call.exp->type == 8)
17432 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17433 if(!functionType->__anon1.__anon2.returnType)
17435 functionType->__anon1.__anon2.returnType = __extension__ ({
17436 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17438 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17442 if(functionType && functionType->kind == 11)
17444 exp->expType = functionType->__anon1.__anon2.returnType;
17445 if(functionType->__anon1.__anon2.returnType)
17446 functionType->__anon1.__anon2.returnType->refCount++;
17447 if(!functionType->refCount)
17448 FreeType(functionType);
17450 if(exp->__anon1.call.arguments)
17452 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17453 ProcessExpressionType(e);
17459 struct Type * type;
17460 struct Location oldyylloc = yylloc;
17461 unsigned int thisPtr;
17462 struct Expression * checkExp = exp->__anon1.member.exp;
17466 if(checkExp->type == 11)
17467 checkExp = checkExp->__anon1.cast.exp;
17468 else if(checkExp->type == 5)
17469 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17473 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17474 exp->thisPtr = thisPtr;
17475 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17477 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17479 ProcessExpressionType(exp->__anon1.member.exp);
17480 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)
17482 exp->isConstant = 0;
17485 exp->isConstant = exp->__anon1.member.exp->isConstant;
17486 type = exp->__anon1.member.exp->expType;
17488 if(type && (type->kind == 20))
17490 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17491 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17495 for(param = _class->templateParams.first; param; param = param->next)
17497 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17501 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17503 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17507 struct Expression * expMember = exp->__anon1.member.exp;
17508 struct Declarator * decl;
17509 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17510 char thisClassTypeString[1024];
17512 FreeIdentifier(exp->__anon1.member.member);
17513 ProcessExpressionType(argExp);
17515 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17519 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17520 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17523 strcpy(thisClassTypeString, _class->fullName);
17525 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17526 exp->expType = ProcessType(specs, decl);
17527 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17529 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17530 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17531 int paramCount = 0;
17532 int lastParam = -1;
17533 char templateString[1024];
17534 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17536 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17537 for(cClass = expClass; cClass; cClass = cClass->base)
17541 for(param = cClass->templateParams.first; param; param = param->next)
17544 struct __ecereNameSpace__ecere__com__Class * sClass;
17545 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17547 for(sClass = cClass->base; sClass; sClass = sClass->base)
17548 id += sClass->templateParams.count;
17549 arg = expClass->templateArgs[id];
17550 for(sClass = _class; sClass; sClass = sClass->base)
17552 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17554 struct __ecereNameSpace__ecere__com__Class * nextClass;
17556 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17557 p += nextClass->templateParams.count;
17558 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17560 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17562 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17564 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17565 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17572 char argument[256];
17574 argument[0] = '\0';
17575 switch(param->type)
17579 char expString[1024];
17580 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17581 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17582 struct Expression * exp;
17583 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17585 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17586 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17587 ProcessExpressionType(exp);
17588 ComputeExpression(exp);
17589 expString[0] = '\0';
17590 PrintExpression(exp, expString);
17591 strcat(argument, expString);
17592 FreeExpression(exp);
17597 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17602 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17604 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17605 strcat(argument, thisClassTypeString);
17607 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17615 strcat(templateString, ", ");
17616 if(lastParam != p - 1)
17618 strcat(templateString, param->name);
17619 strcat(templateString, " = ");
17621 strcat(templateString, argument);
17630 int len = strlen(templateString);
17632 if(templateString[len - 1] == '>')
17633 templateString[len++] = ' ';
17634 templateString[len++] = '>';
17635 templateString[len++] = '\0';
17638 struct Context * context = SetupTemplatesContext(_class);
17640 FreeType(exp->expType);
17641 exp->expType = ProcessTypeString(templateString, 0);
17642 FinishTemplatesContext(context);
17645 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17646 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17648 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")))))))));
17651 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17653 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17656 if(type && (type->kind == 20))
17658 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)))
17660 struct Identifier * id = exp->__anon1.member.member;
17661 int typeKind = type->kind;
17662 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));
17664 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17666 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17671 if(typeKind == 3 || typeKind == 15)
17672 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17675 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17677 _class = type->__anon1._class->__anon1.registered;
17679 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17681 _class = FindClass("char *")->__anon1.registered;
17683 else if(type->kind == 13)
17685 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17686 FreeType(exp->expType);
17687 exp->expType = ProcessTypeString("uintptr", 0);
17688 exp->byReference = 1;
17692 char string[1024] = "";
17693 struct Symbol * classSym;
17695 PrintTypeNoConst(type, string, 0, 1);
17696 classSym = FindClass(string);
17698 _class = classSym->__anon1.registered;
17704 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17705 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17706 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17707 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17708 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17710 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17711 exp->__anon1.member.memberType = 1;
17712 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17713 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17716 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17718 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17719 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17721 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17723 member = (((void *)0));
17725 if(!member && !prop)
17726 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17727 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17728 exp->__anon1.member.thisPtr = 1;
17732 unsigned int useMemberForNonConst = 0;
17736 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17737 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);
17738 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17739 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17741 if((!prop || useMemberForNonConst) && !member)
17743 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17746 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17747 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);
17748 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17749 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17754 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17755 prop = (((void *)0));
17757 member = (((void *)0));
17761 if(!prop && !member && !method)
17762 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17763 if(!prop && !member && !method)
17767 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17770 exp->__anon1.member.memberType = 5;
17771 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17775 char structName[1024];
17776 struct Identifier * id = exp->__anon1.member.member;
17777 struct Expression * classExp = exp->__anon1.member.exp;
17780 FreeType(classExp->expType);
17781 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17782 strcpy(structName, "__ecereClassData_");
17783 FullClassNameCat(structName, type->__anon1._class->string, 0);
17785 exp->__anon1.member.member = id;
17786 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"))))))));
17788 ProcessExpressionType(exp);
17794 struct Symbol * classSym = FindClass(id->string);
17798 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17801 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17805 if(exp->__anon1.member.exp->destType)
17806 FreeType(exp->__anon1.member.exp->destType);
17808 if(method && !method->_class->symbol)
17809 method->_class->symbol = FindClass(method->_class->fullName);
17810 if(prop && !prop->_class->symbol)
17811 prop->_class->symbol = FindClass(prop->_class->fullName);
17812 exp->__anon1.member.exp->destType = __extension__ ({
17813 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17815 __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;
17820 exp->__anon1.member.memberType = 1;
17821 if(!prop->dataType)
17822 ProcessPropertyType(prop);
17823 exp->expType = prop->dataType;
17824 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17826 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17828 CopyTypeInto(type, exp->expType);
17829 type->refCount = 1;
17830 type->constant = 1;
17831 exp->expType = type;
17833 else if(prop->dataType)
17834 prop->dataType->refCount++;
17838 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17840 FreeExpContents(exp);
17842 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17843 ProcessExpressionType(exp);
17846 exp->__anon1.member.memberType = 3;
17847 DeclareStruct(curExternal, _class->fullName, 0, 1);
17848 if(member->_class != _class)
17849 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17850 if(!member->dataType)
17852 struct Context * context = SetupTemplatesContext(_class);
17854 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17855 FinishTemplatesContext(context);
17857 exp->expType = member->dataType;
17858 if(member->dataType)
17859 member->dataType->refCount++;
17861 else if(revConvert)
17863 exp->__anon1.member.memberType = 4;
17864 exp->expType = MkClassType(revConvert->_class->fullName);
17869 exp->__anon1.member.memberType = 2;
17871 if(!method->dataType)
17872 ProcessMethodType(method);
17873 exp->expType = __extension__ ({
17874 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17876 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17878 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17879 exp->expType->__anon1.__anon3.usedClass = _class;
17881 else if(!classProp)
17883 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17885 FreeExpContents(exp);
17887 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17888 FreeType(exp->expType);
17889 exp->expType = MkClassType("ecere::com::Class");
17892 yylloc = exp->__anon1.member.member->loc;
17893 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17895 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17897 if(_class && exp->expType)
17899 struct __ecereNameSpace__ecere__com__Class * tClass;
17901 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17902 while(tClass && !tClass->templateClass)
17903 tClass = tClass->base;
17904 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17907 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17908 struct __ecereNameSpace__ecere__com__Class * sClass;
17910 for(sClass = tClass; sClass; sClass = sClass->base)
17913 if(sClass->templateClass)
17914 sClass = sClass->templateClass;
17915 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17917 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17919 for(sClass = sClass->base; sClass; sClass = sClass->base)
17920 id += sClass->templateParams.count;
17928 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17930 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17931 struct Context * context = SetupTemplatesContext(tClass);
17932 unsigned int constant = exp->expType->constant;
17933 unsigned int passAsTemplate = 0;
17934 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17935 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17937 if(t && t->kind == 8 && t->__anon1._class)
17938 thisClassFrom = t->__anon1._class->__anon1.registered;
17940 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
17942 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17943 FreeType(exp->expType);
17944 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17945 exp->expType->thisClassFrom = thisClassFrom;
17946 if(exp->expType->kind == 8 && constant)
17947 exp->expType->constant = 1;
17948 else if(exp->expType->kind == 13)
17950 struct Type * t = exp->expType->__anon1.type;
17952 while(t->kind == 13)
17953 t = t->__anon1.type;
17955 t->constant = constant;
17959 if(exp->expType->kind == 21)
17961 FreeType(exp->expType);
17962 exp->expType = ReplaceThisClassType(_class);
17965 exp->expType->passAsTemplate = 1;
17968 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17969 if(exp->destType->kind == 8 && constant)
17970 exp->destType->constant = 1;
17971 else if(exp->destType->kind == 13)
17973 struct Type * t = exp->destType->__anon1.type;
17975 while(t->kind == 13)
17976 t = t->__anon1.type;
17978 t->constant = constant;
17980 if(exp->destType->kind == 21)
17982 FreeType(exp->destType);
17983 exp->destType = ReplaceThisClassType(_class);
17987 FinishTemplatesContext(context);
17990 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)
17993 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17994 struct __ecereNameSpace__ecere__com__Class * sClass;
17996 for(sClass = tClass; sClass; sClass = sClass->base)
17999 if(sClass->templateClass)
18000 sClass = sClass->templateClass;
18001 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18003 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18005 for(sClass = sClass->base; sClass; sClass = sClass->base)
18006 id += sClass->templateParams.count;
18016 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18017 struct Context * context = SetupTemplatesContext(tClass);
18018 struct Type * basicType;
18020 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18023 if(basicType->kind == 21)
18025 FreeType(basicType);
18026 basicType = ReplaceThisClassType(_class);
18028 FreeType(exp->expType);
18029 exp->expType = __extension__ ({
18030 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18032 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18036 exp->destType = exp->expType;
18037 exp->destType->refCount++;
18040 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18041 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18042 struct Declarator * decl;
18044 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18047 exp->destType->refCount++;
18049 exp->expType->refCount++;
18051 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18052 exp->__anon1.cast.exp = newExp;
18055 FinishTemplatesContext(context);
18058 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18060 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18064 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18066 int paramCount = 0;
18067 int lastParam = -1;
18068 char templateString[1024];
18069 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18071 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18072 while(cClass != expClass)
18074 struct __ecereNameSpace__ecere__com__Class * sClass;
18076 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18079 for(param = cClass->templateParams.first; param; param = param->next)
18081 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18083 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18084 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18086 while(cClassCur != tClass && !paramCur)
18088 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18090 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18092 cClassCur = sClassCur;
18093 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18095 if(!strcmp(paramCur->name, param->name))
18102 if(paramCur && paramCur->type == 0)
18103 arg = tClass->templateArgs[cp];
18105 arg = expClass->templateArgs[p];
18107 char argument[256];
18109 argument[0] = '\0';
18110 switch(param->type)
18114 char expString[1024];
18115 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18116 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18117 struct Expression * exp;
18118 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18120 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18121 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18122 ProcessExpressionType(exp);
18123 ComputeExpression(exp);
18124 expString[0] = '\0';
18125 PrintExpression(exp, expString);
18126 strcat(argument, expString);
18127 FreeExpression(exp);
18132 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18137 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18138 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18145 strcat(templateString, ", ");
18146 if(lastParam != p - 1)
18148 strcat(templateString, param->name);
18149 strcat(templateString, " = ");
18151 strcat(templateString, argument);
18160 int len = strlen(templateString);
18162 if(templateString[len - 1] == '>')
18163 templateString[len++] = ' ';
18164 templateString[len++] = '>';
18165 templateString[len++] = '\0';
18167 FreeType(exp->expType);
18169 struct Context * context = SetupTemplatesContext(tClass);
18171 exp->expType = ProcessTypeString(templateString, 0);
18172 FinishTemplatesContext(context);
18179 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)");
18181 else if(type && (type->kind == 9 || type->kind == 10))
18183 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18187 exp->expType = memberType;
18189 memberType->refCount++;
18194 char expString[10240];
18196 expString[0] = '\0';
18199 PrintExpression(exp, expString);
18200 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18202 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18204 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18206 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18208 struct Identifier * id = exp->__anon1.member.member;
18209 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));
18213 FreeType(exp->expType);
18214 exp->expType = ReplaceThisClassType(_class);
18218 yylloc = oldyylloc;
18223 struct Type * destType = exp->destType;
18225 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18227 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18229 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18233 ProcessExpressionType(exp);
18240 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18242 if(classSym && classSym->__anon1.registered)
18244 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18247 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18250 DeclareStruct(curExternal, classSym->string, 0, 1);
18251 FreeSpecifier(exp->__anon1._class);
18252 FullClassNameCat(name, classSym->string, 0);
18256 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18260 struct Expression * e;
18263 if(b->structSize == b->offset)
18264 exp->__anon1.op.exp1 = MkExpConstant("0");
18266 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18267 exp->__anon1.op.op = '+';
18269 while(b->offset != 0)
18271 struct Symbol * sym;
18272 struct Expression * typeSize;
18275 sym = FindClass(b->fullName);
18277 DeclareStruct(curExternal, sym->string, 0, 1);
18278 FullClassNameCat(name, sym->string, 0);
18279 if(b->structSize == b->offset)
18280 typeSize = MkExpConstant("0");
18282 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18283 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18284 e = e->__anon1.op.exp2;
18290 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18292 FreeSpecifier(exp->__anon1._class);
18293 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18298 char className[1024];
18300 strcpy(className, "__ecereClass_");
18301 FullClassNameCat(className, classSym->string, 1);
18302 DeclareClass(curExternal, classSym, className);
18303 FreeExpContents(exp);
18305 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18306 exp->__anon1.member.member = MkIdentifier("structSize");
18310 exp->expType = __extension__ ({
18311 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18313 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18319 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18321 exp->expType = __extension__ ({
18322 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18324 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18326 exp->isConstant = 1;
18327 DeclareType(curExternal, type, 1, 0);
18333 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18336 FreeType(exp->__anon1.cast.exp->destType);
18337 exp->__anon1.cast.exp->destType = type;
18340 ProcessExpressionType(exp->__anon1.cast.exp);
18343 exp->expType = type;
18344 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18346 void * prev = exp->prev, * next = exp->next;
18347 struct Type * expType = exp->__anon1.cast.exp->destType;
18348 struct Expression * castExp = exp->__anon1.cast.exp;
18349 struct Type * destType = exp->destType;
18352 expType->refCount++;
18353 FreeType(exp->expType);
18354 FreeTypeName(exp->__anon1.cast.typeName);
18356 FreeType(exp->expType);
18357 FreeType(exp->destType);
18358 exp->expType = expType;
18359 exp->destType = destType;
18360 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18366 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18372 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18374 exp->expType = type;
18379 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18381 ProcessExpressionType(exp->__anon1.vaArg.exp);
18382 exp->expType = type;
18387 struct Expression * e;
18388 struct Type * t = exp->destType;
18390 if(t && !exp->destType->casted)
18392 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18393 CopyTypeInto(t, exp->destType);
18398 exp->isConstant = 1;
18399 FreeType(exp->__anon1.cond.cond->destType);
18400 exp->__anon1.cond.cond->destType = MkClassType("bool");
18401 exp->__anon1.cond.cond->destType->truth = 1;
18402 ProcessExpressionType(exp->__anon1.cond.cond);
18403 if(!exp->__anon1.cond.cond->isConstant)
18404 exp->isConstant = 0;
18405 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18409 FreeType(e->destType);
18412 e->destType->refCount++;
18414 ProcessExpressionType(e);
18417 exp->expType = e->expType;
18419 e->expType->refCount++;
18422 exp->isConstant = 0;
18424 FreeType(exp->__anon1.cond.elseExp->destType);
18425 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18426 if(exp->__anon1.cond.elseExp->destType)
18427 exp->__anon1.cond.elseExp->destType->refCount++;
18428 ProcessExpressionType(exp->__anon1.cond.elseExp);
18429 if(!exp->__anon1.cond.elseExp->isConstant)
18430 exp->isConstant = 0;
18436 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18438 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18440 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18442 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18444 exp->destType->refCount++;
18446 ProcessStatement(exp->__anon1.compound);
18447 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18449 exp->expType->refCount++;
18455 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18457 if(spec && spec->type == 1)
18459 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18460 exp->expType->kind = 19;
18461 exp->byReference = 1;
18465 exp->expType = MkClassType("ecere::com::Class");
18466 exp->byReference = 1;
18472 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18476 struct Identifier * id = exp->__anon1.classData.id;
18477 char structName[1024];
18478 struct Expression * classExp;
18480 strcpy(structName, "__ecereClassData_");
18481 FullClassNameCat(structName, _class->fullName, 0);
18483 exp->__anon1.member.member = id;
18484 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18485 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18487 classExp = MkExpIdentifier(MkIdentifier("class"));
18488 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"))))))));
18489 ProcessExpressionType(exp);
18496 struct Type * type = (((void *)0));
18497 const char * typeString = (((void *)0));
18498 char typeStringBuf[1024];
18500 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))
18502 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18504 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18506 else if(exp->__anon1.list)
18508 struct Expression * e;
18510 for(e = (*exp->__anon1.list).first; e; e = e->next)
18512 ProcessExpressionType(e);
18522 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18526 e->expType = (((void *)0));
18527 e = (*exp->__anon1.list).first;
18528 ProcessExpressionType(e);
18531 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18533 FreeType(e->expType);
18534 e->expType = (((void *)0));
18536 type = (((void *)0));
18544 FreeType(e->expType);
18545 e->expType = (((void *)0));
18551 typeStringBuf[0] = '\0';
18552 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18553 typeString = typeStringBuf;
18555 type = (((void *)0));
18560 char templateString[1024];
18561 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18562 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18563 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18564 struct Expression * expExt;
18565 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18567 sprintf(templateString, "Container<%s>", typeString);
18568 if(exp->__anon1.list)
18570 struct Expression * e;
18572 type = ProcessTypeString(typeString, 0);
18573 while((e = (*exp->__anon1.list).first))
18575 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18576 e->destType = type;
18578 ProcessExpressionType(e);
18579 ListAdd(initializers, MkInitializerAssignment(e));
18582 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18584 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18585 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18586 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18587 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18588 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18589 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18590 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18591 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18592 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18593 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18594 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18596 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18598 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18599 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18600 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18601 exp->expType = ProcessTypeString(templateString, 0);
18603 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18604 ProcessExpressionType(expExt);
18608 exp->expType = ProcessTypeString("Container", 0);
18609 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18614 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18616 FreeType(exp->expType);
18617 exp->expType = ReplaceThisClassType(thisClass);
18619 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)
18621 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18625 if(exp->expType->kind != 15)
18627 struct Type * member;
18628 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18630 FreeType(exp->expType);
18631 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18632 exp->expType->kind = symbol->type->kind;
18633 exp->expType->refCount++;
18634 exp->expType->__anon1.__anon1.enumName = enumName;
18635 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18636 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18637 member->refCount++;
18641 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18643 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18645 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);
18647 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18653 if(exp->destType && (exp->destType->kind == 18))
18655 else if(exp->destType && !exp->destType->keepCast)
18657 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18658 exp->needTemplateCast = 1;
18659 if(exp->destType->kind == 0)
18661 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18663 unsigned int invalidCast = 0;
18665 if(inCompiler && exp->destType->count && exp->expType)
18667 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18668 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18670 if(c1 && c1->type != 1)
18671 c1 = (((void *)0));
18672 if(c2 && c2->type != 1)
18673 c2 = (((void *)0));
18674 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18677 if(!exp->destType->count || unresolved || invalidCast)
18682 if(exp->destType->kind != 14)
18689 char expString[10240];
18691 expString[0] = '\0';
18692 PrintType(exp->destType, type2, 0, 1);
18695 PrintExpression(exp, expString);
18696 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18699 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18700 else if(exp->type != 16)
18701 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18706 char expString[10240];
18708 expString[0] = '\0';
18711 PrintExpression(exp, expString);
18712 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18715 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18716 else if(exp->type != 16)
18717 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18729 PrintType(exp->expType, type1, 0, 1);
18730 PrintType(exp->destType, type2, 0, 1);
18732 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)))
18736 char expString[10240];
18738 expString[0] = '\0';
18741 PrintExpression(exp, expString);
18742 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18744 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")))
18747 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18749 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18753 FreeType(exp->expType);
18754 exp->destType->refCount++;
18755 exp->expType = exp->destType;
18761 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))
18763 struct Expression * nbExp = GetNonBracketsExp(exp);
18765 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18767 struct Expression * e = MoveExpContents(exp);
18769 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18771 exp->__anon1.cast.exp->destType = exp->destType;
18773 exp->destType->refCount++;
18774 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18778 else if(unresolved)
18780 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18781 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);
18782 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18783 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18785 else if(!exp->expType && exp->type != 16)
18787 char expString[10240];
18789 expString[0] = '\0';
18792 PrintExpression(exp, expString);
18793 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18795 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18798 ApplyAnyObjectLogic(exp);
18799 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)))
18801 exp->byReference = 1;
18803 yylloc = oldyylloc;
18806 static void ProcessFunction(struct FunctionDefinition * function)
18808 struct Identifier * id = GetDeclId(function->declarator);
18809 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18810 struct Type * type = symbol ? symbol->type : (((void *)0));
18811 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18812 struct Context * oldTopContext = topContext;
18814 yylloc = function->loc;
18815 if(type && type->__anon1.__anon2.thisClass)
18817 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18818 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18819 char className[1024];
18820 char structName[1024];
18821 struct Declarator * funcDecl;
18822 struct Symbol * thisSymbol;
18823 unsigned int typedObject = 0;
18825 if(_class && !_class->base)
18827 _class = currentClass;
18828 if(_class && !_class->symbol)
18829 _class->symbol = FindClass(_class->fullName);
18830 classSym = _class ? _class->symbol : (((void *)0));
18833 thisClass = _class;
18834 if(inCompiler && _class)
18836 if(type->kind == 11)
18838 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18840 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18842 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18845 if(type->classObjectType != 1)
18847 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18848 symbol->type->__anon1.__anon2.staticMethod = 1;
18849 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18850 symbol->type->extraParam = 0;
18853 strcpy(className, "__ecereClass_");
18854 FullClassNameCat(className, _class->fullName, 1);
18855 structName[0] = (char)0;
18856 FullClassNameCat(structName, _class->fullName, 0);
18857 funcDecl = GetFuncDecl(function->declarator);
18860 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18862 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18864 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18866 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18867 FreeTypeName(param);
18870 if(!function->propertyNoThis)
18872 struct TypeName * thisParam = (((void *)0));
18874 if(type->classObjectType != 1)
18876 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18877 if(!funcDecl->__anon1.function.parameters)
18878 funcDecl->__anon1.function.parameters = MkList();
18879 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18883 if(type->classObjectType != 1)
18885 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18886 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18888 thisParam = __extension__ ({
18889 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18891 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18893 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18894 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18898 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18900 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18902 funcDecl = GetFuncDecl(initDecl->declarator);
18905 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18907 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18909 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18911 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18912 FreeTypeName(param);
18915 if(type->classObjectType != 1)
18917 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18919 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18921 if(!funcDecl->__anon1.function.parameters)
18922 funcDecl->__anon1.function.parameters = MkList();
18923 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18931 if(type->classObjectType != 1)
18933 thisSymbol = __extension__ ({
18934 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18936 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18938 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18939 if(typedObject && thisSymbol->type)
18941 thisSymbol->type->classObjectType = 2;
18942 thisSymbol->type->byReference = type->byReference;
18943 thisSymbol->type->typedByReference = type->byReference;
18947 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
18949 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18952 struct __ecereNameSpace__ecere__com__Class * base;
18954 for(base = _class; base && base->type != 1000; base = base->next)
18956 for(member = base->membersAndProperties.first; member; member = member->next)
18957 if(!member->isProperty)
18963 for(member = _class->membersAndProperties.first; member; member = member->next)
18964 if(!member->isProperty)
18968 char pointerName[1024];
18969 struct Declaration * decl;
18970 struct Initializer * initializer;
18971 struct Expression * exp, * bytePtr;
18973 strcpy(pointerName, "__ecerePointer_");
18974 FullClassNameCat(pointerName, _class->fullName, 0);
18976 char className[1024];
18978 strcpy(className, "__ecereClass_");
18979 FullClassNameCat(className, classSym->string, 1);
18980 DeclareClass(curExternal, classSym, className);
18982 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18985 struct Expression * e;
18987 if(_class->offset && _class->offset == _class->base->structSize)
18989 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
18990 ProcessExpressionType(e);
18996 sprintf(string, "%d", _class->offset);
18997 e = MkExpConstant(string);
18999 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19003 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19005 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19006 exp->expType = __extension__ ({
19007 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19009 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19010 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19012 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19013 }), __ecereInstance2;
19017 yylloc = function->body->loc;
19018 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19020 struct Context * prevContext = curContext;
19021 struct __ecereNameSpace__ecere__sys__OldList * list;
19023 curContext = function->body->__anon1.compound.context;
19024 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19025 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19026 curContext = prevContext;
19028 decl->symbol = (((void *)0));
19029 if(!function->body->__anon1.compound.declarations)
19030 function->body->__anon1.compound.declarations = MkList();
19031 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19037 thisClass = (((void *)0));
19040 FreeSpecifier(id->_class);
19041 id->_class = (((void *)0));
19042 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19044 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19046 id = GetDeclId(initDecl->declarator);
19047 FreeSpecifier(id->_class);
19048 id->_class = (((void *)0));
19052 topContext = function->body->__anon1.compound.context;
19054 struct FunctionDefinition * oldFunction = curFunction;
19056 curFunction = function;
19058 ProcessStatement(function->body);
19059 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19061 struct Statement * prevCompound = curCompound;
19062 struct Context * prevContext = curContext;
19063 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19065 if(!function->body->__anon1.compound.statements)
19066 function->body->__anon1.compound.statements = MkList();
19067 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19068 curCompound = function->body;
19069 curContext = function->body->__anon1.compound.context;
19070 ProcessStatement(fireWatchers);
19071 curContext = prevContext;
19072 curCompound = prevCompound;
19074 curFunction = oldFunction;
19076 if(function->declarator)
19078 ProcessDeclarator(function->declarator, 1);
19080 topContext = oldTopContext;
19081 thisClass = oldThisClass;
19084 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19086 struct ClassDef * def;
19087 struct External * external = curExternal;
19088 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19090 for(def = definitions->first; def; def = def->next)
19094 if(def->__anon1.function->declarator)
19095 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19097 curExternal = external;
19098 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19100 else if(def->type == 2)
19102 if(def->__anon1.decl->type == 2)
19104 thisClass = regClass;
19105 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19106 thisClass = (((void *)0));
19110 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19113 thisClass = regClass;
19114 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19115 thisClass = backThisClass;
19118 else if(def->type == 1 && def->__anon1.defProperties)
19120 struct MemberInit * defProperty;
19121 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);
19123 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19124 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19126 thisClass = regClass;
19127 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19128 thisClass = (((void *)0));
19130 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19131 FreeSymbol(thisSymbol);
19133 else if(def->type == 3 && def->__anon1.propertyDef)
19135 struct PropertyDef * prop = def->__anon1.propertyDef;
19137 thisClass = regClass;
19142 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19144 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19146 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19147 ProcessStatement(prop->setStmt);
19153 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19155 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19157 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19158 ProcessStatement(prop->getStmt);
19160 if(prop->issetStmt)
19164 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19166 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19168 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19169 ProcessStatement(prop->issetStmt);
19171 thisClass = (((void *)0));
19173 else if(def->type == 4 && def->__anon1.propertyWatch)
19175 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19177 thisClass = regClass;
19178 if(propertyWatch->compound)
19180 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);
19182 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19183 curExternal = (((void *)0));
19184 ProcessStatement(propertyWatch->compound);
19186 thisClass = (((void *)0));
19191 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19193 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19195 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19196 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19197 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19198 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19199 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19200 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19201 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19202 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19203 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19204 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19205 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19206 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19207 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19208 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19209 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19210 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19211 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19212 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19213 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19214 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19215 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19216 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19217 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19218 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19219 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19220 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19221 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19222 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19223 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19229 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19232 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19240 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19244 __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);
19245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19246 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19247 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19248 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19249 __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);
19250 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19251 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19252 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19253 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19254 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19255 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19256 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19257 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19258 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19259 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19260 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19261 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19262 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19263 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19264 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19265 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)
19266 __ecereClass_Conversion = class;
19267 __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);
19268 __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);
19269 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19270 __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);
19271 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19272 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19273 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19274 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19275 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19276 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19277 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19278 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19279 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19280 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19281 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19282 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19283 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19284 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19285 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19286 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19287 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19288 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19289 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19290 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19291 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19292 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);