1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
41 # define ecere_gcc_struct __attribute__((gcc_struct))
43 # define ecere_stdcall __stdcall
44 # define ecere_gcc_struct
47 # define ecere_stdcall
48 # define ecere_gcc_struct
51 #include <sys/types.h>
54 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, INT128 = 294, LONG = 295, SIGNED = 296, UNSIGNED = 297, FLOAT = 298, DOUBLE = 299, CONST = 300, VOLATILE = 301, VOID = 302, VALIST = 303, STRUCT = 304, UNION = 305, ENUM = 306, ELLIPSIS = 307, CASE = 308, DEFAULT = 309, IF = 310, SWITCH = 311, WHILE = 312, DO = 313, FOR = 314, GOTO = 315, CONTINUE = 316, BREAK = 317, RETURN = 318, IFX = 319, ELSE = 320, CLASS = 321, THISCLASS = 322, CLASS_NAME = 323, PROPERTY = 324, SETPROP = 325, GETPROP = 326, NEWOP = 327, RENEW = 328, DELETE = 329, EXT_DECL = 330, EXT_STORAGE = 331, IMPORT = 332, DEFINE = 333, VIRTUAL = 334, ATTRIB = 335, PUBLIC = 336, PRIVATE = 337, TYPED_OBJECT = 338, ANY_OBJECT = 339, _INCREF = 340, EXTENSION = 341, ASM = 342, TYPEOF = 343, WATCH = 344, STOPWATCHING = 345, FIREWATCHERS = 346, WATCHABLE = 347, CLASS_DESIGNER = 348, CLASS_NO_EXPANSION = 349, CLASS_FIXED = 350, ISPROPSET = 351, CLASS_DEFAULT_PROPERTY = 352, PROPERTY_CATEGORY = 353, CLASS_DATA = 354, CLASS_PROPERTY = 355, SUBCLASS = 356, NAMESPACE = 357, NEW0OP = 358, RENEW0 = 359, VAARG = 360, DBTABLE = 361, DBFIELD = 362, DBINDEX = 363, DATABASE_OPEN = 364, ALIGNOF = 365, ATTRIB_DEP = 366, __ATTRIB = 367, BOOL = 368, _BOOL = 369, _COMPLEX = 370, _IMAGINARY = 371, RESTRICT = 372, THREAD = 373, WIDE_STRING_LITERAL = 374, BUILTIN_OFFSETOF = 375
57 extern int returnCode;
59 extern unsigned int yydebug;
61 extern unsigned int echoOn;
67 int expression_yyparse();
69 static char * thisNameSpace;
71 unsigned int thisClassParams = 1;
73 unsigned int internalValueCounter;
75 extern unsigned int outputLineNumbers;
77 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
79 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
81 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
83 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
89 extern int targetBits;
91 extern unsigned int inCompiler;
93 extern unsigned int inPreCompiler;
95 extern unsigned int inDebugger;
97 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
99 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
101 int UnescapeString(char * d, char * s, int len)
106 while(j < len && (ch = s[j]))
111 switch((ch = s[++j]))
157 char * OffsetEscapedString(char * s, int len, int offset)
162 while(j < len && k < offset && (ch = s[j]))
168 return (k == offset) ? s + j : (((void *)0));
171 extern int __ecereVMethodID_class_OnGetString;
173 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
175 extern unsigned int parseError;
177 static int definedExpStackPos;
179 static void * definedExpStack[512];
181 extern const char * sourceFile;
183 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
185 unsigned int reachedPass15;
187 extern unsigned int memoryGuard;
189 struct __ecereNameSpace__ecere__sys__OldList
198 struct __ecereNameSpace__ecere__com__DataValue
213 } ecere_gcc_struct __anon1;
216 struct __ecereNameSpace__ecere__com__SerialBuffer
218 unsigned char * _buffer;
224 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
226 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
228 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
230 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
232 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
240 struct TemplateArgument;
256 extern size_t strlen(const char * );
258 extern int strcmp(const char * , const char * );
260 extern int sprintf(char * , const char * , ...);
262 extern char * strcat(char * , const char * );
264 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
266 extern int isprint(int c);
268 extern char * strcpy(char * , const char * );
270 extern void Compiler_Error(const char * format, ...);
272 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
274 struct __ecereNameSpace__ecere__com__LinkList
281 extern char * strchr(const char * , int);
283 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
285 extern void * memcpy(void * , const void * , size_t size);
287 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
289 extern void Compiler_Warning(const char * format, ...);
291 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
293 extern long long strtoll(const char * nptr, char * * endptr, int base);
295 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
297 extern int strtol(const char * , char * * , int base);
299 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
301 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
303 extern double strtod(const char * , char * * );
305 extern int strncmp(const char * , const char * , size_t n);
307 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
309 extern char * QMkString(const char * source);
311 extern char * strncpy(char * , const char * , size_t n);
313 extern int printf(const char * , ...);
315 extern char * strstr(const char * , const char * );
317 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
319 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
321 extern int (* __ecereProp_float_Get_signBit)(float this);
323 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
325 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
327 extern int (* __ecereProp_double_Get_signBit)(double this);
329 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
331 extern float (* __ecereMethod_float_inf)(void);
333 extern float (* __ecereMethod_float_nan)(void);
335 extern double (* __ecereMethod_double_inf)(void);
337 extern double (* __ecereMethod_double_nan)(void);
339 int __ecereVMethodID_class_OnGetString;
341 void SetYydebug(unsigned int b)
346 unsigned int GetParseError()
351 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
353 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
355 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
357 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
359 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
361 struct __ecereNameSpace__ecere__com__EnumClassData
363 struct __ecereNameSpace__ecere__sys__OldList values;
367 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
369 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
371 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
373 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
375 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
377 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
379 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
381 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
385 struct CodePosition start;
386 struct CodePosition end;
389 void ReadString(char * output, char * string)
391 int len = strlen(string);
393 unsigned int quoted = 0, escaped = 0;
395 for(c = 0; c < len; c++)
455 char * PrintInt(long long result)
459 if(result > (((int)0x7fffffff)))
460 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
462 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
463 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
465 return __ecereNameSpace__ecere__sys__CopyString(temp);
468 char * PrintUInt(uint64 result)
472 if(result > (0xffffffff))
473 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
474 else if(result > (((int)0x7fffffff)))
475 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
477 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
478 return __ecereNameSpace__ecere__sys__CopyString(temp);
481 char * PrintInt64(long long result)
485 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
486 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
488 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
489 return __ecereNameSpace__ecere__sys__CopyString(temp);
492 char * PrintUInt64(uint64 result)
496 if(result > (0xffffffff))
497 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
498 else if(result > (((int)0x7fffffff)))
499 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
501 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
502 return __ecereNameSpace__ecere__sys__CopyString(temp);
505 char * PrintHexUInt(uint64 result)
509 if(result > (0xffffffff))
510 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
513 if(result > (0xffffffff))
515 return __ecereNameSpace__ecere__sys__CopyString(temp);
518 char * PrintHexUInt64(uint64 result)
522 if(result > (0xffffffff))
523 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
525 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
526 return __ecereNameSpace__ecere__sys__CopyString(temp);
529 char * PrintShort(short result)
533 sprintf(temp, "%d", (unsigned short)result);
534 return __ecereNameSpace__ecere__sys__CopyString(temp);
537 char * PrintUShort(unsigned short result)
542 sprintf(temp, "0x%X", (int)result);
544 sprintf(temp, "%d", (int)result);
545 return __ecereNameSpace__ecere__sys__CopyString(temp);
548 char * PrintUChar(unsigned char result)
552 sprintf(temp, "0x%X", result);
553 return __ecereNameSpace__ecere__sys__CopyString(temp);
556 char * PrintChar(char result)
560 if(result > 0 && isprint(result))
561 sprintf(temp, "'%c'", result);
563 sprintf(temp, "%d", (int)result);
565 sprintf(temp, "0x%X", (unsigned char)result);
566 return __ecereNameSpace__ecere__sys__CopyString(temp);
569 char * PrintFloat(float result)
573 if(__ecereProp_float_Get_isInf(result))
575 if(__ecereProp_float_Get_signBit(result))
576 strcpy(temp, "-inf");
580 else if(__ecereProp_float_Get_isNan(result))
582 if(__ecereProp_float_Get_signBit(result))
583 strcpy(temp, "-nan");
588 sprintf(temp, "%.16ff", result);
589 return __ecereNameSpace__ecere__sys__CopyString(temp);
592 char * PrintDouble(double result)
596 if(__ecereProp_double_Get_isInf(result))
598 if(__ecereProp_double_Get_signBit(result))
599 strcpy(temp, "-inf");
603 else if(__ecereProp_double_Get_isNan(result))
605 if(__ecereProp_double_Get_signBit(result))
606 strcpy(temp, "-nan");
611 sprintf(temp, "%.16f", result);
612 return __ecereNameSpace__ecere__sys__CopyString(temp);
615 extern struct Location yylloc;
624 struct Attrib * attr;
625 } ecere_gcc_struct __anon1;
628 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
632 extern struct Expression * parsedExpression;
634 extern struct Expression * QMkExpId(const char * id);
636 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
638 void ComputeExpression(struct Expression * exp);
640 extern struct Expression * MkExpConstant(const char * string);
642 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
644 extern void FreeExpression(struct Expression * exp);
646 extern void FreeExpContents(struct Expression * exp);
648 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
650 extern struct Expression * CopyExpression(struct Expression * exp);
652 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
654 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
656 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
658 extern struct Expression * MoveExpContents(struct Expression * exp);
660 extern struct Expression * QBrackets(struct Expression * exp);
662 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
666 static struct Statement * curCompound;
668 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
670 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
672 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
674 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
676 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
678 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
682 struct External * curExternal, * afterExternal;
684 extern void FreeExternal(struct External * external);
688 static struct Type * curSwitchType;
690 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
692 extern void FreeType(struct Type * type);
694 extern void CopyTypeInto(struct Type * type, struct Type * src);
696 extern struct Type * MkClassType(const char * name);
698 struct __ecereNameSpace__ecere__com__Class;
700 struct __ecereNameSpace__ecere__com__Instance
703 struct __ecereNameSpace__ecere__com__Class * _class;
707 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
709 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
711 static struct __ecereNameSpace__ecere__com__Class * currentClass;
713 struct __ecereNameSpace__ecere__com__Class * thisClass;
715 struct __ecereNameSpace__ecere__com__Class * containerClass;
717 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
719 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
721 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
723 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
725 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
727 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
729 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
733 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
735 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
737 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
739 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
744 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
751 extern struct Context * curContext;
753 extern struct Context * topContext;
755 extern struct Context * PushContext(void);
757 extern void PopContext(struct Context * ctx);
759 extern void FreeContext(struct Context * context);
761 extern struct Context * globalContext;
765 extern struct ModuleImport * mainModule;
769 struct ModuleImport * prev;
770 struct ModuleImport * next;
772 struct __ecereNameSpace__ecere__sys__OldList classes;
773 struct __ecereNameSpace__ecere__sys__OldList functions;
778 struct __ecereNameSpace__ecere__com__NameSpace;
780 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
782 struct FunctionDefinition;
784 static struct FunctionDefinition * curFunction;
786 struct __ecereNameSpace__ecere__sys__BTNode;
788 struct __ecereNameSpace__ecere__sys__BTNode
791 struct __ecereNameSpace__ecere__sys__BTNode * parent;
792 struct __ecereNameSpace__ecere__sys__BTNode * left;
793 struct __ecereNameSpace__ecere__sys__BTNode * right;
797 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
799 struct __ecereNameSpace__ecere__com__Property;
801 struct __ecereNameSpace__ecere__com__Property
803 struct __ecereNameSpace__ecere__com__Property * prev;
804 struct __ecereNameSpace__ecere__com__Property * next;
806 unsigned int isProperty;
809 struct __ecereNameSpace__ecere__com__Class * _class;
810 const char * dataTypeString;
811 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
812 struct Type * dataType;
813 void (* Set)(void * , int);
814 int (* Get)(void * );
815 unsigned int (* IsSet)(void * );
819 unsigned int conversion;
820 unsigned int watcherOffset;
821 const char * category;
822 unsigned int compiled;
823 unsigned int selfWatchable;
824 unsigned int isWatchable;
827 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
829 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
831 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
833 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
837 extern void FreeIdentifier(struct Identifier * id);
839 extern struct Identifier * MkIdentifier(const char * string);
841 extern struct Expression * MkExpIdentifier(struct Identifier * id);
843 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
845 extern struct Identifier * CopyIdentifier(struct Identifier * id);
847 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
849 struct __ecereNameSpace__ecere__sys__OldLink;
851 struct __ecereNameSpace__ecere__sys__OldLink
853 struct __ecereNameSpace__ecere__sys__OldLink * prev;
854 struct __ecereNameSpace__ecere__sys__OldLink * next;
860 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
862 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
866 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
868 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
870 extern struct Specifier * MkSpecifier(int specifier);
872 extern struct Specifier * MkSpecifierName(const char * name);
874 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
876 extern void FreeSpecifier(struct Specifier * spec);
878 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
882 struct Statement * prev;
883 struct Statement * next;
888 struct __ecereNameSpace__ecere__sys__OldList * expressions;
891 struct Identifier * id;
892 struct Statement * stmt;
893 } ecere_gcc_struct labeled;
896 struct Expression * exp;
897 struct Statement * stmt;
898 } ecere_gcc_struct caseStmt;
901 struct __ecereNameSpace__ecere__sys__OldList * declarations;
902 struct __ecereNameSpace__ecere__sys__OldList * statements;
903 struct Context * context;
904 unsigned int isSwitch;
905 } ecere_gcc_struct compound;
908 struct __ecereNameSpace__ecere__sys__OldList * exp;
909 struct Statement * stmt;
910 struct Statement * elseStmt;
911 } ecere_gcc_struct ifStmt;
914 struct __ecereNameSpace__ecere__sys__OldList * exp;
915 struct Statement * stmt;
916 } ecere_gcc_struct switchStmt;
919 struct __ecereNameSpace__ecere__sys__OldList * exp;
920 struct Statement * stmt;
921 } ecere_gcc_struct whileStmt;
924 struct __ecereNameSpace__ecere__sys__OldList * exp;
925 struct Statement * stmt;
926 } ecere_gcc_struct doWhile;
929 struct Statement * init;
930 struct Statement * check;
931 struct __ecereNameSpace__ecere__sys__OldList * increment;
932 struct Statement * stmt;
933 } ecere_gcc_struct forStmt;
936 struct Identifier * id;
937 } ecere_gcc_struct gotoStmt;
940 struct Specifier * spec;
942 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
943 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
944 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
945 } ecere_gcc_struct asmStmt;
948 struct Expression * watcher;
949 struct Expression * object;
950 struct __ecereNameSpace__ecere__sys__OldList * watches;
951 } ecere_gcc_struct _watch;
954 struct Identifier * id;
955 struct __ecereNameSpace__ecere__sys__OldList * exp;
956 struct __ecereNameSpace__ecere__sys__OldList * filter;
957 struct Statement * stmt;
958 } ecere_gcc_struct forEachStmt;
959 struct Declaration * decl;
960 } ecere_gcc_struct __anon1;
963 extern struct Specifier * CopySpecifier(struct Specifier * spec);
965 extern struct Expression * MkExpClassSize(struct Specifier * _class);
971 struct Identifier * prev;
972 struct Identifier * next;
974 struct Symbol * classSym;
975 struct Specifier * _class;
977 struct Identifier * badID;
980 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
982 extern struct Symbol * FindClass(const char * name);
984 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
986 extern struct Symbol * FindType(struct Context * ctx, const char * name);
988 extern void FreeSymbol(struct Symbol * symbol);
992 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
994 extern void FreeClassDef(struct ClassDef * def);
998 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1000 struct TemplateDatatype
1002 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1003 struct Declarator * decl;
1006 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1008 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1010 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1012 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1014 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1018 struct Declarator * prev;
1019 struct Declarator * next;
1020 struct Location loc;
1022 struct Symbol * symbol;
1023 struct Declarator * declarator;
1026 struct Identifier * identifier;
1029 struct Expression * exp;
1030 struct Expression * posExp;
1031 struct Attrib * attrib;
1032 } ecere_gcc_struct structDecl;
1035 struct Expression * exp;
1036 struct Specifier * enumClass;
1037 } ecere_gcc_struct array;
1040 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1041 } ecere_gcc_struct function;
1044 struct Pointer * pointer;
1045 } ecere_gcc_struct pointer;
1048 struct ExtDecl * extended;
1049 } ecere_gcc_struct extended;
1050 } ecere_gcc_struct __anon1;
1053 extern struct Identifier * GetDeclId(struct Declarator * decl);
1055 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1057 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1059 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1061 extern void FreeDeclarator(struct Declarator * decl);
1063 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1065 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1067 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1069 struct FunctionDefinition
1071 struct FunctionDefinition * prev;
1072 struct FunctionDefinition * next;
1073 struct Location loc;
1074 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1075 struct Declarator * declarator;
1076 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1077 struct Statement * body;
1078 struct __ecereNameSpace__ecere__com__Class * _class;
1079 struct __ecereNameSpace__ecere__sys__OldList attached;
1082 struct Symbol * propSet;
1084 unsigned int propertyNoThis;
1087 extern struct Declarator * QMkPtrDecl(const char * id);
1089 struct ClassFunction;
1091 struct ClassFunction
1093 struct ClassFunction * prev;
1094 struct ClassFunction * next;
1095 struct Location loc;
1096 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1097 struct Declarator * declarator;
1098 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1099 struct Statement * body;
1100 struct __ecereNameSpace__ecere__com__Class * _class;
1101 struct __ecereNameSpace__ecere__sys__OldList attached;
1104 struct Symbol * propSet;
1105 unsigned int isVirtual;
1106 unsigned int isConstructor;
1107 unsigned int isDestructor;
1108 unsigned int dontMangle;
1113 extern struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic);
1115 extern void FreeClassFunction(struct ClassFunction * func);
1117 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1119 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1123 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1125 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1129 struct TypeName * prev;
1130 struct TypeName * next;
1131 struct Location loc;
1132 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1133 struct Declarator * declarator;
1134 int classObjectType;
1135 struct Expression * bitCount;
1138 extern void FreeTypeName(struct TypeName * typeName);
1140 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1142 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1144 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1146 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1148 struct __ecereNameSpace__ecere__com__BTNamedLink;
1150 struct __ecereNameSpace__ecere__com__BTNamedLink
1153 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1154 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1155 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1160 struct __ecereNameSpace__ecere__sys__NamedLink64;
1162 struct __ecereNameSpace__ecere__sys__NamedLink64
1164 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1165 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1170 struct Instantiation;
1174 struct Declaration * prev;
1175 struct Declaration * next;
1176 struct Location loc;
1182 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1183 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1184 } ecere_gcc_struct __anon1;
1185 struct Instantiation * inst;
1188 struct Identifier * id;
1189 struct Expression * exp;
1190 } ecere_gcc_struct __anon2;
1191 } ecere_gcc_struct __anon1;
1192 struct Specifier * extStorage;
1193 struct Symbol * symbol;
1197 struct Instantiation
1199 struct Instantiation * prev;
1200 struct Instantiation * next;
1201 struct Location loc;
1202 struct Specifier * _class;
1203 struct Expression * exp;
1204 struct __ecereNameSpace__ecere__sys__OldList * members;
1205 struct Symbol * symbol;
1206 unsigned int fullSet;
1207 unsigned int isConstant;
1208 unsigned char * data;
1209 struct Location nameLoc;
1210 struct Location insideLoc;
1214 extern void FreeInstance(struct Instantiation * inst);
1216 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1218 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1220 struct InitDeclarator;
1222 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1224 struct PropertyWatch;
1226 struct PropertyWatch
1228 struct PropertyWatch * prev;
1229 struct PropertyWatch * next;
1230 struct Location loc;
1231 struct Statement * compound;
1232 struct __ecereNameSpace__ecere__sys__OldList * properties;
1233 unsigned int deleteWatch;
1236 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1238 struct PropertyImport;
1240 struct PropertyImport
1242 struct PropertyImport * prev;
1243 struct PropertyImport * next;
1245 unsigned int isVirtual;
1246 unsigned int hasSet;
1247 unsigned int hasGet;
1250 struct MethodImport;
1254 struct MethodImport * prev;
1255 struct MethodImport * next;
1257 unsigned int isVirtual;
1260 struct FunctionImport;
1262 struct FunctionImport
1264 struct FunctionImport * prev;
1265 struct FunctionImport * next;
1273 struct ClassImport * prev;
1274 struct ClassImport * next;
1276 struct __ecereNameSpace__ecere__sys__OldList methods;
1277 struct __ecereNameSpace__ecere__sys__OldList properties;
1278 unsigned int itself;
1286 struct Expression * prev;
1287 struct Expression * next;
1288 struct Location loc;
1295 struct Identifier * identifier;
1296 } ecere_gcc_struct __anon1;
1297 struct Statement * compound;
1298 struct Instantiation * instance;
1302 unsigned int intlString;
1303 unsigned int wideString;
1304 } ecere_gcc_struct __anon2;
1305 struct __ecereNameSpace__ecere__sys__OldList * list;
1308 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1309 struct Declarator * decl;
1310 } ecere_gcc_struct _classExp;
1313 struct Identifier * id;
1314 } ecere_gcc_struct classData;
1317 struct Expression * exp;
1318 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1319 struct Location argLoc;
1320 } ecere_gcc_struct call;
1323 struct Expression * exp;
1324 struct __ecereNameSpace__ecere__sys__OldList * index;
1325 } ecere_gcc_struct index;
1328 struct Expression * exp;
1329 struct Identifier * member;
1331 unsigned int thisPtr;
1332 } ecere_gcc_struct member;
1336 struct Expression * exp1;
1337 struct Expression * exp2;
1338 } ecere_gcc_struct op;
1339 struct TypeName * typeName;
1340 struct Specifier * _class;
1343 struct TypeName * typeName;
1344 struct Expression * exp;
1345 } ecere_gcc_struct cast;
1348 struct Expression * cond;
1349 struct __ecereNameSpace__ecere__sys__OldList * exp;
1350 struct Expression * elseExp;
1351 } ecere_gcc_struct cond;
1354 struct TypeName * typeName;
1355 struct Expression * size;
1356 } ecere_gcc_struct _new;
1359 struct TypeName * typeName;
1360 struct Expression * size;
1361 struct Expression * exp;
1362 } ecere_gcc_struct _renew;
1366 struct Identifier * id;
1367 } ecere_gcc_struct db;
1370 struct Expression * ds;
1371 struct Expression * name;
1372 } ecere_gcc_struct dbopen;
1375 struct TypeName * typeName;
1376 struct Initializer * initializer;
1377 } ecere_gcc_struct initializer;
1380 struct Expression * exp;
1381 struct TypeName * typeName;
1382 } ecere_gcc_struct vaArg;
1385 struct TypeName * typeName;
1386 struct Identifier * id;
1387 } ecere_gcc_struct offset;
1388 } ecere_gcc_struct __anon1;
1389 unsigned int debugValue;
1390 struct __ecereNameSpace__ecere__com__DataValue val;
1392 unsigned int hasAddress;
1393 struct Type * expType;
1394 struct Type * destType;
1397 unsigned int byReference;
1398 unsigned int isConstant;
1399 unsigned int addedThis;
1400 unsigned int needCast;
1401 unsigned int thisPtr;
1402 unsigned int opDestType;
1403 unsigned int usedInComparison;
1404 unsigned int ambiguousUnits;
1405 unsigned int parentOpDestType;
1406 unsigned int needTemplateCast;
1409 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1413 struct Initializer * prev;
1414 struct Initializer * next;
1415 struct Location loc;
1419 struct Expression * exp;
1420 struct __ecereNameSpace__ecere__sys__OldList * list;
1421 } ecere_gcc_struct __anon1;
1422 unsigned int isConstant;
1423 struct Identifier * id;
1426 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1428 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1430 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1432 struct InitDeclarator
1434 struct InitDeclarator * prev;
1435 struct InitDeclarator * next;
1436 struct Location loc;
1437 struct Declarator * declarator;
1438 struct Initializer * initializer;
1441 void ApplyLocation(struct Expression * exp, struct Location * loc)
1447 if(exp->__anon1.op.exp1)
1448 ApplyLocation(exp->__anon1.op.exp1, loc);
1449 if(exp->__anon1.op.exp2)
1450 ApplyLocation(exp->__anon1.op.exp2, loc);
1453 if(exp->__anon1.list)
1455 struct Expression * e;
1457 for(e = (*exp->__anon1.list).first; e; e = e->next)
1458 ApplyLocation(e, loc);
1462 if(exp->__anon1.index.index)
1464 struct Expression * e;
1466 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1467 ApplyLocation(e, loc);
1469 if(exp->__anon1.index.exp)
1470 ApplyLocation(exp->__anon1.index.exp, loc);
1473 if(exp->__anon1.call.arguments)
1475 struct Expression * arg;
1477 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1478 ApplyLocation(arg, loc);
1480 if(exp->__anon1.call.exp)
1481 ApplyLocation(exp->__anon1.call.exp, loc);
1485 if(exp->__anon1.member.exp)
1486 ApplyLocation(exp->__anon1.member.exp, loc);
1489 if(exp->__anon1.cast.exp)
1490 ApplyLocation(exp->__anon1.cast.exp, loc);
1493 if(exp->__anon1.cond.exp)
1495 struct Expression * e;
1497 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1498 ApplyLocation(e, loc);
1500 if(exp->__anon1.cond.cond)
1501 ApplyLocation(exp->__anon1.cond.cond, loc);
1502 if(exp->__anon1.cond.elseExp)
1503 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1506 if(exp->__anon1.vaArg.exp)
1507 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1514 void __ecereMethod_Expression_Clear();
1520 struct MembersInit * prev;
1521 struct MembersInit * next;
1522 struct Location loc;
1526 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1527 struct ClassFunction * function;
1528 } ecere_gcc_struct __anon1;
1531 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1537 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* Neg)(struct Expression *, struct Operand *);
1543 unsigned int (* Inc)(struct Expression *, struct Operand *);
1544 unsigned int (* Dec)(struct Expression *, struct Operand *);
1545 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1553 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1554 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1555 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1557 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1559 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1560 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1561 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1562 unsigned int (* Not)(struct Expression *, struct Operand *);
1563 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1564 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1565 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1566 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1567 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1568 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1569 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1570 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1571 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1578 unsigned int ptrSize;
1591 } ecere_gcc_struct __anon1;
1595 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1597 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1599 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1602 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1604 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1606 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1609 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1611 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1614 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1616 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1618 _PrintType(type, string, printName, fullName, 1);
1621 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1623 _PrintType(type, string, printName, fullName, 0);
1626 struct __ecereNameSpace__ecere__com__Method;
1628 struct __ecereNameSpace__ecere__com__Method
1631 struct __ecereNameSpace__ecere__com__Method * parent;
1632 struct __ecereNameSpace__ecere__com__Method * left;
1633 struct __ecereNameSpace__ecere__com__Method * right;
1638 struct __ecereNameSpace__ecere__com__Class * _class;
1640 const char * dataTypeString;
1641 struct Type * dataType;
1648 struct Symbol * parent;
1649 struct Symbol * left;
1650 struct Symbol * right;
1655 struct __ecereNameSpace__ecere__com__Method * method;
1656 struct __ecereNameSpace__ecere__com__Property * _property;
1657 struct __ecereNameSpace__ecere__com__Class * registered;
1658 } ecere_gcc_struct __anon1;
1659 unsigned int notYetDeclared;
1664 struct External * pointerExternal;
1665 struct External * structExternal;
1666 } ecere_gcc_struct __anon1;
1669 struct External * externalGet;
1670 struct External * externalSet;
1671 struct External * externalPtr;
1672 struct External * externalIsSet;
1673 } ecere_gcc_struct __anon2;
1676 struct External * methodExternal;
1677 struct External * methodCodeExternal;
1678 } ecere_gcc_struct __anon3;
1679 } ecere_gcc_struct __anon2;
1680 unsigned int imported;
1681 unsigned int declaredStructSym;
1682 struct __ecereNameSpace__ecere__com__Class * _class;
1683 unsigned int declaredStruct;
1684 unsigned int needConstructor;
1685 unsigned int needDestructor;
1686 char * constructorName;
1689 char * destructorName;
1690 struct ModuleImport * module;
1691 struct ClassImport * _import;
1692 struct Location nameLoc;
1693 unsigned int isParam;
1694 unsigned int isRemote;
1695 unsigned int isStruct;
1696 unsigned int fireWatchersDone;
1698 unsigned int classData;
1699 unsigned int isStatic;
1701 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1702 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1703 struct Context * ctx;
1705 struct Expression * propCategory;
1706 unsigned int mustRegister;
1709 struct __ecereNameSpace__ecere__com__ClassProperty;
1711 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1713 struct __ecereNameSpace__ecere__com__ClassProperty
1716 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1717 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1718 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1720 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1721 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1722 const char * dataTypeString;
1723 struct Type * dataType;
1724 unsigned int constant;
1727 struct __ecereNameSpace__ecere__com__BitMember;
1729 struct __ecereNameSpace__ecere__com__BitMember
1731 struct __ecereNameSpace__ecere__com__BitMember * prev;
1732 struct __ecereNameSpace__ecere__com__BitMember * next;
1734 unsigned int isProperty;
1737 struct __ecereNameSpace__ecere__com__Class * _class;
1738 const char * dataTypeString;
1739 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1740 struct Type * dataType;
1747 struct __ecereNameSpace__ecere__com__DataMember;
1749 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1755 const char * dataTypeString;
1756 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1757 } ecere_gcc_struct __anon1;
1758 struct __ecereNameSpace__ecere__com__DataValue expression;
1761 const char * memberString;
1764 struct __ecereNameSpace__ecere__com__DataMember * member;
1765 struct __ecereNameSpace__ecere__com__Property * prop;
1766 struct __ecereNameSpace__ecere__com__Method * method;
1767 } ecere_gcc_struct __anon1;
1768 } ecere_gcc_struct __anon2;
1769 } ecere_gcc_struct __anon1;
1772 extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
1774 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
1776 struct TemplateParameter;
1778 struct TemplateParameter
1780 struct TemplateParameter * prev;
1781 struct TemplateParameter * next;
1782 struct Location loc;
1784 struct Identifier * identifier;
1787 struct TemplateDatatype * dataType;
1789 } ecere_gcc_struct __anon1;
1790 struct TemplateArgument * defaultArgument;
1791 const char * dataTypeString;
1792 struct Type * baseType;
1802 struct Symbol * _class;
1805 struct __ecereNameSpace__ecere__sys__OldList members;
1807 } ecere_gcc_struct __anon1;
1810 struct Type * returnType;
1811 struct __ecereNameSpace__ecere__sys__OldList params;
1812 struct Symbol * thisClass;
1813 unsigned int staticMethod;
1814 struct TemplateParameter * thisClassTemplate;
1815 } ecere_gcc_struct __anon2;
1818 struct __ecereNameSpace__ecere__com__Method * method;
1819 struct __ecereNameSpace__ecere__com__Class * methodClass;
1820 struct __ecereNameSpace__ecere__com__Class * usedClass;
1821 } ecere_gcc_struct __anon3;
1824 struct Type * arrayType;
1826 struct Expression * arraySizeExp;
1827 unsigned int freeExp;
1828 struct Symbol * enumClass;
1829 } ecere_gcc_struct __anon4;
1831 struct TemplateParameter * templateParameter;
1832 } ecere_gcc_struct __anon1;
1837 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1839 int classObjectType;
1841 unsigned int offset;
1845 unsigned int isSigned : 1;
1846 unsigned int constant : 1;
1847 unsigned int truth : 1;
1848 unsigned int byReference : 1;
1849 unsigned int extraParam : 1;
1850 unsigned int directClassAccess : 1;
1851 unsigned int computing : 1;
1852 unsigned int keepCast : 1;
1853 unsigned int passAsTemplate : 1;
1854 unsigned int dllExport : 1;
1855 unsigned int attrStdcall : 1;
1856 unsigned int declaredWithStruct : 1;
1857 unsigned int typedByReference : 1;
1858 unsigned int casted : 1;
1859 unsigned int pointerAlignment : 1;
1860 unsigned int isLong : 1;
1861 unsigned int signedBeforePromotion : 1;
1862 unsigned int isVector : 1;
1867 struct Specifier * prev;
1868 struct Specifier * next;
1869 struct Location loc;
1876 struct ExtDecl * extDecl;
1878 struct Symbol * symbol;
1879 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1880 struct Specifier * nsSpec;
1881 } ecere_gcc_struct __anon1;
1884 struct Identifier * id;
1885 struct __ecereNameSpace__ecere__sys__OldList * list;
1886 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1887 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1888 unsigned int addNameSpace;
1889 struct Context * ctx;
1890 struct ExtDecl * extDeclStruct;
1891 } ecere_gcc_struct __anon2;
1892 struct Expression * expression;
1893 struct Specifier * _class;
1894 struct TemplateParameter * templateParameter;
1895 } ecere_gcc_struct __anon1;
1898 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1900 struct TemplatedType
1903 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1904 struct __ecereNameSpace__ecere__sys__BTNode * left;
1905 struct __ecereNameSpace__ecere__sys__BTNode * right;
1907 struct TemplateParameter * param;
1910 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1912 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1914 if(!param->baseType)
1916 if(param->dataTypeString)
1917 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1919 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1921 return param->baseType;
1923 return (((void *)0));
1926 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1928 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1930 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1934 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1945 if(type1->passAsTemplate && !type2->passAsTemplate)
1947 return type1->isSigned != type2->isSigned;
1949 return type1->__anon1._class != type2->__anon1._class;
1951 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1959 unsigned int GetOpInt(struct Operand * op2, int * value2)
1961 if(op2->kind == 3 && op2->type->isSigned)
1962 *value2 = op2->__anon1.i;
1963 else if(op2->kind == 3)
1964 *value2 = (int)op2->__anon1.ui;
1965 else if(op2->kind == 4 && op2->type->isSigned)
1966 *value2 = (int)op2->__anon1.i64;
1967 else if(op2->kind == 4)
1968 *value2 = (int)op2->__anon1.ui64;
1969 else if(op2->kind == 23 && op2->type->isSigned)
1970 *value2 = (int)op2->__anon1.i64;
1971 else if(op2->kind == 23)
1972 *value2 = (int)op2->__anon1.ui64;
1973 else if(op2->kind == 22 && op2->type->isSigned)
1974 *value2 = (int)op2->__anon1.i64;
1975 else if(op2->kind == 22)
1976 *value2 = (int)op2->__anon1.ui64;
1977 else if(op2->kind == 2 && op2->type->isSigned)
1978 *value2 = (int)op2->__anon1.s;
1979 else if(op2->kind == 2)
1980 *value2 = (int)op2->__anon1.us;
1981 else if(op2->kind == 1 && op2->type->isSigned)
1982 *value2 = (int)op2->__anon1.c;
1983 else if(op2->kind == 24 || op2->kind == 1)
1984 *value2 = (int)op2->__anon1.uc;
1985 else if(op2->kind == 6)
1986 *value2 = (int)op2->__anon1.f;
1987 else if(op2->kind == 7)
1988 *value2 = (int)op2->__anon1.d;
1989 else if(op2->kind == 13)
1990 *value2 = (int)op2->__anon1.ui64;
1996 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1998 if(op2->kind == 3 && op2->type->isSigned)
1999 *value2 = (unsigned int)op2->__anon1.i;
2000 else if(op2->kind == 3)
2001 *value2 = op2->__anon1.ui;
2002 else if(op2->kind == 4 && op2->type->isSigned)
2003 *value2 = (unsigned int)op2->__anon1.i64;
2004 else if(op2->kind == 4)
2005 *value2 = (unsigned int)op2->__anon1.ui64;
2006 else if(op2->kind == 23 && op2->type->isSigned)
2007 *value2 = (unsigned int)op2->__anon1.i64;
2008 else if(op2->kind == 23)
2009 *value2 = (unsigned int)op2->__anon1.ui64;
2010 else if(op2->kind == 22 && op2->type->isSigned)
2011 *value2 = (unsigned int)op2->__anon1.i64;
2012 else if(op2->kind == 22)
2013 *value2 = (unsigned int)op2->__anon1.ui64;
2014 else if(op2->kind == 2 && op2->type->isSigned)
2015 *value2 = (unsigned int)op2->__anon1.s;
2016 else if(op2->kind == 2)
2017 *value2 = (unsigned int)op2->__anon1.us;
2018 else if(op2->kind == 1 && op2->type->isSigned)
2019 *value2 = (unsigned int)op2->__anon1.c;
2020 else if(op2->kind == 24 || op2->kind == 1)
2021 *value2 = (unsigned int)op2->__anon1.uc;
2022 else if(op2->kind == 6)
2023 *value2 = (unsigned int)op2->__anon1.f;
2024 else if(op2->kind == 7)
2025 *value2 = (unsigned int)op2->__anon1.d;
2026 else if(op2->kind == 13)
2027 *value2 = (unsigned int)op2->__anon1.ui64;
2033 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2035 if(op2->kind == 3 && op2->type->isSigned)
2036 *value2 = (long long)op2->__anon1.i;
2037 else if(op2->kind == 3)
2038 *value2 = (long long)op2->__anon1.ui;
2039 else if(op2->kind == 4 && op2->type->isSigned)
2040 *value2 = op2->__anon1.i64;
2041 else if(op2->kind == 4)
2042 *value2 = (long long)op2->__anon1.ui64;
2043 else if(op2->kind == 23 && op2->type->isSigned)
2044 *value2 = op2->__anon1.i64;
2045 else if(op2->kind == 23)
2046 *value2 = (long long)op2->__anon1.ui64;
2047 else if(op2->kind == 22 && op2->type->isSigned)
2048 *value2 = op2->__anon1.i64;
2049 else if(op2->kind == 22)
2050 *value2 = (long long)op2->__anon1.ui64;
2051 else if(op2->kind == 2 && op2->type->isSigned)
2052 *value2 = (long long)op2->__anon1.s;
2053 else if(op2->kind == 2)
2054 *value2 = (long long)op2->__anon1.us;
2055 else if(op2->kind == 1 && op2->type->isSigned)
2056 *value2 = (long long)op2->__anon1.c;
2057 else if(op2->kind == 24 || op2->kind == 1)
2058 *value2 = (long long)op2->__anon1.uc;
2059 else if(op2->kind == 6)
2060 *value2 = (long long)op2->__anon1.f;
2061 else if(op2->kind == 7)
2062 *value2 = (long long)op2->__anon1.d;
2063 else if(op2->kind == 13)
2064 *value2 = (long long)op2->__anon1.ui64;
2070 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2072 if(op2->kind == 3 && op2->type->isSigned)
2073 *value2 = (uint64)op2->__anon1.i;
2074 else if(op2->kind == 3)
2075 *value2 = (uint64)op2->__anon1.ui;
2076 else if(op2->kind == 4 && op2->type->isSigned)
2077 *value2 = (uint64)op2->__anon1.i64;
2078 else if(op2->kind == 4)
2079 *value2 = op2->__anon1.ui64;
2080 else if(op2->kind == 23 && op2->type->isSigned)
2081 *value2 = (uint64)op2->__anon1.i64;
2082 else if(op2->kind == 23)
2083 *value2 = op2->__anon1.ui64;
2084 else if(op2->kind == 22 && op2->type->isSigned)
2085 *value2 = (uint64)op2->__anon1.i64;
2086 else if(op2->kind == 22)
2087 *value2 = op2->__anon1.ui64;
2088 else if(op2->kind == 2 && op2->type->isSigned)
2089 *value2 = (uint64)op2->__anon1.s;
2090 else if(op2->kind == 2)
2091 *value2 = (uint64)op2->__anon1.us;
2092 else if(op2->kind == 1 && op2->type->isSigned)
2093 *value2 = (uint64)op2->__anon1.c;
2094 else if(op2->kind == 24 || op2->kind == 1)
2095 *value2 = (uint64)op2->__anon1.uc;
2096 else if(op2->kind == 6)
2097 *value2 = (uint64)op2->__anon1.f;
2098 else if(op2->kind == 7)
2099 *value2 = (uint64)op2->__anon1.d;
2100 else if(op2->kind == 13)
2101 *value2 = op2->__anon1.ui64;
2107 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2109 if(op2->kind == 3 && op2->type->isSigned)
2110 *value2 = (intptr_t)op2->__anon1.i;
2111 else if(op2->kind == 3)
2112 *value2 = (intptr_t)op2->__anon1.ui;
2113 else if(op2->kind == 4 && op2->type->isSigned)
2114 *value2 = (intptr_t)op2->__anon1.i64;
2115 else if(op2->kind == 4)
2116 *value2 = (intptr_t)op2->__anon1.ui64;
2117 else if(op2->kind == 23 && op2->type->isSigned)
2118 *value2 = (intptr_t)op2->__anon1.i64;
2119 else if(op2->kind == 23)
2120 *value2 = (intptr_t)op2->__anon1.ui64;
2121 else if(op2->kind == 22 && op2->type->isSigned)
2122 *value2 = (intptr_t)op2->__anon1.i64;
2123 else if(op2->kind == 22)
2124 *value2 = (intptr_t)op2->__anon1.ui64;
2125 else if(op2->kind == 2 && op2->type->isSigned)
2126 *value2 = (intptr_t)op2->__anon1.s;
2127 else if(op2->kind == 2)
2128 *value2 = (intptr_t)op2->__anon1.us;
2129 else if(op2->kind == 1 && op2->type->isSigned)
2130 *value2 = (intptr_t)op2->__anon1.c;
2131 else if(op2->kind == 24 || op2->kind == 1)
2132 *value2 = (intptr_t)op2->__anon1.uc;
2133 else if(op2->kind == 6)
2134 *value2 = (intptr_t)op2->__anon1.f;
2135 else if(op2->kind == 7)
2136 *value2 = (intptr_t)op2->__anon1.d;
2137 else if(op2->kind == 13)
2138 *value2 = (intptr_t)op2->__anon1.ui64;
2144 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2146 if(op2->kind == 3 && op2->type->isSigned)
2147 *value2 = (uintptr_t)op2->__anon1.i;
2148 else if(op2->kind == 3)
2149 *value2 = (uintptr_t)op2->__anon1.ui;
2150 else if(op2->kind == 4 && op2->type->isSigned)
2151 *value2 = (uintptr_t)op2->__anon1.i64;
2152 else if(op2->kind == 4)
2153 *value2 = (uintptr_t)op2->__anon1.ui64;
2154 else if(op2->kind == 23 && op2->type->isSigned)
2155 *value2 = (uintptr_t)op2->__anon1.i64;
2156 else if(op2->kind == 23)
2157 *value2 = (uintptr_t)op2->__anon1.ui64;
2158 else if(op2->kind == 22 && op2->type->isSigned)
2159 *value2 = (uintptr_t)op2->__anon1.i64;
2160 else if(op2->kind == 22)
2161 *value2 = (uintptr_t)op2->__anon1.ui64;
2162 else if(op2->kind == 2 && op2->type->isSigned)
2163 *value2 = (uintptr_t)op2->__anon1.s;
2164 else if(op2->kind == 2)
2165 *value2 = (uintptr_t)op2->__anon1.us;
2166 else if(op2->kind == 1 && op2->type->isSigned)
2167 *value2 = (uintptr_t)op2->__anon1.c;
2168 else if(op2->kind == 24 || op2->kind == 1)
2169 *value2 = (uintptr_t)op2->__anon1.uc;
2170 else if(op2->kind == 6)
2171 *value2 = (uintptr_t)op2->__anon1.f;
2172 else if(op2->kind == 7)
2173 *value2 = (uintptr_t)op2->__anon1.d;
2174 else if(op2->kind == 13)
2175 *value2 = (uintptr_t)op2->__anon1.ui64;
2181 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2183 if(op2->kind == 3 && op2->type->isSigned)
2184 *value2 = (ssize_t)op2->__anon1.i;
2185 else if(op2->kind == 3)
2186 *value2 = (ssize_t)op2->__anon1.ui;
2187 else if(op2->kind == 4 && op2->type->isSigned)
2188 *value2 = (ssize_t)op2->__anon1.i64;
2189 else if(op2->kind == 4)
2190 *value2 = (ssize_t)op2->__anon1.ui64;
2191 else if(op2->kind == 23 && op2->type->isSigned)
2192 *value2 = (ssize_t)op2->__anon1.i64;
2193 else if(op2->kind == 23)
2194 *value2 = (ssize_t)op2->__anon1.ui64;
2195 else if(op2->kind == 22 && op2->type->isSigned)
2196 *value2 = (ssize_t)op2->__anon1.i64;
2197 else if(op2->kind == 22)
2198 *value2 = (ssize_t)op2->__anon1.ui64;
2199 else if(op2->kind == 2 && op2->type->isSigned)
2200 *value2 = (ssize_t)op2->__anon1.s;
2201 else if(op2->kind == 2)
2202 *value2 = (ssize_t)op2->__anon1.us;
2203 else if(op2->kind == 1 && op2->type->isSigned)
2204 *value2 = (ssize_t)op2->__anon1.c;
2205 else if(op2->kind == 24 || op2->kind == 1)
2206 *value2 = (ssize_t)op2->__anon1.uc;
2207 else if(op2->kind == 6)
2208 *value2 = (ssize_t)op2->__anon1.f;
2209 else if(op2->kind == 7)
2210 *value2 = (ssize_t)op2->__anon1.d;
2211 else if(op2->kind == 13)
2212 *value2 = (ssize_t)op2->__anon1.ui64;
2218 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2220 if(op2->kind == 3 && op2->type->isSigned)
2221 *value2 = (size_t)op2->__anon1.i;
2222 else if(op2->kind == 3)
2223 *value2 = (size_t)op2->__anon1.ui;
2224 else if(op2->kind == 4 && op2->type->isSigned)
2225 *value2 = (size_t)op2->__anon1.i64;
2226 else if(op2->kind == 4)
2227 *value2 = (size_t)op2->__anon1.ui64;
2228 else if(op2->kind == 23 && op2->type->isSigned)
2229 *value2 = (size_t)op2->__anon1.i64;
2230 else if(op2->kind == 23)
2231 *value2 = (size_t)op2->__anon1.ui64;
2232 else if(op2->kind == 22 && op2->type->isSigned)
2233 *value2 = (size_t)op2->__anon1.i64;
2234 else if(op2->kind == 22)
2235 *value2 = (size_t)op2->__anon1.ui64;
2236 else if(op2->kind == 2 && op2->type->isSigned)
2237 *value2 = (size_t)op2->__anon1.s;
2238 else if(op2->kind == 2)
2239 *value2 = (size_t)op2->__anon1.us;
2240 else if(op2->kind == 1 && op2->type->isSigned)
2241 *value2 = (size_t)op2->__anon1.c;
2242 else if(op2->kind == 24 || op2->kind == 1)
2243 *value2 = (size_t)op2->__anon1.uc;
2244 else if(op2->kind == 6)
2245 *value2 = (size_t)op2->__anon1.f;
2246 else if(op2->kind == 7)
2247 *value2 = (size_t)op2->__anon1.d;
2248 else if(op2->kind == 13)
2249 *value2 = (size_t)op2->__anon1.ui64;
2255 unsigned int GetOpShort(struct Operand * op2, short * value2)
2257 if(op2->kind == 3 && op2->type->isSigned)
2258 *value2 = (short)op2->__anon1.i;
2259 else if(op2->kind == 3)
2260 *value2 = (short)op2->__anon1.ui;
2261 else if(op2->kind == 4 && op2->type->isSigned)
2262 *value2 = (short)op2->__anon1.i64;
2263 else if(op2->kind == 4)
2264 *value2 = (short)op2->__anon1.ui64;
2265 else if(op2->kind == 23 && op2->type->isSigned)
2266 *value2 = (short)op2->__anon1.i64;
2267 else if(op2->kind == 23)
2268 *value2 = (short)op2->__anon1.ui64;
2269 else if(op2->kind == 22 && op2->type->isSigned)
2270 *value2 = (short)op2->__anon1.i64;
2271 else if(op2->kind == 22)
2272 *value2 = (short)op2->__anon1.ui64;
2273 else if(op2->kind == 2 && op2->type->isSigned)
2274 *value2 = op2->__anon1.s;
2275 else if(op2->kind == 2)
2276 *value2 = (short)op2->__anon1.us;
2277 else if(op2->kind == 1 && op2->type->isSigned)
2278 *value2 = (short)op2->__anon1.c;
2279 else if(op2->kind == 24 || op2->kind == 1)
2280 *value2 = (short)op2->__anon1.uc;
2281 else if(op2->kind == 6)
2282 *value2 = (short)op2->__anon1.f;
2283 else if(op2->kind == 7)
2284 *value2 = (short)op2->__anon1.d;
2285 else if(op2->kind == 13)
2286 *value2 = (short)op2->__anon1.ui64;
2292 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2294 if(op2->kind == 3 && op2->type->isSigned)
2295 *value2 = (unsigned short)op2->__anon1.i;
2296 else if(op2->kind == 3)
2297 *value2 = (unsigned short)op2->__anon1.ui;
2298 else if(op2->kind == 4 && op2->type->isSigned)
2299 *value2 = (unsigned short)op2->__anon1.i64;
2300 else if(op2->kind == 4)
2301 *value2 = (unsigned short)op2->__anon1.ui64;
2302 else if(op2->kind == 23 && op2->type->isSigned)
2303 *value2 = (unsigned short)op2->__anon1.i64;
2304 else if(op2->kind == 23)
2305 *value2 = (unsigned short)op2->__anon1.ui64;
2306 else if(op2->kind == 22 && op2->type->isSigned)
2307 *value2 = (unsigned short)op2->__anon1.i64;
2308 else if(op2->kind == 22)
2309 *value2 = (unsigned short)op2->__anon1.ui64;
2310 else if(op2->kind == 2 && op2->type->isSigned)
2311 *value2 = (unsigned short)op2->__anon1.s;
2312 else if(op2->kind == 2)
2313 *value2 = op2->__anon1.us;
2314 else if(op2->kind == 1 && op2->type->isSigned)
2315 *value2 = (unsigned short)op2->__anon1.c;
2316 else if(op2->kind == 24 || op2->kind == 1)
2317 *value2 = (unsigned short)op2->__anon1.uc;
2318 else if(op2->kind == 6)
2319 *value2 = (unsigned short)op2->__anon1.f;
2320 else if(op2->kind == 7)
2321 *value2 = (unsigned short)op2->__anon1.d;
2322 else if(op2->kind == 13)
2323 *value2 = (unsigned short)op2->__anon1.ui64;
2329 unsigned int GetOpChar(struct Operand * op2, char * value2)
2331 if(op2->kind == 3 && op2->type->isSigned)
2332 *value2 = (char)op2->__anon1.i;
2333 else if(op2->kind == 3)
2334 *value2 = (char)op2->__anon1.ui;
2335 else if(op2->kind == 4 && op2->type->isSigned)
2336 *value2 = (char)op2->__anon1.i64;
2337 else if(op2->kind == 4)
2338 *value2 = (char)op2->__anon1.ui64;
2339 else if(op2->kind == 23 && op2->type->isSigned)
2340 *value2 = (char)op2->__anon1.i64;
2341 else if(op2->kind == 23)
2342 *value2 = (char)op2->__anon1.ui64;
2343 else if(op2->kind == 22 && op2->type->isSigned)
2344 *value2 = (char)op2->__anon1.i64;
2345 else if(op2->kind == 22)
2346 *value2 = (char)op2->__anon1.ui64;
2347 else if(op2->kind == 2 && op2->type->isSigned)
2348 *value2 = (char)op2->__anon1.s;
2349 else if(op2->kind == 2)
2350 *value2 = (char)op2->__anon1.us;
2351 else if(op2->kind == 1 && op2->type->isSigned)
2352 *value2 = op2->__anon1.c;
2353 else if(op2->kind == 24 || op2->kind == 1)
2354 *value2 = (char)op2->__anon1.uc;
2355 else if(op2->kind == 6)
2356 *value2 = (char)op2->__anon1.f;
2357 else if(op2->kind == 7)
2358 *value2 = (char)op2->__anon1.d;
2359 else if(op2->kind == 13)
2360 *value2 = (char)op2->__anon1.ui64;
2366 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2368 if(op2->kind == 3 && op2->type->isSigned)
2369 *value2 = (unsigned char)op2->__anon1.i;
2370 else if(op2->kind == 3)
2371 *value2 = (unsigned char)op2->__anon1.ui;
2372 else if(op2->kind == 4 && op2->type->isSigned)
2373 *value2 = (unsigned char)op2->__anon1.i64;
2374 else if(op2->kind == 4)
2375 *value2 = (unsigned char)op2->__anon1.ui64;
2376 else if(op2->kind == 23 && op2->type->isSigned)
2377 *value2 = (unsigned char)op2->__anon1.i64;
2378 else if(op2->kind == 23)
2379 *value2 = (unsigned char)op2->__anon1.ui64;
2380 else if(op2->kind == 22 && op2->type->isSigned)
2381 *value2 = (unsigned char)op2->__anon1.i64;
2382 else if(op2->kind == 22)
2383 *value2 = (unsigned char)op2->__anon1.ui64;
2384 else if(op2->kind == 2 && op2->type->isSigned)
2385 *value2 = (unsigned char)op2->__anon1.s;
2386 else if(op2->kind == 2)
2387 *value2 = (unsigned char)op2->__anon1.us;
2388 else if(op2->kind == 1 && op2->type->isSigned)
2389 *value2 = (unsigned char)op2->__anon1.c;
2390 else if(op2->kind == 24 || op2->kind == 1)
2391 *value2 = op2->__anon1.uc;
2392 else if(op2->kind == 6)
2393 *value2 = (unsigned char)op2->__anon1.f;
2394 else if(op2->kind == 7)
2395 *value2 = (unsigned char)op2->__anon1.d;
2396 else if(op2->kind == 13)
2397 *value2 = (unsigned char)op2->__anon1.ui64;
2403 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2405 if(op2->kind == 3 && op2->type->isSigned)
2406 *value2 = (float)(float)op2->__anon1.i;
2407 else if(op2->kind == 3)
2408 *value2 = (float)(float)op2->__anon1.ui;
2409 else if(op2->kind == 4 && op2->type->isSigned)
2410 *value2 = (float)(float)op2->__anon1.i64;
2411 else if(op2->kind == 4)
2412 *value2 = (float)(float)op2->__anon1.ui64;
2413 else if(op2->kind == 23 && op2->type->isSigned)
2414 *value2 = (float)(float)op2->__anon1.i64;
2415 else if(op2->kind == 23)
2416 *value2 = (float)(float)op2->__anon1.ui64;
2417 else if(op2->kind == 22 && op2->type->isSigned)
2418 *value2 = (float)(float)op2->__anon1.i64;
2419 else if(op2->kind == 22)
2420 *value2 = (float)(float)op2->__anon1.ui64;
2421 else if(op2->kind == 2 && op2->type->isSigned)
2422 *value2 = (float)(float)op2->__anon1.s;
2423 else if(op2->kind == 2)
2424 *value2 = (float)(float)op2->__anon1.us;
2425 else if(op2->kind == 1 && op2->type->isSigned)
2426 *value2 = (float)(float)op2->__anon1.c;
2427 else if(op2->kind == 24 || op2->kind == 1)
2428 *value2 = (float)(float)op2->__anon1.uc;
2429 else if(op2->kind == 6)
2430 *value2 = (float)op2->__anon1.f;
2431 else if(op2->kind == 7)
2432 *value2 = (float)op2->__anon1.d;
2433 else if(op2->kind == 13)
2434 *value2 = (float)(float)op2->__anon1.ui64;
2440 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2442 if(op2->kind == 3 && op2->type->isSigned)
2443 *value2 = (double)(double)op2->__anon1.i;
2444 else if(op2->kind == 3)
2445 *value2 = (double)(double)op2->__anon1.ui;
2446 else if(op2->kind == 4 && op2->type->isSigned)
2447 *value2 = (double)(double)op2->__anon1.i64;
2448 else if(op2->kind == 4)
2449 *value2 = (double)(double)op2->__anon1.ui64;
2450 else if(op2->kind == 23 && op2->type->isSigned)
2451 *value2 = (double)(double)op2->__anon1.i64;
2452 else if(op2->kind == 23)
2453 *value2 = (double)(double)op2->__anon1.ui64;
2454 else if(op2->kind == 22 && op2->type->isSigned)
2455 *value2 = (double)(double)op2->__anon1.i64;
2456 else if(op2->kind == 22)
2457 *value2 = (double)(double)op2->__anon1.ui64;
2458 else if(op2->kind == 2 && op2->type->isSigned)
2459 *value2 = (double)(double)op2->__anon1.s;
2460 else if(op2->kind == 2)
2461 *value2 = (double)(double)op2->__anon1.us;
2462 else if(op2->kind == 1 && op2->type->isSigned)
2463 *value2 = (double)(double)op2->__anon1.c;
2464 else if(op2->kind == 24 || op2->kind == 1)
2465 *value2 = (double)(double)op2->__anon1.uc;
2466 else if(op2->kind == 6)
2467 *value2 = (double)op2->__anon1.f;
2468 else if(op2->kind == 7)
2469 *value2 = (double)op2->__anon1.d;
2470 else if(op2->kind == 13)
2471 *value2 = (double)(double)op2->__anon1.ui64;
2477 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2479 int value2 = op2->__anon1.i;
2482 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2485 exp->expType = op1->type;
2487 op1->type->refCount++;
2492 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2494 unsigned int value2 = op2->__anon1.ui;
2497 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2500 exp->expType = op1->type;
2502 op1->type->refCount++;
2507 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2509 long long value2 = op2->__anon1.i64;
2512 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2515 exp->expType = op1->type;
2517 op1->type->refCount++;
2522 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2524 uint64 value2 = op2->__anon1.ui64;
2527 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2530 exp->expType = op1->type;
2532 op1->type->refCount++;
2537 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2539 short value2 = op2->__anon1.s;
2542 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
2545 exp->expType = op1->type;
2547 op1->type->refCount++;
2552 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2554 unsigned short value2 = op2->__anon1.us;
2557 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
2560 exp->expType = op1->type;
2562 op1->type->refCount++;
2567 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2569 char value2 = op2->__anon1.c;
2572 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
2575 exp->expType = op1->type;
2577 op1->type->refCount++;
2582 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2584 unsigned char value2 = op2->__anon1.uc;
2587 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
2590 exp->expType = op1->type;
2592 op1->type->refCount++;
2597 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2599 float value2 = op2->__anon1.f;
2602 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2605 exp->expType = op1->type;
2607 op1->type->refCount++;
2612 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2614 double value2 = op2->__anon1.d;
2617 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2620 exp->expType = op1->type;
2622 op1->type->refCount++;
2627 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2629 int value2 = op2->__anon1.i;
2632 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2635 exp->expType = op1->type;
2637 op1->type->refCount++;
2642 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2644 unsigned int value2 = op2->__anon1.ui;
2647 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2650 exp->expType = op1->type;
2652 op1->type->refCount++;
2657 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2659 long long value2 = op2->__anon1.i64;
2662 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2665 exp->expType = op1->type;
2667 op1->type->refCount++;
2672 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2674 uint64 value2 = op2->__anon1.ui64;
2677 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2680 exp->expType = op1->type;
2682 op1->type->refCount++;
2687 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2689 short value2 = op2->__anon1.s;
2692 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
2695 exp->expType = op1->type;
2697 op1->type->refCount++;
2702 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2704 unsigned short value2 = op2->__anon1.us;
2707 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
2710 exp->expType = op1->type;
2712 op1->type->refCount++;
2717 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2719 char value2 = op2->__anon1.c;
2722 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
2725 exp->expType = op1->type;
2727 op1->type->refCount++;
2732 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2734 unsigned char value2 = op2->__anon1.uc;
2737 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
2740 exp->expType = op1->type;
2742 op1->type->refCount++;
2747 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2749 float value2 = op2->__anon1.f;
2752 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2755 exp->expType = op1->type;
2757 op1->type->refCount++;
2762 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2764 double value2 = op2->__anon1.d;
2767 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2770 exp->expType = op1->type;
2772 op1->type->refCount++;
2777 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2779 int value2 = op2->__anon1.i;
2782 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2785 exp->expType = op1->type;
2787 op1->type->refCount++;
2792 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2794 unsigned int value2 = op2->__anon1.ui;
2797 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2800 exp->expType = op1->type;
2802 op1->type->refCount++;
2807 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2809 long long value2 = op2->__anon1.i64;
2812 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2815 exp->expType = op1->type;
2817 op1->type->refCount++;
2822 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2824 uint64 value2 = op2->__anon1.ui64;
2827 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2830 exp->expType = op1->type;
2832 op1->type->refCount++;
2837 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2839 short value2 = op2->__anon1.s;
2842 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
2845 exp->expType = op1->type;
2847 op1->type->refCount++;
2852 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2854 unsigned short value2 = op2->__anon1.us;
2857 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
2860 exp->expType = op1->type;
2862 op1->type->refCount++;
2867 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2869 char value2 = op2->__anon1.c;
2872 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
2875 exp->expType = op1->type;
2877 op1->type->refCount++;
2882 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2884 unsigned char value2 = op2->__anon1.uc;
2887 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
2890 exp->expType = op1->type;
2892 op1->type->refCount++;
2897 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2899 float value2 = op2->__anon1.f;
2902 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2905 exp->expType = op1->type;
2907 op1->type->refCount++;
2912 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2914 double value2 = op2->__anon1.d;
2917 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2920 exp->expType = op1->type;
2922 op1->type->refCount++;
2927 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2929 int value2 = op2->__anon1.i;
2932 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
2935 exp->expType = op1->type;
2937 op1->type->refCount++;
2942 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2944 unsigned int value2 = op2->__anon1.ui;
2947 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
2950 exp->expType = op1->type;
2952 op1->type->refCount++;
2957 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2959 long long value2 = op2->__anon1.i64;
2962 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
2965 exp->expType = op1->type;
2967 op1->type->refCount++;
2972 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2974 uint64 value2 = op2->__anon1.ui64;
2977 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
2980 exp->expType = op1->type;
2982 op1->type->refCount++;
2987 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2989 short value2 = op2->__anon1.s;
2992 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : 0);
2995 exp->expType = op1->type;
2997 op1->type->refCount++;
3002 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3004 unsigned short value2 = op2->__anon1.us;
3007 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : 0);
3010 exp->expType = op1->type;
3012 op1->type->refCount++;
3017 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3019 char value2 = op2->__anon1.c;
3022 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : 0);
3025 exp->expType = op1->type;
3027 op1->type->refCount++;
3032 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3034 unsigned char value2 = op2->__anon1.uc;
3037 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : 0);
3040 exp->expType = op1->type;
3042 op1->type->refCount++;
3047 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3049 float value2 = op2->__anon1.f;
3052 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
3055 exp->expType = op1->type;
3057 op1->type->refCount++;
3062 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3064 double value2 = op2->__anon1.d;
3067 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
3070 exp->expType = op1->type;
3072 op1->type->refCount++;
3077 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3079 int value2 = op2->__anon1.i;
3082 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
3085 exp->expType = op1->type;
3087 op1->type->refCount++;
3092 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3094 unsigned int value2 = op2->__anon1.ui;
3097 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
3100 exp->expType = op1->type;
3102 op1->type->refCount++;
3107 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3109 long long value2 = op2->__anon1.i64;
3112 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
3115 exp->expType = op1->type;
3117 op1->type->refCount++;
3122 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3124 uint64 value2 = op2->__anon1.ui64;
3127 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
3130 exp->expType = op1->type;
3132 op1->type->refCount++;
3137 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3139 short value2 = op2->__anon1.s;
3142 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : 0);
3145 exp->expType = op1->type;
3147 op1->type->refCount++;
3152 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3154 unsigned short value2 = op2->__anon1.us;
3157 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : 0);
3160 exp->expType = op1->type;
3162 op1->type->refCount++;
3167 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3169 char value2 = op2->__anon1.c;
3172 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : 0);
3175 exp->expType = op1->type;
3177 op1->type->refCount++;
3182 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3184 unsigned char value2 = op2->__anon1.uc;
3187 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : 0);
3190 exp->expType = op1->type;
3192 op1->type->refCount++;
3197 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3200 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3203 exp->expType = op1->type;
3205 op1->type->refCount++;
3210 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3213 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3216 exp->expType = op1->type;
3218 op1->type->refCount++;
3223 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3226 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3229 exp->expType = op1->type;
3231 op1->type->refCount++;
3236 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3239 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3242 exp->expType = op1->type;
3244 op1->type->refCount++;
3249 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3252 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3255 exp->expType = op1->type;
3257 op1->type->refCount++;
3262 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3265 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3268 exp->expType = op1->type;
3270 op1->type->refCount++;
3275 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3278 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3281 exp->expType = op1->type;
3283 op1->type->refCount++;
3288 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3291 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3294 exp->expType = op1->type;
3296 op1->type->refCount++;
3301 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3304 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3307 exp->expType = op1->type;
3309 op1->type->refCount++;
3314 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3317 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3320 exp->expType = op1->type;
3322 op1->type->refCount++;
3327 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3330 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3333 exp->expType = op1->type;
3335 op1->type->refCount++;
3340 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3343 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3346 exp->expType = op1->type;
3348 op1->type->refCount++;
3353 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3356 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3359 exp->expType = op1->type;
3361 op1->type->refCount++;
3366 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3369 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3372 exp->expType = op1->type;
3374 op1->type->refCount++;
3379 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3382 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3385 exp->expType = op1->type;
3387 op1->type->refCount++;
3392 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3395 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3398 exp->expType = op1->type;
3400 op1->type->refCount++;
3405 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3408 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3411 exp->expType = op1->type;
3413 op1->type->refCount++;
3418 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3421 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3424 exp->expType = op1->type;
3426 op1->type->refCount++;
3431 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3434 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3437 exp->expType = op1->type;
3439 op1->type->refCount++;
3444 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3447 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3450 exp->expType = op1->type;
3452 op1->type->refCount++;
3457 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3460 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3463 exp->expType = op1->type;
3465 op1->type->refCount++;
3470 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3473 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3476 exp->expType = op1->type;
3478 op1->type->refCount++;
3483 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3486 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3489 exp->expType = op1->type;
3491 op1->type->refCount++;
3496 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3499 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3502 exp->expType = op1->type;
3504 op1->type->refCount++;
3509 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3512 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3515 exp->expType = op1->type;
3517 op1->type->refCount++;
3522 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3525 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3528 exp->expType = op1->type;
3530 op1->type->refCount++;
3535 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3538 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3541 exp->expType = op1->type;
3543 op1->type->refCount++;
3548 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3551 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3554 exp->expType = op1->type;
3556 op1->type->refCount++;
3561 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3564 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3567 exp->expType = op1->type;
3569 op1->type->refCount++;
3574 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3577 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3580 exp->expType = op1->type;
3582 op1->type->refCount++;
3587 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3589 int value2 = op2->__anon1.i;
3592 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3595 exp->expType = op1->type;
3597 op1->type->refCount++;
3602 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3604 unsigned int value2 = op2->__anon1.ui;
3607 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3610 exp->expType = op1->type;
3612 op1->type->refCount++;
3617 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3619 long long value2 = op2->__anon1.i64;
3622 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3625 exp->expType = op1->type;
3627 op1->type->refCount++;
3632 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3634 uint64 value2 = op2->__anon1.ui64;
3637 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3640 exp->expType = op1->type;
3642 op1->type->refCount++;
3647 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3649 short value2 = op2->__anon1.s;
3652 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3655 exp->expType = op1->type;
3657 op1->type->refCount++;
3662 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3664 unsigned short value2 = op2->__anon1.us;
3667 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3670 exp->expType = op1->type;
3672 op1->type->refCount++;
3677 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3679 char value2 = op2->__anon1.c;
3682 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3685 exp->expType = op1->type;
3687 op1->type->refCount++;
3692 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3694 unsigned char value2 = op2->__anon1.uc;
3697 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3700 exp->expType = op1->type;
3702 op1->type->refCount++;
3707 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3709 float value2 = op2->__anon1.f;
3712 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3715 exp->expType = op1->type;
3717 op1->type->refCount++;
3722 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3724 double value2 = op2->__anon1.d;
3727 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3730 exp->expType = op1->type;
3732 op1->type->refCount++;
3737 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3739 int value2 = op2->__anon1.i;
3742 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3745 exp->expType = op1->type;
3747 op1->type->refCount++;
3752 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3754 unsigned int value2 = op2->__anon1.ui;
3757 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3760 exp->expType = op1->type;
3762 op1->type->refCount++;
3767 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3769 long long value2 = op2->__anon1.i64;
3772 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3775 exp->expType = op1->type;
3777 op1->type->refCount++;
3782 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3784 uint64 value2 = op2->__anon1.ui64;
3787 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3790 exp->expType = op1->type;
3792 op1->type->refCount++;
3797 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3799 short value2 = op2->__anon1.s;
3802 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3805 exp->expType = op1->type;
3807 op1->type->refCount++;
3812 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3814 unsigned short value2 = op2->__anon1.us;
3817 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3820 exp->expType = op1->type;
3822 op1->type->refCount++;
3827 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3829 char value2 = op2->__anon1.c;
3832 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3835 exp->expType = op1->type;
3837 op1->type->refCount++;
3842 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3844 unsigned char value2 = op2->__anon1.uc;
3847 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3850 exp->expType = op1->type;
3852 op1->type->refCount++;
3857 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3859 float value2 = op2->__anon1.f;
3862 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3865 exp->expType = op1->type;
3867 op1->type->refCount++;
3872 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3874 double value2 = op2->__anon1.d;
3877 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3880 exp->expType = op1->type;
3882 op1->type->refCount++;
3887 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3889 int value2 = op2->__anon1.i;
3892 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3895 exp->expType = op1->type;
3897 op1->type->refCount++;
3902 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3904 unsigned int value2 = op2->__anon1.ui;
3907 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3910 exp->expType = op1->type;
3912 op1->type->refCount++;
3917 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3919 long long value2 = op2->__anon1.i64;
3922 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3925 exp->expType = op1->type;
3927 op1->type->refCount++;
3932 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3934 uint64 value2 = op2->__anon1.ui64;
3937 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3940 exp->expType = op1->type;
3942 op1->type->refCount++;
3947 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3949 short value2 = op2->__anon1.s;
3952 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3955 exp->expType = op1->type;
3957 op1->type->refCount++;
3962 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3964 unsigned short value2 = op2->__anon1.us;
3967 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3970 exp->expType = op1->type;
3972 op1->type->refCount++;
3977 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3979 char value2 = op2->__anon1.c;
3982 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3985 exp->expType = op1->type;
3987 op1->type->refCount++;
3992 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3994 unsigned char value2 = op2->__anon1.uc;
3997 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
4000 exp->expType = op1->type;
4002 op1->type->refCount++;
4007 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4009 float value2 = op2->__anon1.f;
4012 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4015 exp->expType = op1->type;
4017 op1->type->refCount++;
4022 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4024 double value2 = op2->__anon1.d;
4027 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4030 exp->expType = op1->type;
4032 op1->type->refCount++;
4037 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4039 int value2 = op2->__anon1.i;
4042 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4045 exp->expType = op1->type;
4047 op1->type->refCount++;
4052 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4054 unsigned int value2 = op2->__anon1.ui;
4057 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4060 exp->expType = op1->type;
4062 op1->type->refCount++;
4067 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4069 long long value2 = op2->__anon1.i64;
4072 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4075 exp->expType = op1->type;
4077 op1->type->refCount++;
4082 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4084 uint64 value2 = op2->__anon1.ui64;
4087 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4090 exp->expType = op1->type;
4092 op1->type->refCount++;
4097 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4099 short value2 = op2->__anon1.s;
4102 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4105 exp->expType = op1->type;
4107 op1->type->refCount++;
4112 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4114 unsigned short value2 = op2->__anon1.us;
4117 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4120 exp->expType = op1->type;
4122 op1->type->refCount++;
4127 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4129 char value2 = op2->__anon1.c;
4132 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4135 exp->expType = op1->type;
4137 op1->type->refCount++;
4142 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4144 unsigned char value2 = op2->__anon1.uc;
4147 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4150 exp->expType = op1->type;
4152 op1->type->refCount++;
4157 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4159 float value2 = op2->__anon1.f;
4162 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4165 exp->expType = op1->type;
4167 op1->type->refCount++;
4172 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4174 double value2 = op2->__anon1.d;
4177 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4180 exp->expType = op1->type;
4182 op1->type->refCount++;
4187 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4189 int value2 = op2->__anon1.i;
4192 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
4195 exp->expType = op1->type;
4197 op1->type->refCount++;
4202 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4204 unsigned int value2 = op2->__anon1.ui;
4207 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
4210 exp->expType = op1->type;
4212 op1->type->refCount++;
4217 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4219 long long value2 = op2->__anon1.i64;
4222 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
4225 exp->expType = op1->type;
4227 op1->type->refCount++;
4232 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4234 uint64 value2 = op2->__anon1.ui64;
4237 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
4240 exp->expType = op1->type;
4242 op1->type->refCount++;
4247 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4249 short value2 = op2->__anon1.s;
4252 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s /= value2)) : 0);
4255 exp->expType = op1->type;
4257 op1->type->refCount++;
4262 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4264 unsigned short value2 = op2->__anon1.us;
4267 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us /= value2)) : 0);
4270 exp->expType = op1->type;
4272 op1->type->refCount++;
4277 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4279 char value2 = op2->__anon1.c;
4282 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c /= value2)) : 0);
4285 exp->expType = op1->type;
4287 op1->type->refCount++;
4292 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4294 unsigned char value2 = op2->__anon1.uc;
4297 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc /= value2)) : 0);
4300 exp->expType = op1->type;
4302 op1->type->refCount++;
4307 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4309 float value2 = op2->__anon1.f;
4312 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
4315 exp->expType = op1->type;
4317 op1->type->refCount++;
4322 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4324 double value2 = op2->__anon1.d;
4327 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
4330 exp->expType = op1->type;
4332 op1->type->refCount++;
4337 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4339 int value2 = op2->__anon1.i;
4342 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
4345 exp->expType = op1->type;
4347 op1->type->refCount++;
4352 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4354 unsigned int value2 = op2->__anon1.ui;
4357 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
4360 exp->expType = op1->type;
4362 op1->type->refCount++;
4367 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4369 long long value2 = op2->__anon1.i64;
4372 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
4375 exp->expType = op1->type;
4377 op1->type->refCount++;
4382 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4384 uint64 value2 = op2->__anon1.ui64;
4387 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
4390 exp->expType = op1->type;
4392 op1->type->refCount++;
4397 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4399 short value2 = op2->__anon1.s;
4402 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s %= value2)) : 0);
4405 exp->expType = op1->type;
4407 op1->type->refCount++;
4412 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4414 unsigned short value2 = op2->__anon1.us;
4417 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us %= value2)) : 0);
4420 exp->expType = op1->type;
4422 op1->type->refCount++;
4427 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4429 char value2 = op2->__anon1.c;
4432 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c %= value2)) : 0);
4435 exp->expType = op1->type;
4437 op1->type->refCount++;
4442 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4444 unsigned char value2 = op2->__anon1.uc;
4447 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc %= value2)) : 0);
4450 exp->expType = op1->type;
4452 op1->type->refCount++;
4457 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4459 int value2 = op2->__anon1.i;
4462 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4465 exp->expType = op1->type;
4467 op1->type->refCount++;
4472 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4474 unsigned int value2 = op2->__anon1.ui;
4477 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4480 exp->expType = op1->type;
4482 op1->type->refCount++;
4487 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4489 long long value2 = op2->__anon1.i64;
4492 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4495 exp->expType = op1->type;
4497 op1->type->refCount++;
4502 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4504 uint64 value2 = op2->__anon1.ui64;
4507 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4510 exp->expType = op1->type;
4512 op1->type->refCount++;
4517 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4519 short value2 = op2->__anon1.s;
4522 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
4525 exp->expType = op1->type;
4527 op1->type->refCount++;
4532 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4534 unsigned short value2 = op2->__anon1.us;
4537 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
4540 exp->expType = op1->type;
4542 op1->type->refCount++;
4547 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4549 char value2 = op2->__anon1.c;
4552 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
4555 exp->expType = op1->type;
4557 op1->type->refCount++;
4562 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4564 unsigned char value2 = op2->__anon1.uc;
4567 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
4570 exp->expType = op1->type;
4572 op1->type->refCount++;
4577 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4579 int value2 = op2->__anon1.i;
4582 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4585 exp->expType = op1->type;
4587 op1->type->refCount++;
4592 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4594 unsigned int value2 = op2->__anon1.ui;
4597 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4600 exp->expType = op1->type;
4602 op1->type->refCount++;
4607 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4609 long long value2 = op2->__anon1.i64;
4612 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4615 exp->expType = op1->type;
4617 op1->type->refCount++;
4622 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4624 uint64 value2 = op2->__anon1.ui64;
4627 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4630 exp->expType = op1->type;
4632 op1->type->refCount++;
4637 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4639 short value2 = op2->__anon1.s;
4642 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
4645 exp->expType = op1->type;
4647 op1->type->refCount++;
4652 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4654 unsigned short value2 = op2->__anon1.us;
4657 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
4660 exp->expType = op1->type;
4662 op1->type->refCount++;
4667 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4669 char value2 = op2->__anon1.c;
4672 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
4675 exp->expType = op1->type;
4677 op1->type->refCount++;
4682 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4684 unsigned char value2 = op2->__anon1.uc;
4687 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
4690 exp->expType = op1->type;
4692 op1->type->refCount++;
4697 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4699 int value2 = op2->__anon1.i;
4702 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4705 exp->expType = op1->type;
4707 op1->type->refCount++;
4712 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4714 unsigned int value2 = op2->__anon1.ui;
4717 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4720 exp->expType = op1->type;
4722 op1->type->refCount++;
4727 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4729 long long value2 = op2->__anon1.i64;
4732 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4735 exp->expType = op1->type;
4737 op1->type->refCount++;
4742 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4744 uint64 value2 = op2->__anon1.ui64;
4747 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4750 exp->expType = op1->type;
4752 op1->type->refCount++;
4757 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4759 short value2 = op2->__anon1.s;
4762 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
4765 exp->expType = op1->type;
4767 op1->type->refCount++;
4772 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4774 unsigned short value2 = op2->__anon1.us;
4777 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
4780 exp->expType = op1->type;
4782 op1->type->refCount++;
4787 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4789 char value2 = op2->__anon1.c;
4792 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
4795 exp->expType = op1->type;
4797 op1->type->refCount++;
4802 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4804 unsigned char value2 = op2->__anon1.uc;
4807 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
4810 exp->expType = op1->type;
4812 op1->type->refCount++;
4817 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4819 int value2 = op2->__anon1.i;
4822 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4825 exp->expType = op1->type;
4827 op1->type->refCount++;
4832 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4834 unsigned int value2 = op2->__anon1.ui;
4837 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4840 exp->expType = op1->type;
4842 op1->type->refCount++;
4847 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4849 long long value2 = op2->__anon1.i64;
4852 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4855 exp->expType = op1->type;
4857 op1->type->refCount++;
4862 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4864 uint64 value2 = op2->__anon1.ui64;
4867 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4870 exp->expType = op1->type;
4872 op1->type->refCount++;
4877 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4879 short value2 = op2->__anon1.s;
4882 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
4885 exp->expType = op1->type;
4887 op1->type->refCount++;
4892 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4894 unsigned short value2 = op2->__anon1.us;
4897 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
4900 exp->expType = op1->type;
4902 op1->type->refCount++;
4907 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4909 char value2 = op2->__anon1.c;
4912 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
4915 exp->expType = op1->type;
4917 op1->type->refCount++;
4922 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4924 unsigned char value2 = op2->__anon1.uc;
4927 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
4930 exp->expType = op1->type;
4932 op1->type->refCount++;
4937 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4939 int value2 = op2->__anon1.i;
4942 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4945 exp->expType = op1->type;
4947 op1->type->refCount++;
4952 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4954 unsigned int value2 = op2->__anon1.ui;
4957 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4960 exp->expType = op1->type;
4962 op1->type->refCount++;
4967 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4969 long long value2 = op2->__anon1.i64;
4972 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4975 exp->expType = op1->type;
4977 op1->type->refCount++;
4982 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4984 uint64 value2 = op2->__anon1.ui64;
4987 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4990 exp->expType = op1->type;
4992 op1->type->refCount++;
4997 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4999 short value2 = op2->__anon1.s;
5002 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
5005 exp->expType = op1->type;
5007 op1->type->refCount++;
5012 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5014 unsigned short value2 = op2->__anon1.us;
5017 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
5020 exp->expType = op1->type;
5022 op1->type->refCount++;
5027 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5029 char value2 = op2->__anon1.c;
5032 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
5035 exp->expType = op1->type;
5037 op1->type->refCount++;
5042 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5044 unsigned char value2 = op2->__anon1.uc;
5047 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
5050 exp->expType = op1->type;
5052 op1->type->refCount++;
5057 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5060 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5063 exp->expType = op1->type;
5065 op1->type->refCount++;
5070 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5073 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5076 exp->expType = op1->type;
5078 op1->type->refCount++;
5083 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5086 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5089 exp->expType = op1->type;
5091 op1->type->refCount++;
5096 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5099 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5102 exp->expType = op1->type;
5104 op1->type->refCount++;
5109 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5112 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5115 exp->expType = op1->type;
5117 op1->type->refCount++;
5122 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5125 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5128 exp->expType = op1->type;
5130 op1->type->refCount++;
5135 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5138 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5141 exp->expType = op1->type;
5143 op1->type->refCount++;
5148 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5151 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5154 exp->expType = op1->type;
5156 op1->type->refCount++;
5161 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5163 int value2 = op2->__anon1.i;
5166 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5169 exp->expType = op1->type;
5171 op1->type->refCount++;
5176 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5178 unsigned int value2 = op2->__anon1.ui;
5181 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5184 exp->expType = op1->type;
5186 op1->type->refCount++;
5191 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5193 long long value2 = op2->__anon1.i64;
5196 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5199 exp->expType = op1->type;
5201 op1->type->refCount++;
5206 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5208 uint64 value2 = op2->__anon1.ui64;
5211 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5214 exp->expType = op1->type;
5216 op1->type->refCount++;
5221 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5223 short value2 = op2->__anon1.s;
5226 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5229 exp->expType = op1->type;
5231 op1->type->refCount++;
5236 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5238 unsigned short value2 = op2->__anon1.us;
5241 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5244 exp->expType = op1->type;
5246 op1->type->refCount++;
5251 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5253 char value2 = op2->__anon1.c;
5256 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5259 exp->expType = op1->type;
5261 op1->type->refCount++;
5266 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5268 unsigned char value2 = op2->__anon1.uc;
5271 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5274 exp->expType = op1->type;
5276 op1->type->refCount++;
5281 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5283 int value2 = op2->__anon1.i;
5286 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5289 exp->expType = op1->type;
5291 op1->type->refCount++;
5296 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5298 unsigned int value2 = op2->__anon1.ui;
5301 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5304 exp->expType = op1->type;
5306 op1->type->refCount++;
5311 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5313 long long value2 = op2->__anon1.i64;
5316 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5319 exp->expType = op1->type;
5321 op1->type->refCount++;
5326 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5328 uint64 value2 = op2->__anon1.ui64;
5331 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5334 exp->expType = op1->type;
5336 op1->type->refCount++;
5341 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5343 short value2 = op2->__anon1.s;
5346 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5349 exp->expType = op1->type;
5351 op1->type->refCount++;
5356 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5358 unsigned short value2 = op2->__anon1.us;
5361 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5364 exp->expType = op1->type;
5366 op1->type->refCount++;
5371 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5373 char value2 = op2->__anon1.c;
5376 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5379 exp->expType = op1->type;
5381 op1->type->refCount++;
5386 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5388 unsigned char value2 = op2->__anon1.uc;
5391 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5394 exp->expType = op1->type;
5396 op1->type->refCount++;
5401 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5403 int value2 = op2->__anon1.i;
5406 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5409 exp->expType = op1->type;
5411 op1->type->refCount++;
5416 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5418 unsigned int value2 = op2->__anon1.ui;
5421 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5424 exp->expType = op1->type;
5426 op1->type->refCount++;
5431 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5433 long long value2 = op2->__anon1.i64;
5436 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5439 exp->expType = op1->type;
5441 op1->type->refCount++;
5446 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5448 uint64 value2 = op2->__anon1.ui64;
5451 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5454 exp->expType = op1->type;
5456 op1->type->refCount++;
5461 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5463 short value2 = op2->__anon1.s;
5466 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5469 exp->expType = op1->type;
5471 op1->type->refCount++;
5476 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5478 unsigned short value2 = op2->__anon1.us;
5481 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5484 exp->expType = op1->type;
5486 op1->type->refCount++;
5491 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5493 char value2 = op2->__anon1.c;
5496 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5499 exp->expType = op1->type;
5501 op1->type->refCount++;
5506 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5508 unsigned char value2 = op2->__anon1.uc;
5511 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5514 exp->expType = op1->type;
5516 op1->type->refCount++;
5521 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5523 int value2 = op2->__anon1.i;
5526 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5529 exp->expType = op1->type;
5531 op1->type->refCount++;
5536 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5538 unsigned int value2 = op2->__anon1.ui;
5541 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5544 exp->expType = op1->type;
5546 op1->type->refCount++;
5551 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5553 long long value2 = op2->__anon1.i64;
5556 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5559 exp->expType = op1->type;
5561 op1->type->refCount++;
5566 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5568 uint64 value2 = op2->__anon1.ui64;
5571 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5574 exp->expType = op1->type;
5576 op1->type->refCount++;
5581 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5583 short value2 = op2->__anon1.s;
5586 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5589 exp->expType = op1->type;
5591 op1->type->refCount++;
5596 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5598 unsigned short value2 = op2->__anon1.us;
5601 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5604 exp->expType = op1->type;
5606 op1->type->refCount++;
5611 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5613 char value2 = op2->__anon1.c;
5616 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5619 exp->expType = op1->type;
5621 op1->type->refCount++;
5626 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5628 unsigned char value2 = op2->__anon1.uc;
5631 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5634 exp->expType = op1->type;
5636 op1->type->refCount++;
5641 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5643 int value2 = op2->__anon1.i;
5646 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5649 exp->expType = op1->type;
5651 op1->type->refCount++;
5656 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5658 unsigned int value2 = op2->__anon1.ui;
5661 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5664 exp->expType = op1->type;
5666 op1->type->refCount++;
5671 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5673 long long value2 = op2->__anon1.i64;
5676 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5679 exp->expType = op1->type;
5681 op1->type->refCount++;
5686 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5688 uint64 value2 = op2->__anon1.ui64;
5691 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5694 exp->expType = op1->type;
5696 op1->type->refCount++;
5701 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5703 short value2 = op2->__anon1.s;
5706 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5709 exp->expType = op1->type;
5711 op1->type->refCount++;
5716 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5718 unsigned short value2 = op2->__anon1.us;
5721 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5724 exp->expType = op1->type;
5726 op1->type->refCount++;
5731 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5733 char value2 = op2->__anon1.c;
5736 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5739 exp->expType = op1->type;
5741 op1->type->refCount++;
5746 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5748 unsigned char value2 = op2->__anon1.uc;
5751 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5754 exp->expType = op1->type;
5756 op1->type->refCount++;
5761 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5764 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5767 exp->expType = op1->type;
5769 op1->type->refCount++;
5774 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5777 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5780 exp->expType = op1->type;
5782 op1->type->refCount++;
5787 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5790 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5793 exp->expType = op1->type;
5795 op1->type->refCount++;
5800 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5803 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5806 exp->expType = op1->type;
5808 op1->type->refCount++;
5813 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5816 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5819 exp->expType = op1->type;
5821 op1->type->refCount++;
5826 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5829 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5832 exp->expType = op1->type;
5834 op1->type->refCount++;
5839 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5842 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5845 exp->expType = op1->type;
5847 op1->type->refCount++;
5852 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5855 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5858 exp->expType = op1->type;
5860 op1->type->refCount++;
5865 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5867 int value2 = op2->__anon1.i;
5870 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5873 exp->expType = op1->type;
5875 op1->type->refCount++;
5880 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5882 unsigned int value2 = op2->__anon1.ui;
5885 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5888 exp->expType = op1->type;
5890 op1->type->refCount++;
5895 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5897 long long value2 = op2->__anon1.i64;
5900 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5903 exp->expType = op1->type;
5905 op1->type->refCount++;
5910 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5912 uint64 value2 = op2->__anon1.ui64;
5915 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5918 exp->expType = op1->type;
5920 op1->type->refCount++;
5925 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5927 short value2 = op2->__anon1.s;
5930 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5933 exp->expType = op1->type;
5935 op1->type->refCount++;
5940 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5942 unsigned short value2 = op2->__anon1.us;
5945 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5948 exp->expType = op1->type;
5950 op1->type->refCount++;
5955 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5957 char value2 = op2->__anon1.c;
5960 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5963 exp->expType = op1->type;
5965 op1->type->refCount++;
5970 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5972 unsigned char value2 = op2->__anon1.uc;
5975 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5978 exp->expType = op1->type;
5980 op1->type->refCount++;
5985 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5987 float value2 = op2->__anon1.f;
5990 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5993 exp->expType = op1->type;
5995 op1->type->refCount++;
6000 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6002 double value2 = op2->__anon1.d;
6005 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
6008 exp->expType = op1->type;
6010 op1->type->refCount++;
6015 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6017 int value2 = op2->__anon1.i;
6020 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6023 exp->expType = op1->type;
6025 op1->type->refCount++;
6030 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6032 unsigned int value2 = op2->__anon1.ui;
6035 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6038 exp->expType = op1->type;
6040 op1->type->refCount++;
6045 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6047 long long value2 = op2->__anon1.i64;
6050 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6053 exp->expType = op1->type;
6055 op1->type->refCount++;
6060 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6062 uint64 value2 = op2->__anon1.ui64;
6065 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6068 exp->expType = op1->type;
6070 op1->type->refCount++;
6075 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6077 short value2 = op2->__anon1.s;
6080 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6083 exp->expType = op1->type;
6085 op1->type->refCount++;
6090 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6092 unsigned short value2 = op2->__anon1.us;
6095 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6098 exp->expType = op1->type;
6100 op1->type->refCount++;
6105 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6107 char value2 = op2->__anon1.c;
6110 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6113 exp->expType = op1->type;
6115 op1->type->refCount++;
6120 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6122 unsigned char value2 = op2->__anon1.uc;
6125 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6128 exp->expType = op1->type;
6130 op1->type->refCount++;
6135 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6137 float value2 = op2->__anon1.f;
6140 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6143 exp->expType = op1->type;
6145 op1->type->refCount++;
6150 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6152 double value2 = op2->__anon1.d;
6155 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6158 exp->expType = op1->type;
6160 op1->type->refCount++;
6165 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6167 int value2 = op2->__anon1.i;
6170 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6173 exp->expType = op1->type;
6175 op1->type->refCount++;
6180 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6182 unsigned int value2 = op2->__anon1.ui;
6185 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6188 exp->expType = op1->type;
6190 op1->type->refCount++;
6195 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6197 long long value2 = op2->__anon1.i64;
6200 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6203 exp->expType = op1->type;
6205 op1->type->refCount++;
6210 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6212 uint64 value2 = op2->__anon1.ui64;
6215 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6218 exp->expType = op1->type;
6220 op1->type->refCount++;
6225 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6227 short value2 = op2->__anon1.s;
6230 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6233 exp->expType = op1->type;
6235 op1->type->refCount++;
6240 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6242 unsigned short value2 = op2->__anon1.us;
6245 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6248 exp->expType = op1->type;
6250 op1->type->refCount++;
6255 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6257 char value2 = op2->__anon1.c;
6260 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6263 exp->expType = op1->type;
6265 op1->type->refCount++;
6270 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6272 unsigned char value2 = op2->__anon1.uc;
6275 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6278 exp->expType = op1->type;
6280 op1->type->refCount++;
6285 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6287 float value2 = op2->__anon1.f;
6290 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6293 exp->expType = op1->type;
6295 op1->type->refCount++;
6300 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6302 double value2 = op2->__anon1.d;
6305 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6308 exp->expType = op1->type;
6310 op1->type->refCount++;
6315 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6317 int value2 = op2->__anon1.i;
6320 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6323 exp->expType = op1->type;
6325 op1->type->refCount++;
6330 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6332 unsigned int value2 = op2->__anon1.ui;
6335 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6338 exp->expType = op1->type;
6340 op1->type->refCount++;
6345 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6347 long long value2 = op2->__anon1.i64;
6350 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6353 exp->expType = op1->type;
6355 op1->type->refCount++;
6360 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6362 uint64 value2 = op2->__anon1.ui64;
6365 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6368 exp->expType = op1->type;
6370 op1->type->refCount++;
6375 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6377 short value2 = op2->__anon1.s;
6380 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6383 exp->expType = op1->type;
6385 op1->type->refCount++;
6390 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6392 unsigned short value2 = op2->__anon1.us;
6395 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6398 exp->expType = op1->type;
6400 op1->type->refCount++;
6405 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6407 char value2 = op2->__anon1.c;
6410 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6413 exp->expType = op1->type;
6415 op1->type->refCount++;
6420 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6422 unsigned char value2 = op2->__anon1.uc;
6425 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6428 exp->expType = op1->type;
6430 op1->type->refCount++;
6435 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6437 float value2 = op2->__anon1.f;
6440 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6443 exp->expType = op1->type;
6445 op1->type->refCount++;
6450 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6452 double value2 = op2->__anon1.d;
6455 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6458 exp->expType = op1->type;
6460 op1->type->refCount++;
6465 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6467 int value2 = op2->__anon1.i;
6470 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6473 exp->expType = op1->type;
6475 op1->type->refCount++;
6480 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6482 unsigned int value2 = op2->__anon1.ui;
6485 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6488 exp->expType = op1->type;
6490 op1->type->refCount++;
6495 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6497 long long value2 = op2->__anon1.i64;
6500 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6503 exp->expType = op1->type;
6505 op1->type->refCount++;
6510 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6512 uint64 value2 = op2->__anon1.ui64;
6515 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6518 exp->expType = op1->type;
6520 op1->type->refCount++;
6525 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6527 short value2 = op2->__anon1.s;
6530 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6533 exp->expType = op1->type;
6535 op1->type->refCount++;
6540 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6542 unsigned short value2 = op2->__anon1.us;
6545 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6548 exp->expType = op1->type;
6550 op1->type->refCount++;
6555 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6557 char value2 = op2->__anon1.c;
6560 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6563 exp->expType = op1->type;
6565 op1->type->refCount++;
6570 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6572 unsigned char value2 = op2->__anon1.uc;
6575 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6578 exp->expType = op1->type;
6580 op1->type->refCount++;
6585 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6587 float value2 = op2->__anon1.f;
6590 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6593 exp->expType = op1->type;
6595 op1->type->refCount++;
6600 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6602 double value2 = op2->__anon1.d;
6605 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6608 exp->expType = op1->type;
6610 op1->type->refCount++;
6615 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6617 int value2 = op2->__anon1.i;
6620 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6623 exp->expType = op1->type;
6625 op1->type->refCount++;
6630 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6632 unsigned int value2 = op2->__anon1.ui;
6635 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6638 exp->expType = op1->type;
6640 op1->type->refCount++;
6645 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6647 long long value2 = op2->__anon1.i64;
6650 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6653 exp->expType = op1->type;
6655 op1->type->refCount++;
6660 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6662 uint64 value2 = op2->__anon1.ui64;
6665 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6668 exp->expType = op1->type;
6670 op1->type->refCount++;
6675 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6677 short value2 = op2->__anon1.s;
6680 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6683 exp->expType = op1->type;
6685 op1->type->refCount++;
6690 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6692 unsigned short value2 = op2->__anon1.us;
6695 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6698 exp->expType = op1->type;
6700 op1->type->refCount++;
6705 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6707 char value2 = op2->__anon1.c;
6710 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6713 exp->expType = op1->type;
6715 op1->type->refCount++;
6720 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6722 unsigned char value2 = op2->__anon1.uc;
6725 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6728 exp->expType = op1->type;
6730 op1->type->refCount++;
6735 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6737 float value2 = op2->__anon1.f;
6740 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6743 exp->expType = op1->type;
6745 op1->type->refCount++;
6750 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6752 double value2 = op2->__anon1.d;
6755 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6758 exp->expType = op1->type;
6760 op1->type->refCount++;
6765 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6767 int value2 = op2->__anon1.i;
6770 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6773 exp->expType = op1->type;
6775 op1->type->refCount++;
6780 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6782 unsigned int value2 = op2->__anon1.ui;
6785 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6788 exp->expType = op1->type;
6790 op1->type->refCount++;
6795 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6797 long long value2 = op2->__anon1.i64;
6800 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6803 exp->expType = op1->type;
6805 op1->type->refCount++;
6810 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6812 uint64 value2 = op2->__anon1.ui64;
6815 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6818 exp->expType = op1->type;
6820 op1->type->refCount++;
6825 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6827 short value2 = op2->__anon1.s;
6830 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6833 exp->expType = op1->type;
6835 op1->type->refCount++;
6840 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6842 unsigned short value2 = op2->__anon1.us;
6845 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6848 exp->expType = op1->type;
6850 op1->type->refCount++;
6855 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6857 char value2 = op2->__anon1.c;
6860 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6863 exp->expType = op1->type;
6865 op1->type->refCount++;
6870 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6872 unsigned char value2 = op2->__anon1.uc;
6875 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6878 exp->expType = op1->type;
6880 op1->type->refCount++;
6885 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6887 float value2 = op2->__anon1.f;
6890 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6893 exp->expType = op1->type;
6895 op1->type->refCount++;
6900 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6902 double value2 = op2->__anon1.d;
6905 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6908 exp->expType = op1->type;
6910 op1->type->refCount++;
6915 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6917 int value2 = op2->__anon1.i;
6920 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6923 exp->expType = op1->type;
6925 op1->type->refCount++;
6930 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6932 unsigned int value2 = op2->__anon1.ui;
6935 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6938 exp->expType = op1->type;
6940 op1->type->refCount++;
6945 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6947 long long value2 = op2->__anon1.i64;
6950 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6953 exp->expType = op1->type;
6955 op1->type->refCount++;
6960 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6962 uint64 value2 = op2->__anon1.ui64;
6965 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6968 exp->expType = op1->type;
6970 op1->type->refCount++;
6975 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6977 short value2 = op2->__anon1.s;
6980 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6983 exp->expType = op1->type;
6985 op1->type->refCount++;
6990 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6992 unsigned short value2 = op2->__anon1.us;
6995 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6998 exp->expType = op1->type;
7000 op1->type->refCount++;
7005 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7007 char value2 = op2->__anon1.c;
7010 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
7013 exp->expType = op1->type;
7015 op1->type->refCount++;
7020 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7022 unsigned char value2 = op2->__anon1.uc;
7025 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7028 exp->expType = op1->type;
7030 op1->type->refCount++;
7035 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7037 float value2 = op2->__anon1.f;
7040 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7043 exp->expType = op1->type;
7045 op1->type->refCount++;
7050 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7052 double value2 = op2->__anon1.d;
7055 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7058 exp->expType = op1->type;
7060 op1->type->refCount++;
7065 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7068 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7071 exp->expType = op1->type;
7073 op1->type->refCount++;
7078 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7081 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7084 exp->expType = op1->type;
7086 op1->type->refCount++;
7091 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7094 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7097 exp->expType = op1->type;
7099 op1->type->refCount++;
7104 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7107 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7110 exp->expType = op1->type;
7112 op1->type->refCount++;
7117 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7120 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7123 exp->expType = op1->type;
7125 op1->type->refCount++;
7130 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7133 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7136 exp->expType = op1->type;
7138 op1->type->refCount++;
7143 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7146 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7149 exp->expType = op1->type;
7151 op1->type->refCount++;
7156 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7159 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7162 exp->expType = op1->type;
7164 op1->type->refCount++;
7169 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7171 if(type->name && type->name[0])
7174 strcat(string, type->name);
7177 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7183 strcat(string, name);
7188 static void PrintAttribs(struct Type * type, char * string)
7193 strcat(string, "dllexport ");
7194 if(type->attrStdcall)
7195 strcat(string, "stdcall ");
7199 static struct Type * FindMember(struct Type * type, char * string)
7201 struct Type * memberType;
7203 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7205 if(!memberType->name)
7207 struct Type * subType = FindMember(memberType, string);
7212 else if(!strcmp(memberType->name, string))
7215 return (((void *)0));
7218 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7220 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7222 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7224 unsigned int result = 0;
7229 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7230 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7234 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7235 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7238 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)
7239 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7242 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)
7243 result = GetOpFloat(op, &op->__anon1.f);
7246 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)
7247 result = GetOpDouble(op, &op->__anon1.d);
7250 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)
7251 result = GetOpUInt64(op, &op->__anon1.ui64);
7254 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)
7255 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7258 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7259 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7262 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7263 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7269 struct OpTable floatOps =
7271 (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)
7274 struct OpTable doubleOps =
7276 (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)
7279 struct OpTable intOps =
7281 (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)
7284 struct OpTable uintOps =
7286 (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)
7289 struct OpTable int64Ops =
7291 (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)
7294 struct OpTable uint64Ops =
7296 (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)
7299 struct OpTable shortOps =
7301 (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)
7304 struct OpTable ushortOps =
7306 (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)
7309 struct OpTable charOps =
7311 (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)
7314 struct OpTable ucharOps =
7316 (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)
7319 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7321 struct Type * memberType;
7323 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7325 if(!memberType->name)
7327 struct Type * subType = FindMember(memberType, string);
7331 *offset += memberType->offset;
7335 else if(!strcmp(memberType->name, string))
7337 *offset += memberType->offset;
7341 return (((void *)0));
7344 struct __ecereNameSpace__ecere__com__Module;
7346 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);
7348 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7350 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);
7352 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);
7354 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7356 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7361 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7362 struct __ecereNameSpace__ecere__sys__BTNode * left;
7363 struct __ecereNameSpace__ecere__sys__BTNode * right;
7365 struct __ecereNameSpace__ecere__com__Instance * module;
7366 char * dataTypeString;
7367 struct Type * dataType;
7372 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);
7374 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7376 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);
7378 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7380 struct __ecereNameSpace__ecere__com__DefinedExpression;
7382 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7384 struct __ecereNameSpace__ecere__com__DefinedExpression
7386 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7387 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7390 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7393 struct __ecereNameSpace__ecere__sys__BinaryTree;
7395 struct __ecereNameSpace__ecere__sys__BinaryTree
7397 struct __ecereNameSpace__ecere__sys__BTNode * root;
7399 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7400 void (* FreeKey)(void * key);
7403 struct __ecereNameSpace__ecere__com__Class
7405 struct __ecereNameSpace__ecere__com__Class * prev;
7406 struct __ecereNameSpace__ecere__com__Class * next;
7412 unsigned int (* Constructor)(void * );
7413 void (* Destructor)(void * );
7416 struct __ecereNameSpace__ecere__com__Class * base;
7417 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7418 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7419 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7420 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7421 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7422 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7426 struct __ecereNameSpace__ecere__com__Instance * module;
7427 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7428 const char * dataTypeString;
7429 struct Type * dataType;
7431 int defaultAlignment;
7432 void (* Initialize)();
7434 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7435 const char * designerClass;
7436 unsigned int noExpansion;
7437 const char * defaultProperty;
7438 unsigned int comRedefinition;
7441 unsigned int internalDecl;
7443 unsigned int computeSize;
7444 short structAlignment;
7445 short pointerAlignment;
7446 int destructionWatchOffset;
7448 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7449 int inheritanceAccess;
7450 const char * fullName;
7452 struct __ecereNameSpace__ecere__sys__OldList conversions;
7453 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7454 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7455 struct __ecereNameSpace__ecere__com__Class * templateClass;
7456 struct __ecereNameSpace__ecere__sys__OldList templatized;
7458 unsigned int isInstanceClass;
7459 unsigned int byValueSystemClass;
7462 struct __ecereNameSpace__ecere__com__NameSpace
7465 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7466 struct __ecereNameSpace__ecere__com__NameSpace * left;
7467 struct __ecereNameSpace__ecere__com__NameSpace * right;
7469 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7470 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7471 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7472 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7473 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7476 struct __ecereNameSpace__ecere__com__DataMember
7478 struct __ecereNameSpace__ecere__com__DataMember * prev;
7479 struct __ecereNameSpace__ecere__com__DataMember * next;
7481 unsigned int isProperty;
7484 struct __ecereNameSpace__ecere__com__Class * _class;
7485 const char * dataTypeString;
7486 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7487 struct Type * dataType;
7491 struct __ecereNameSpace__ecere__sys__OldList members;
7492 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7494 short structAlignment;
7495 short pointerAlignment;
7498 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7500 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7502 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7504 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7506 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7508 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7510 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7514 if(type->kind == 11)
7516 struct Type * param;
7518 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7519 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7520 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7522 else if(type->kind == 13)
7523 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7524 else if(type->kind == 8)
7526 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
7528 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7530 else if(type->kind == 9 || type->kind == 10)
7532 struct Type * member;
7534 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7535 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7537 else if(type->kind == 12)
7538 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7542 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7544 unsigned int status = 1;
7546 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))
7548 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7549 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7551 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7553 struct Type * sourceType = source, * destType = dest;
7555 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7556 sourceType = sourceType->__anon1.type;
7557 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7558 destType = destType->__anon1.type;
7559 if(!destType->constant && sourceType->constant)
7563 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7570 struct Operand GetOperand(struct Expression * exp)
7579 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
7582 struct Type * type = exp->expType;
7586 while(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
7588 if(!type->__anon1._class->__anon1.registered->dataType)
7589 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7590 type = type->__anon1._class->__anon1.registered->dataType;
7592 if(exp->type == 3 && op.kind == 13)
7594 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7598 else if(exp->isConstant && exp->type == 2)
7600 op.kind = type->kind;
7607 if(exp->__anon1.__anon1.constant[0] == '\'')
7609 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7612 else if(type->isSigned)
7614 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7619 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7625 if(exp->__anon1.__anon1.constant[0] == '\'')
7627 op.__anon1.s = exp->__anon1.__anon1.constant[1];
7630 else if(type->isSigned)
7632 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7637 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7643 if(exp->__anon1.__anon1.constant[0] == '\'')
7645 op.__anon1.i = exp->__anon1.__anon1.constant[1];
7648 else if(type->isSigned)
7650 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7655 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7663 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7668 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7676 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7681 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7689 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7694 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7700 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7701 op.__anon1.f = __ecereMethod_float_inf();
7702 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7703 op.__anon1.f = -__ecereMethod_float_inf();
7704 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7705 op.__anon1.f = __ecereMethod_float_nan();
7706 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7707 op.__anon1.f = -__ecereMethod_float_nan();
7709 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7713 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7714 op.__anon1.d = __ecereMethod_double_inf();
7715 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7716 op.__anon1.d = -__ecereMethod_double_inf();
7717 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7718 op.__anon1.d = __ecereMethod_double_nan();
7719 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7720 op.__anon1.d = -__ecereMethod_double_nan();
7722 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7728 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7738 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7742 switch(_class->typeSize)
7745 if(!strcmp(_class->dataTypeString, "uint64"))
7746 v = (long long)*(uint64 *)ptr;
7748 v = *(long long *)ptr;
7751 if(!strcmp(_class->dataTypeString, "uint"))
7752 v = (long long)*(unsigned int *)ptr;
7754 v = (long long)*(int *)ptr;
7757 if(!strcmp(_class->dataTypeString, "uint16"))
7758 v = (long long)*(unsigned short *)ptr;
7760 v = (long long)*(short *)ptr;
7763 if(!strcmp(_class->dataTypeString, "byte"))
7764 v = (long long)*(unsigned char *)ptr;
7766 v = (long long)*(char *)ptr;
7772 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7774 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7775 ListAdd(specs, MkSpecifier(UNSIGNED));
7780 if(type->__anon1._class->__anon1.registered)
7782 if(!type->__anon1._class->__anon1.registered->dataType)
7783 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7784 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7789 ListAdd(specs, MkSpecifier(DOUBLE));
7792 ListAdd(specs, MkSpecifier(FLOAT));
7795 ListAdd(specs, MkSpecifier(CHAR));
7798 ListAdd(specs, MkSpecifier(_BOOL));
7801 ListAdd(specs, MkSpecifier(SHORT));
7804 ListAdd(specs, MkSpecifier(INT64));
7807 ListAdd(specs, MkSpecifier(INT128));
7810 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7813 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7817 ListAdd(specs, MkSpecifier(INT));
7822 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7826 if(printConst && type->constant)
7827 strcat(string, "const ");
7832 struct Symbol * c = type->__anon1._class;
7833 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7835 if(type->classObjectType == 2 && isObjectBaseClass)
7836 strcat(string, "typed_object");
7837 else if(type->classObjectType == 3 && isObjectBaseClass)
7838 strcat(string, "any_object");
7842 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7844 if(type->byReference)
7845 strcat(string, " &");
7849 strcat(string, "void");
7852 strcat(string, type->isSigned ? "int" : "uint");
7855 strcat(string, type->isSigned ? "int64" : "uint64");
7858 strcat(string, type->isSigned ? "__int128" : "unsigned __int128");
7861 strcat(string, type->isSigned ? "intptr" : "uintptr");
7864 strcat(string, type->isSigned ? "intsize" : "uintsize");
7867 strcat(string, type->isSigned ? "char" : "byte");
7870 strcat(string, "_Bool");
7873 strcat(string, type->isSigned ? "short" : "uint16");
7876 strcat(string, "float");
7879 strcat(string, "double");
7882 if(type->__anon1.__anon1.enumName)
7884 strcat(string, "struct ");
7885 strcat(string, type->__anon1.__anon1.enumName);
7887 else if(type->typeName)
7888 strcat(string, type->typeName);
7891 struct Type * member;
7893 strcat(string, "struct { ");
7894 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7896 PrintType(member, string, 1, fullName);
7897 strcat(string, "; ");
7899 strcat(string, "}");
7903 if(type->__anon1.__anon1.enumName)
7905 strcat(string, "union ");
7906 strcat(string, type->__anon1.__anon1.enumName);
7908 else if(type->typeName)
7909 strcat(string, type->typeName);
7912 strcat(string, "union ");
7913 strcat(string, "(unnamed)");
7917 if(type->__anon1.__anon1.enumName)
7919 strcat(string, "enum ");
7920 strcat(string, type->__anon1.__anon1.enumName);
7922 else if(type->typeName)
7923 strcat(string, type->typeName);
7925 strcat(string, "int");
7928 strcat(string, "...");
7931 strcat(string, "subclass(");
7932 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7933 strcat(string, ")");
7936 strcat(string, type->__anon1.templateParameter->identifier->string);
7939 strcat(string, "thisclass");
7942 strcat(string, "__builtin_va_list");
7948 unsigned int RelatedUnits(struct __ecereNameSpace__ecere__com__Class * c1, struct __ecereNameSpace__ecere__com__Class * c2)
7950 if(c1->base->type == 3)
7952 if(c2->base->type == 3)
7957 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7965 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7967 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7969 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7971 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7973 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7975 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7977 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7979 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7981 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7983 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7985 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7987 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7989 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7991 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7993 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7995 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7997 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7999 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
8001 struct __ecereNameSpace__ecere__com__Application
8004 const char * * argv;
8006 unsigned int isGUIApp;
8007 struct __ecereNameSpace__ecere__sys__OldList allModules;
8008 char * parsedCommand;
8009 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
8012 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)
8016 *curMember = (*curMember)->next;
8017 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
8019 *curMember = subMemberStack[--(*subMemberStackPos)];
8020 *curMember = (*curMember)->next;
8022 while((*curMember) && (*curMember)->isProperty)
8023 *curMember = (*curMember)->next;
8024 if(subMemberStackPos)
8026 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8028 subMemberStack[(*subMemberStackPos)++] = *curMember;
8029 *curMember = (*curMember)->members.first;
8030 while(*curMember && (*curMember)->isProperty)
8031 *curMember = (*curMember)->next;
8039 if(subMemberStackPos && *subMemberStackPos)
8041 *curMember = subMemberStack[--(*subMemberStackPos)];
8042 *curMember = (*curMember)->next;
8046 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8048 if(*curClass == _class)
8050 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8052 *curMember = (*curClass)->membersAndProperties.first;
8054 while((*curMember) && (*curMember)->isProperty)
8055 *curMember = (*curMember)->next;
8056 if(subMemberStackPos)
8058 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8060 subMemberStack[(*subMemberStackPos)++] = *curMember;
8061 *curMember = (*curMember)->members.first;
8062 while(*curMember && (*curMember)->isProperty)
8063 *curMember = (*curMember)->next;
8070 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8072 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8073 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8074 struct __ecereNameSpace__ecere__com__NameSpace * child;
8078 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)))
8080 data = ScanGlobalData(child, name);
8088 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8090 int nsLen = strlen(nameSpace);
8091 struct Symbol * symbol;
8093 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)))
8095 char * s = symbol->string;
8097 if(!strncmp(s, nameSpace, nsLen))
8102 for(c = strlen(s) - 1; c >= 0; c--)
8105 namePart = s + c + 1;
8106 if(!strcmp(namePart, name))
8114 return (((void *)0));
8117 unsigned int GetInt(struct Expression * exp, int * value2)
8119 struct Operand op2 = GetOperand(exp);
8121 return GetOpInt(&op2, value2);
8124 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8126 struct Operand op2 = GetOperand(exp);
8128 return GetOpUInt(&op2, value2);
8131 unsigned int GetInt64(struct Expression * exp, long long * value2)
8133 struct Operand op2 = GetOperand(exp);
8135 return GetOpInt64(&op2, value2);
8138 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8140 struct Operand op2 = GetOperand(exp);
8142 return GetOpUInt64(&op2, value2);
8145 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8147 struct Operand op2 = GetOperand(exp);
8149 return GetOpIntPtr(&op2, value2);
8152 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8154 struct Operand op2 = GetOperand(exp);
8156 return GetOpUIntPtr(&op2, value2);
8159 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8161 struct Operand op2 = GetOperand(exp);
8163 return GetOpIntSize(&op2, value2);
8166 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8168 struct Operand op2 = GetOperand(exp);
8170 return GetOpUIntSize(&op2, value2);
8173 unsigned int GetShort(struct Expression * exp, short * value2)
8175 struct Operand op2 = GetOperand(exp);
8177 return GetOpShort(&op2, value2);
8180 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8182 struct Operand op2 = GetOperand(exp);
8184 return GetOpUShort(&op2, value2);
8187 unsigned int GetChar(struct Expression * exp, char * value2)
8189 struct Operand op2 = GetOperand(exp);
8191 return GetOpChar(&op2, value2);
8194 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8196 struct Operand op2 = GetOperand(exp);
8198 return GetOpUChar(&op2, value2);
8201 unsigned int GetFloat(struct Expression * exp, float * value2)
8203 struct Operand op2 = GetOperand(exp);
8205 return GetOpFloat(&op2, value2);
8208 unsigned int GetDouble(struct Expression * exp, double * value2)
8210 struct Operand op2 = GetOperand(exp);
8212 return GetOpDouble(&op2, value2);
8215 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8217 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8219 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8220 PrintAttribs(type, string);
8221 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8222 strcat(string, " const");
8223 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8224 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8225 strcat(string, " (");
8226 if(type->kind == 13)
8228 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8229 PrintAttribs(type->__anon1.type, string);
8231 if(type->kind == 13)
8233 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8234 strcat(string, "*");
8236 strcat(string, " *");
8238 if(printConst && type->constant && type->kind == 13)
8239 strcat(string, " const");
8242 PrintTypeSpecs(type, string, fullName, printConst);
8245 void PrintExpression(struct Expression * exp, char * string)
8248 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8250 unsigned int backOutputLineNumbers = outputLineNumbers;
8252 outputLineNumbers = 0;
8254 OutputExpression(exp, f);
8256 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode);
8258 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8259 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8261 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8262 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek]);
8263 __internal_VirtualMethod ? __internal_VirtualMethod(f, 0, 0) : (unsigned int)1;
8265 count = strlen(string);
8266 count += (__extension__ ({
8267 int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count);
8269 __internal_VirtualMethod = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8270 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8272 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8273 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read]);
8274 __internal_VirtualMethod ? __internal_VirtualMethod(f, string + count, 1, 1023) : (int)1;
8276 string[count] = '\0';
8277 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8278 outputLineNumbers = backOutputLineNumbers;
8282 struct Type * Dereference(struct Type * source)
8284 struct Type * type = (((void *)0));
8288 if(source->isVector)
8290 type = __extension__ ({
8291 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8293 __ecereInstance1->refCount = 1, __ecereInstance1;
8295 CopyTypeInto(type, source);
8298 else if(source->kind == 13 || source->kind == 12)
8300 type = source->__anon1.type;
8301 source->__anon1.type->refCount++;
8303 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8305 type = __extension__ ({
8306 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8308 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8311 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8317 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8322 static struct Type * Reference(struct Type * source)
8324 struct Type * type = (((void *)0));
8328 type = __extension__ ({
8329 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8331 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8338 void modifyPassAsTemplate(struct Type ** typePtr, unsigned int value)
8340 if(*typePtr && (*typePtr)->passAsTemplate != value)
8342 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type);
8344 CopyTypeInto(type, *typePtr);
8345 type->passAsTemplate = value;
8351 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8353 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8355 FreeExpContents(checkedExp);
8356 FreeType(checkedExp->expType);
8357 FreeType(checkedExp->destType);
8358 *checkedExp = *newExp;
8359 ((newExp ? __extension__ ({
8360 void * __ecerePtrToDelete = (newExp);
8362 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8363 }) : 0), newExp = 0);
8364 checkedExp->prev = prev;
8365 checkedExp->next = next;
8368 void FinishTemplatesContext(struct Context * context)
8370 PopContext(context);
8371 FreeContext(context);
8372 ((context ? __extension__ ({
8373 void * __ecerePtrToDelete = (context);
8375 __ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8376 }) : 0), context = 0);
8379 static __attribute__((unused)) void UnusedFunction()
8384 const char * (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Class * , const void * , char * tempString, void * fieldData, unsigned int * needClass);
8386 __internal_VirtualMethod = ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString]);
8387 __internal_VirtualMethod ? __internal_VirtualMethod(__ecereClass_int, (void *)&a, 0, 0, 0) : (const char * )1;
8391 struct Expression * ParseExpressionString(char * expression)
8394 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8396 int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count);
8398 __internal_VirtualMethod = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8399 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8401 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8402 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write]);
8403 __internal_VirtualMethod ? __internal_VirtualMethod(fileInput, expression, 1, strlen(expression)) : (int)1;
8406 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode);
8408 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8409 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8411 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8412 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek]);
8413 __internal_VirtualMethod ? __internal_VirtualMethod(fileInput, 0, 0) : (unsigned int)1;
8416 parsedExpression = (((void *)0));
8418 expression_yyparse();
8419 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8420 return parsedExpression;
8423 struct __ecereNameSpace__ecere__com__Module
8425 struct __ecereNameSpace__ecere__com__Instance * application;
8426 struct __ecereNameSpace__ecere__sys__OldList classes;
8427 struct __ecereNameSpace__ecere__sys__OldList defines;
8428 struct __ecereNameSpace__ecere__sys__OldList functions;
8429 struct __ecereNameSpace__ecere__sys__OldList modules;
8430 struct __ecereNameSpace__ecere__com__Instance * prev;
8431 struct __ecereNameSpace__ecere__com__Instance * next;
8437 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8438 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8441 static struct GlobalData * FindGlobalData(char * name)
8444 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8446 nameSpace = globalData;
8447 for(c = 0; name[c]; c++)
8449 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8451 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8452 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8454 strncpy(spaceName, name + start, c - start);
8455 spaceName[c - start] = '\0';
8456 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8457 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8459 return (((void *)0));
8460 nameSpace = newSpace;
8468 return ScanGlobalData(nameSpace, name + start);
8470 return (((void *)0));
8473 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8476 char nameSpace[1024];
8477 const char * namePart;
8478 unsigned int gotColon = 0;
8480 nameSpace[0] = '\0';
8481 for(c = strlen(name) - 1; c >= 0; c--)
8487 namePart = name + c + 1;
8488 while(c >= 0 && name[c] == ':')
8492 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8496 memcpy(nameSpace, name, c + 1);
8497 nameSpace[c + 1] = 0;
8498 return ScanWithNameSpace(tree, nameSpace, namePart);
8502 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8508 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8512 return ScanWithNameSpace(tree, "", namePart);
8514 return (((void *)0));
8517 static void PrintArraySize(struct Type * arrayType, char * string)
8523 if(arrayType->__anon1.__anon4.enumClass)
8524 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8525 else if(arrayType->__anon1.__anon4.arraySizeExp)
8526 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8528 strcat(string, size);
8531 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8536 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8538 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8539 strcat(string, ")");
8540 if(type->kind == 12)
8541 PrintArraySize(type, string);
8542 else if(type->kind == 11)
8544 struct Type * param;
8546 strcat(string, "(");
8547 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8549 PrintType(param, string, 1, fullName);
8551 strcat(string, ", ");
8553 strcat(string, ")");
8555 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8556 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8559 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8561 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8562 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8563 strcat(string, " ");
8564 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8566 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8568 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8570 if(type->classObjectType == 1)
8571 strcat(string, "class");
8573 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8575 else if(_class && _class->string)
8577 char * s = _class->string;
8583 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8589 strcat(string, name);
8592 strcat(string, "::");
8594 if(printName && type->name)
8595 PrintName(type, string, fullName);
8596 PostPrintType(type, string, fullName);
8597 if(type->bitFieldCount)
8601 sprintf(count, ":%d", type->bitFieldCount);
8602 strcat(string, count);
8610 struct Conversion * prev, * next;
8611 struct __ecereNameSpace__ecere__com__Property * convert;
8613 struct Type * resultType;
8616 static void FreeConvert(struct Conversion * convert)
8618 if(convert->resultType)
8619 FreeType(convert->resultType);
8626 struct Enumerator * prev;
8627 struct Enumerator * next;
8628 struct Location loc;
8629 struct Identifier * id;
8630 struct Expression * exp;
8637 struct AsmField * prev;
8638 struct AsmField * next;
8639 struct Location loc;
8641 struct Expression * expression;
8642 struct Identifier * symbolic;
8645 struct ClassDefinition;
8649 struct Context * parent;
8650 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8651 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8652 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8653 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8656 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8657 struct ClassDefinition * classDef;
8658 unsigned int templateTypesOnly;
8659 unsigned int hasNameSpace;
8664 struct External * prev;
8665 struct External * next;
8666 struct Location loc;
8668 struct Symbol * symbol;
8671 struct FunctionDefinition * function;
8672 struct ClassDefinition * _class;
8673 struct Declaration * declaration;
8674 char * importString;
8675 struct Identifier * id;
8676 struct DBTableDef * table;
8677 } ecere_gcc_struct __anon1;
8679 struct External * fwdDecl;
8680 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8681 struct __ecereNameSpace__ecere__com__Instance * incoming;
8682 int nonBreakableIncoming;
8685 struct ClassDefinition
8687 struct ClassDefinition * prev;
8688 struct ClassDefinition * next;
8689 struct Location loc;
8690 struct Specifier * _class;
8691 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8692 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8693 struct Symbol * symbol;
8694 struct Location blockStart;
8695 struct Location nameLoc;
8697 unsigned int deleteWatchable;
8700 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8702 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8704 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8706 struct Symbol * symbol = data->symbol;
8708 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8713 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8716 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8719 struct Declaration * decl;
8720 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8721 struct Declarator * d;
8722 struct External * external;
8724 specifiers = MkList();
8725 declarators = MkList();
8726 ListAdd(specifiers, MkSpecifier(EXTERN));
8727 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8728 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8729 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8730 decl = MkDeclaration(specifiers, declarators);
8731 external = MkExternalDeclaration(decl);
8733 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8734 external->symbol = symbol;
8735 symbol->__anon2.__anon1.pointerExternal = external;
8736 DeclareType(external, data->dataType, 1, 1);
8739 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8740 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8743 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8745 struct Context * ctx;
8746 struct Symbol * symbol = (((void *)0));
8748 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8750 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8752 symbol = (((void *)0));
8757 strcpy(curName, thisNameSpace);
8758 strcat(curName, "::");
8759 strcat(curName, name);
8760 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8763 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8766 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8767 if(symbol || ctx == endContext)
8770 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8771 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8779 struct ClassDef * prev;
8780 struct ClassDef * next;
8781 struct Location loc;
8785 struct Declaration * decl;
8786 struct ClassFunction * function;
8787 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8788 struct PropertyDef * propertyDef;
8789 struct PropertyWatch * propertyWatch;
8791 struct Identifier * defaultProperty;
8794 struct Identifier * id;
8795 struct Initializer * initializer;
8796 } ecere_gcc_struct __anon1;
8797 } ecere_gcc_struct __anon1;
8804 struct PropertyDef * prev;
8805 struct PropertyDef * next;
8806 struct Location loc;
8807 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8808 struct Declarator * declarator;
8809 struct Identifier * id;
8810 struct Statement * getStmt;
8811 struct Statement * setStmt;
8812 struct Statement * issetStmt;
8813 struct Symbol * symbol;
8814 struct Expression * category;
8817 unsigned int conversion : 1;
8818 unsigned int isWatchable : 1;
8819 unsigned int isDBProp : 1;
8820 } ecere_gcc_struct __anon1;
8823 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8825 struct ClassDef * def;
8828 for(def = (*definitions).first; def; def = def->next)
8832 struct Declaration * decl = def->__anon1.decl;
8834 if(decl && decl->__anon1.__anon1.specifiers)
8836 struct Specifier * spec;
8837 unsigned int isStruct = 0;
8839 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8841 if(spec->type == 3 || spec->type == 4)
8843 if(spec->__anon1.__anon2.definitions)
8844 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8850 struct Declarator * d = (((void *)0));
8852 if(decl->__anon1.__anon1.declarators)
8854 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8856 struct Identifier * idDecl = GetDeclId(d);
8866 sprintf(id, "__anon%d", anonID++);
8867 if(!decl->__anon1.__anon1.declarators)
8868 decl->__anon1.__anon1.declarators = MkList();
8869 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8879 typedef union YYSTYPE
8884 struct Identifier * id;
8885 struct Expression * exp;
8886 struct Specifier * specifier;
8887 struct __ecereNameSpace__ecere__sys__OldList * list;
8888 struct Enumerator * enumerator;
8889 struct Declarator * declarator;
8890 struct Pointer * pointer;
8891 struct Initializer * initializer;
8892 struct InitDeclarator * initDeclarator;
8893 struct TypeName * typeName;
8894 struct Declaration * declaration;
8895 struct Statement * stmt;
8896 struct FunctionDefinition * function;
8897 struct External * external;
8898 struct Context * context;
8899 struct AsmField * asmField;
8900 struct Attrib * attrib;
8901 struct ExtDecl * extDecl;
8902 struct Attribute * attribute;
8903 struct Instantiation * instance;
8904 struct MembersInit * membersInit;
8905 struct MemberInit * memberInit;
8906 struct ClassFunction * classFunction;
8907 struct ClassDefinition * _class;
8908 struct ClassDef * classDef;
8909 struct PropertyDef * prop;
8911 struct Symbol * symbol;
8912 struct PropertyWatch * propertyWatch;
8913 struct TemplateParameter * templateParameter;
8914 struct TemplateArgument * templateArgument;
8915 struct TemplateDatatype * templateDatatype;
8916 struct DBTableEntry * dbtableEntry;
8917 struct DBIndexItem * dbindexItem;
8918 struct DBTableDef * dbtableDef;
8919 } ecere_gcc_struct YYSTYPE;
8921 extern YYSTYPE yylval;
8925 struct MemberInit * prev;
8926 struct MemberInit * next;
8927 struct Location loc;
8928 struct Location realLoc;
8929 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8930 struct Initializer * initializer;
8932 unsigned int variable;
8933 unsigned int takeOutExp;
8936 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8938 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8940 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8942 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8943 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8948 const char * dataTypeString;
8950 } ecere_gcc_struct __anon1;
8951 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8955 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8957 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8959 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8960 struct __ecereNameSpace__ecere__com__Class * sClass;
8962 for(sClass = _class; sClass; sClass = sClass->base)
8965 if(sClass->templateClass)
8966 sClass = sClass->templateClass;
8967 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8969 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8971 for(sClass = sClass->base; sClass; sClass = sClass->base)
8973 if(sClass->templateClass)
8974 sClass = sClass->templateClass;
8975 id += sClass->templateParams.count;
8986 arg = &_class->templateArgs[id];
8987 if(arg && param->type == 0)
8988 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8993 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8995 struct Context * context = PushContext();
8997 context->templateTypesOnly = 1;
8998 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
9000 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
9002 for(; param; param = param->next)
9004 if(param->type == 0 && param->identifier)
9006 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
9008 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
9014 struct __ecereNameSpace__ecere__com__Class * sClass;
9016 for(sClass = _class; sClass; sClass = sClass->base)
9018 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
9020 for(p = sClass->templateParams.first; p; p = p->next)
9024 struct TemplateParameter * param = p->param;
9025 struct TemplatedType * type;
9029 p->param = param = __extension__ ({
9030 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
9032 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
9035 type = __extension__ ({
9036 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
9038 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
9040 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
9048 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
9050 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9052 unsigned int first = 1;
9054 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9056 char className[1024];
9058 strcpy(className, _class->fullName);
9059 for(param = _class->templateParams.first; param; param = param->next)
9063 strcat(className, "<");
9065 strcat(className, ", ");
9066 if(lastParam + 1 != p)
9068 strcat(className, param->name);
9069 strcat(className, " = ");
9071 strcat(className, param->name);
9079 int len = strlen(className);
9081 if(className[len - 1] == '>')
9082 className[len++] = ' ';
9083 className[len++] = '>';
9084 className[len++] = '\0';
9086 return __ecereNameSpace__ecere__sys__CopyString(className);
9089 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
9092 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9096 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9098 unsigned int first = 1;
9100 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9102 char className[1024];
9104 strcpy(className, _class->fullName);
9105 for(param = _class->templateParams.first; param; param = param->next)
9109 strcat(className, "<");
9111 strcat(className, ", ");
9112 if(lastParam + 1 != p)
9114 strcat(className, param->name);
9115 strcat(className, " = ");
9117 strcat(className, param->name);
9125 int len = strlen(className);
9127 if(className[len - 1] == '>')
9128 className[len++] = ' ';
9129 className[len++] = '>';
9130 className[len++] = '\0';
9132 type = MkClassType(className);
9136 type = MkClassType(_class->fullName);
9141 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9143 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9144 struct __ecereNameSpace__ecere__com__DataMember * member;
9145 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9147 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9148 DeclareMembers(neededBy, _class->base, 0);
9149 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9151 if(!member->isProperty)
9153 switch(member->type)
9157 if(!member->dataType && member->dataTypeString)
9158 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9159 if(member->dataType)
9160 DeclareType(neededBy, member->dataType, 1, 0);
9166 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9173 FinishTemplatesContext(context);
9174 return topMember ? topMember->memberID : _class->memberID;
9177 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9179 if(!method->dataType)
9181 struct Context * context = SetupTemplatesContext(method->_class);
9183 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9184 FinishTemplatesContext(context);
9185 if(method->type != 1 && method->dataType)
9187 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9189 if(!method->_class->symbol)
9190 method->_class->symbol = FindClass(method->_class->fullName);
9191 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9197 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9201 struct Context * context = SetupTemplatesContext(prop->_class);
9203 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9204 FinishTemplatesContext(context);
9208 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9210 if(specs != (((void *)0)) && _class)
9212 struct Specifier * spec;
9214 for(spec = specs->first; spec; spec = spec->next)
9216 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9219 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9220 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9226 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9228 struct Identifier * id = exp->__anon1.__anon1.identifier;
9229 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9230 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9231 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9232 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9234 if(_class && _class->type == 4)
9236 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9237 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9241 struct __ecereNameSpace__ecere__com__Class * baseClass;
9243 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9245 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9247 for(value = e->values.first; value; value = value->next)
9249 if(!strcmp(value->name, id->string))
9254 exp->isConstant = 1;
9255 if(inCompiler || inPreCompiler || inDebugger)
9259 FreeExpContents(exp);
9261 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9262 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9264 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9265 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9267 exp->expType = MkClassType(baseClass->fullName);
9275 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9277 ProcessMethodType(method);
9278 exp->expType = __extension__ ({
9279 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9281 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9285 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9288 ProcessPropertyType(prop);
9289 exp->expType = prop->dataType;
9291 prop->dataType->refCount++;
9294 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9296 if(!member->dataType)
9297 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9298 exp->expType = member->dataType;
9299 if(member->dataType)
9300 member->dataType->refCount++;
9303 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9305 if(!classProp->dataType)
9306 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9307 if(classProp->constant)
9309 FreeExpContents(exp);
9310 exp->isConstant = 1;
9311 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9314 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9321 sprintf(constant, "%d", (int)classProp->Get(_class));
9322 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9328 exp->expType = classProp->dataType;
9329 if(classProp->dataType)
9330 classProp->dataType->refCount++;
9336 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9338 struct Symbol * symbol = prop->symbol;
9339 unsigned int imported = 0;
9340 unsigned int dllImport = 0;
9341 struct External * structExternal = (((void *)0));
9342 struct External * instExternal = (((void *)0));
9344 strcpy(setName, "__ecereProp_");
9345 FullClassNameCat(setName, prop->_class->fullName, 0);
9346 strcat(setName, "_Set_");
9347 FullClassNameCat(setName, prop->name, 1);
9348 strcpy(getName, "__ecereProp_");
9349 FullClassNameCat(getName, prop->_class->fullName, 0);
9350 strcat(getName, "_Get_");
9351 FullClassNameCat(getName, prop->name, 1);
9352 if(!symbol || symbol->_import)
9356 struct Symbol * classSym;
9358 if(!prop->_class->symbol)
9359 prop->_class->symbol = FindClass(prop->_class->fullName);
9360 classSym = prop->_class->symbol;
9361 if(classSym && !classSym->_import)
9363 struct ModuleImport * module;
9365 if(prop->_class->module)
9366 module = FindModule(prop->_class->module);
9368 module = mainModule;
9369 classSym->_import = __extension__ ({
9370 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9372 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9374 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9376 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9377 symbol->_import = (struct ClassImport *)__extension__ ({
9378 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9380 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9383 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9386 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)
9391 struct Context * context = SetupTemplatesContext(prop->_class);
9393 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9394 FinishTemplatesContext(context);
9396 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9398 if(prop->_class->type == 0 && prop->_class->structSize)
9399 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9400 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9402 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9404 struct Declaration * decl;
9405 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9406 struct Declarator * d;
9407 struct __ecereNameSpace__ecere__sys__OldList * params;
9408 struct Specifier * spec = (((void *)0));
9409 struct External * external;
9410 struct Declarator * typeDecl;
9411 unsigned int simple = 0;
9412 unsigned int needReference;
9414 specifiers = MkList();
9415 declarators = MkList();
9417 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9418 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9420 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9422 struct Context * context = SetupTemplatesContext(prop->_class);
9424 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9425 FinishTemplatesContext(context);
9427 needReference = !typeDecl || typeDecl->type == 1;
9428 for(spec = (*specifiers).first; spec; spec = spec->next)
9432 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9436 symbol->_class = classSym->__anon1.registered;
9437 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9444 d = PlugDeclarator(typeDecl, d);
9447 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9448 specifiers = MkList();
9450 d = MkDeclaratorFunction(d, params);
9452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9453 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9454 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9456 ListAdd(specifiers, MkSpecifier(VOID));
9457 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9458 decl = MkDeclaration(specifiers, declarators);
9459 external = MkExternalDeclaration(decl);
9461 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9463 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9465 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9466 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9467 external->symbol = symbol;
9468 symbol->__anon2.__anon2.externalGet = external;
9469 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9471 FreeDeclarator(typeDecl);
9473 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9475 struct Declaration * decl;
9476 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9477 struct Declarator * d;
9478 struct __ecereNameSpace__ecere__sys__OldList * params;
9479 struct Specifier * spec = (((void *)0));
9480 struct External * external;
9481 struct Declarator * typeDecl;
9482 unsigned int needReference;
9484 declarators = MkList();
9486 if(!prop->conversion || prop->_class->type == 1)
9488 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9490 specifiers = MkList();
9492 struct Context * context = SetupTemplatesContext(prop->_class);
9494 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9495 FinishTemplatesContext(context);
9497 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9498 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9499 ListAdd(params, MkTypeName(specifiers, d));
9500 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9502 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9503 d = MkDeclaratorFunction(d, params);
9504 needReference = !typeDecl || typeDecl->type == 1;
9505 for(spec = (*specifiers).first; spec; spec = spec->next)
9509 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9512 symbol->_class = classSym->__anon1.registered;
9516 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9517 specifiers = MkList();
9519 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9520 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9521 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9522 if(!prop->conversion || prop->_class->type == 1)
9523 ListAdd(specifiers, MkSpecifier(VOID));
9525 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9526 decl = MkDeclaration(specifiers, declarators);
9527 external = MkExternalDeclaration(decl);
9529 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9531 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9533 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9534 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9535 external->symbol = symbol;
9536 symbol->__anon2.__anon2.externalSet = external;
9537 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9539 if(!symbol->__anon2.__anon2.externalPtr)
9541 struct Declaration * decl;
9542 struct External * external;
9543 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9544 char propName[1024];
9547 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9550 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9551 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9553 ListAdd(specifiers, MkSpecifierName("Property"));
9554 strcpy(propName, "__ecereProp_");
9555 FullClassNameCat(propName, prop->_class->fullName, 0);
9556 strcat(propName, "_");
9557 FullClassNameCat(propName, prop->name, 1);
9559 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9561 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9564 strcpy(propName, "__ecerePropM_");
9565 FullClassNameCat(propName, prop->_class->fullName, 0);
9566 strcat(propName, "_");
9567 FullClassNameCat(propName, prop->name, 1);
9568 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9570 decl = MkDeclaration(specifiers, list);
9572 external = MkExternalDeclaration(decl);
9573 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9574 external->symbol = symbol;
9575 symbol->__anon2.__anon2.externalPtr = external;
9577 if(inCompiler && neededBy)
9579 if(symbol->__anon2.__anon2.externalPtr)
9580 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9581 if(symbol->__anon2.__anon2.externalGet)
9582 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9583 if(symbol->__anon2.__anon2.externalSet)
9584 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9588 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9590 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9592 struct Symbol * symbol = method->symbol;
9594 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9596 unsigned int dllImport = 0;
9598 if(!method->dataType)
9599 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9601 if(!symbol || method->type == 1)
9603 struct Symbol * classSym;
9605 if(!method->_class->symbol)
9606 method->_class->symbol = FindClass(method->_class->fullName);
9607 classSym = method->_class->symbol;
9608 if(!classSym->_import)
9610 struct ModuleImport * module;
9612 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9613 module = FindModule(method->_class->module);
9615 module = mainModule;
9616 classSym->_import = __extension__ ({
9617 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9619 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9621 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9625 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9627 if(!symbol->_import)
9629 symbol->_import = (struct ClassImport *)__extension__ ({
9630 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9632 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9634 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9638 symbol->type = method->dataType;
9640 symbol->type->refCount++;
9643 if(!method->dataType->dllExport)
9645 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)
9651 struct Declaration * decl;
9652 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9653 struct Declarator * d;
9654 struct Declarator * funcDecl;
9655 struct External * external;
9657 specifiers = MkList();
9658 declarators = MkList();
9660 ListAdd(specifiers, MkSpecifier(EXTERN));
9661 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9662 ListAdd(specifiers, MkSpecifier(STATIC));
9663 if(method->type == 1)
9665 ListAdd(specifiers, MkSpecifier(INT));
9666 d = MkDeclaratorIdentifier(MkIdentifier(name));
9670 d = MkDeclaratorIdentifier(MkIdentifier(name));
9672 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9674 struct Context * context = SetupTemplatesContext(method->_class);
9676 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9677 FinishTemplatesContext(context);
9679 funcDecl = GetFuncDecl(d);
9682 struct Specifier * spec, * next;
9684 for(spec = (*specifiers).first; spec; spec = next)
9689 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9690 FreeSpecifier(spec);
9694 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9696 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9698 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9699 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")));
9700 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9701 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9703 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9705 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9707 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9708 FreeTypeName(param);
9710 if(!funcDecl->__anon1.function.parameters)
9711 funcDecl->__anon1.function.parameters = MkList();
9712 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9716 ProcessDeclarator(d, 1);
9717 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9718 decl = MkDeclaration(specifiers, declarators);
9719 ReplaceThisClassSpecifiers(specifiers, method->_class);
9720 external = MkExternalDeclaration(decl);
9721 external->symbol = symbol;
9722 symbol->__anon2.__anon1.pointerExternal = external;
9723 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9724 DeclareStruct(external, method->_class->fullName, 1, 1);
9725 if(method->dataType)
9726 DeclareType(external, method->dataType, 1, 1);
9729 if(inCompiler && neededFor)
9731 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9733 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9737 struct __ecereNameSpace__ecere__com__GlobalFunction;
9739 struct __ecereNameSpace__ecere__com__GlobalFunction
9741 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9742 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9745 struct __ecereNameSpace__ecere__com__Instance * module;
9746 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9747 const char * dataTypeString;
9748 struct Type * dataType;
9752 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9754 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);
9756 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9758 struct Symbol * symbol = function->symbol;
9760 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9762 unsigned int imported = 0;
9763 unsigned int dllImport = 0;
9765 if(!function->dataType)
9767 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9768 if(!function->dataType->__anon1.__anon2.thisClass)
9769 function->dataType->__anon1.__anon2.staticMethod = 1;
9775 struct ModuleImport * module = FindModule(function->module);
9777 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9780 if(!function->dataType->dllExport)
9782 symbol->_import = (struct ClassImport *)__extension__ ({
9783 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9785 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9787 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9791 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9792 if(!symbol->type->__anon1.__anon2.thisClass)
9793 symbol->type->__anon1.__anon2.staticMethod = 1;
9796 imported = symbol->_import ? 1 : 0;
9797 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9803 struct Declaration * decl;
9804 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9805 struct Declarator * d;
9806 struct Declarator * funcDecl;
9807 struct External * external;
9809 specifiers = MkList();
9810 declarators = MkList();
9811 ListAdd(specifiers, MkSpecifier(EXTERN));
9812 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9814 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9815 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9816 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9818 struct Specifier * spec;
9820 for(spec = (*specifiers).first; spec; spec = spec->next)
9821 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9823 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9824 FreeSpecifier(spec);
9828 funcDecl = GetFuncDecl(d);
9829 if(funcDecl && !funcDecl->__anon1.function.parameters)
9831 funcDecl->__anon1.function.parameters = MkList();
9832 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9834 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9836 struct Context * oldCtx = curContext;
9838 curContext = globalContext;
9839 decl = MkDeclaration(specifiers, declarators);
9840 curContext = oldCtx;
9842 external = MkExternalDeclaration(decl);
9843 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9844 external->symbol = symbol;
9845 symbol->__anon2.__anon1.pointerExternal = external;
9846 DeclareType(external, function->dataType, 1, 1);
9850 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9851 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9852 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;
9855 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9857 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9864 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9865 strcpy(name, "__ecereFunction_");
9866 FullClassNameCat(name, s, 0);
9867 DeclareFunction(neededBy, function, name);
9870 FindSymbol(s, globalContext, globalContext, 0, 0);
9873 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9875 char propName[1024], propNameM[1024];
9876 char getName[1024], setName[1024];
9877 struct __ecereNameSpace__ecere__sys__OldList * args;
9879 DeclareProperty(curExternal, prop, setName, getName);
9880 strcpy(propName, "__ecereProp_");
9881 FullClassNameCat(propName, prop->_class->fullName, 0);
9882 strcat(propName, "_");
9883 FullClassNameCat(propName, prop->name, 1);
9884 strcpy(propNameM, "__ecerePropM_");
9885 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9886 strcat(propNameM, "_");
9887 FullClassNameCat(propNameM, prop->name, 1);
9888 if(prop->isWatchable)
9891 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9892 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9893 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9895 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9896 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9897 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9898 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9902 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9903 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9904 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9906 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9907 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9908 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9909 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9911 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9912 curFunction->propSet->fireWatchersDone = 1;
9915 struct __ecereNameSpace__ecere__com__SubModule;
9917 struct __ecereNameSpace__ecere__com__SubModule
9919 struct __ecereNameSpace__ecere__com__SubModule * prev;
9920 struct __ecereNameSpace__ecere__com__SubModule * next;
9921 struct __ecereNameSpace__ecere__com__Instance * module;
9925 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9927 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9929 if(searchFor == searchIn)
9931 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9933 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9935 if(ModuleVisibility(subModule->module, searchFor))
9942 int ComputeTypeSize(struct Type * type);
9944 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9946 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9947 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9949 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))
9951 int unionMemberOffset = 0;
9956 member->memberOffset = 0;
9957 if(targetBits < sizeof(void *) * 8)
9958 member->structAlignment = 0;
9960 else if(targetBits < sizeof(void *) * 8)
9961 _class->structAlignment = 0;
9962 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
9963 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
9964 if(!member && _class->destructionWatchOffset)
9965 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
9967 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9969 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
9971 if(!dataMember->isProperty)
9973 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
9975 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9981 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9983 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
9985 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
9987 if(!isMember && _class->type == 2 && dataMember->dataType)
9989 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
9993 ComputeTypeSize(dataMember->dataType);
9994 if(bitMember->pos == -1)
9995 bitMember->pos = _class->memberOffset;
9996 if(!bitMember->size)
9997 bitMember->size = dataMember->dataType->size * 8;
9998 _class->memberOffset = bitMember->pos + bitMember->size;
9999 for(d = 0; d < bitMember->size; d++)
10005 bitMember->mask = mask << bitMember->pos;
10007 else if(dataMember->type == 0 && dataMember->dataType)
10012 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)))
10013 ComputeTypeSize(dataMember->dataType);
10014 if(dataMember->dataType->bitFieldCount)
10016 bitFields += dataMember->dataType->bitFieldCount;
10023 int size = (bitFields + 7) / 8;
10027 int __simpleStruct0;
10031 short __simpleStruct0;
10033 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10034 if(member->memberOffset % alignment)
10035 member->memberOffset += alignment - (member->memberOffset % alignment);
10037 dataMember->offset = member->memberOffset;
10038 if(member->type == 1)
10039 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10042 member->memberOffset += size;
10049 short __simpleStruct0;
10051 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10052 if(_class->memberOffset % alignment)
10053 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10055 dataMember->offset = _class->memberOffset;
10056 _class->memberOffset += size;
10060 size = dataMember->dataType->size;
10061 alignment = dataMember->dataType->alignment;
10065 int __simpleStruct0;
10069 short __simpleStruct0;
10071 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10072 if(member->memberOffset % alignment)
10073 member->memberOffset += alignment - (member->memberOffset % alignment);
10075 dataMember->offset = member->memberOffset;
10076 if(member->type == 1)
10077 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10080 member->memberOffset += size;
10087 short __simpleStruct0;
10089 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10090 if(_class->memberOffset % alignment)
10091 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10093 dataMember->offset = _class->memberOffset;
10094 _class->memberOffset += size;
10101 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10102 alignment = dataMember->structAlignment;
10105 int __simpleStruct0;
10109 short __simpleStruct0;
10111 if(member->memberOffset % alignment)
10112 member->memberOffset += alignment - (member->memberOffset % alignment);
10113 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10115 dataMember->offset = member->memberOffset;
10116 if(member->type == 1)
10117 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10119 member->memberOffset += dataMember->memberOffset;
10125 short __simpleStruct0;
10127 if(_class->memberOffset % alignment)
10128 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10129 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10131 dataMember->offset = _class->memberOffset;
10132 _class->memberOffset += dataMember->memberOffset;
10140 int size = (bitFields + 7) / 8;
10144 int __simpleStruct0;
10148 short __simpleStruct0;
10150 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10151 if(member->memberOffset % alignment)
10152 member->memberOffset += alignment - (member->memberOffset % alignment);
10154 if(member->type == 1)
10155 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10158 member->memberOffset += size;
10165 short __simpleStruct0;
10167 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10168 if(_class->memberOffset % alignment)
10169 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10171 _class->memberOffset += size;
10176 if(member && member->type == 1)
10178 member->memberOffset = unionMemberOffset;
10182 if(_class->type != 2)
10186 if(_class->structAlignment)
10188 if(_class->memberOffset % _class->structAlignment)
10189 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10191 _class->structSize = (_class->base ? (_class->base->templateClass ? (_class->base->type == 5 ? _class->base->templateClass->memberOffset : _class->base->templateClass->structSize) : (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize)) : 0) + _class->memberOffset + extra;
10194 struct __ecereNameSpace__ecere__com__Property * prop;
10196 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10198 if(prop->isProperty && prop->isWatchable)
10200 prop->watcherOffset = _class->structSize;
10201 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10206 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10208 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10210 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10212 if(deriv->computeSize)
10214 deriv->offset = (_class->type == 5 ? _class->memberOffset : _class->structSize);
10215 deriv->memberOffset = 0;
10216 deriv->structSize = deriv->offset;
10217 ComputeClassMembers(deriv, 0);
10225 FinishTemplatesContext(context);
10228 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)
10230 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10231 unsigned int totalSize = 0;
10232 unsigned int maxSize = 0;
10235 struct __ecereNameSpace__ecere__com__DataMember * member;
10237 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10241 if(!isMember && _class->base)
10243 maxSize = _class->structSize;
10245 if(_class->type == 1 || _class->type == 5)
10246 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10249 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10251 if(maxSize > baseSize)
10252 maxSize -= baseSize;
10258 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10260 if(!member->isProperty)
10262 switch(member->type)
10266 if(member->dataTypeString)
10268 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10269 struct Declarator * decl;
10271 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10272 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10273 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10274 if(!member->dataType)
10275 member->dataType = ProcessType(specs, decl);
10276 ReplaceThisClassSpecifiers(specs, topClass);
10278 struct Type * type = ProcessType(specs, decl);
10280 DeclareType(neededBy, member->dataType, 1, 0);
10283 ComputeTypeSize(member->dataType);
10284 size = member->dataType->size;
10285 alignment = member->dataType->alignment;
10288 if(totalSize % alignment)
10289 totalSize += alignment - (totalSize % alignment);
10298 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10301 sprintf(id, "__anon%d", anonID++);
10303 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10304 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10305 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10306 alignment = member->structAlignment;
10309 if(totalSize % alignment)
10310 totalSize += alignment - (totalSize % alignment);
10320 unsigned int __simpleStruct0;
10322 if(topMember && topMember->type == 1)
10323 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10325 *retSize += totalSize;
10327 else if(totalSize < maxSize && _class->type != 1000)
10329 int autoPadding = 0;
10331 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10332 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10333 if(totalSize + autoPadding < maxSize)
10335 char sizeString[50];
10337 sprintf(sizeString, "%d", maxSize - totalSize);
10338 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10344 FinishTemplatesContext(context);
10345 return topMember ? topMember->memberID : _class->memberID;
10348 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)
10353 CheckConstCompatibility(source, dest, 1);
10354 if(source->kind == 20 && dest->kind != 20)
10356 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10361 if(dest->kind == 20 && source->kind != 20)
10363 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10368 if(dest->classObjectType == 2 && dest->kind != 11)
10370 if(source->classObjectType != 3)
10374 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10382 if(source->kind != 11 && source->classObjectType == 3)
10384 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10387 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10389 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))
10392 if(dest->kind == 14 && source->kind != 0)
10394 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))
10396 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))
10398 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10400 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10402 if(conversions != (((void *)0)))
10404 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10409 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10411 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10413 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10415 if(sourceBase == destBase)
10419 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))
10423 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && source->__anon1._class && source->__anon1._class->__anon1.registered && (dest->casted || (enumBaseType && dest->__anon1._class->__anon1.registered->type == 4 && (source->kind == 8 || source->__anon1._class->__anon1.registered->type != 4))))
10425 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10432 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10436 if(source->kind == 8)
10438 struct __ecereNameSpace__ecere__com__Class * _class;
10440 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10442 struct __ecereNameSpace__ecere__com__Property * convert;
10444 for(convert = _class->conversions.first; convert; convert = convert->next)
10446 if(convert->memberAccess == 1 || _class->module == privateModule)
10448 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10450 if(!convert->dataType)
10451 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10452 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))
10454 if(!conversions && !convert->Get)
10456 else if(conversions != (((void *)0)))
10458 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))
10462 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10464 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10473 if(dest->kind == 8)
10475 struct __ecereNameSpace__ecere__com__Class * _class;
10477 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10479 struct __ecereNameSpace__ecere__com__Property * convert;
10481 for(convert = _class->conversions.first; convert; convert = convert->next)
10483 if(convert->memberAccess == 1 || _class->module == privateModule)
10485 struct Type * constType = (((void *)0));
10486 unsigned int success = 0;
10488 if(!convert->dataType)
10489 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10490 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10492 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10494 constType = __extension__ ({
10495 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10497 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10499 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10500 ptrType->constant = 1;
10502 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10504 if(!conversions && !convert->Set)
10506 else if(conversions != (((void *)0)))
10508 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))
10512 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10514 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
10520 FreeType(constType);
10526 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
10528 if(!dest->__anon1._class->__anon1.registered->dataType)
10529 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
10530 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
10532 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))
10539 if(source->kind == 8)
10541 struct __ecereNameSpace__ecere__com__Class * _class;
10543 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10545 struct __ecereNameSpace__ecere__com__Property * convert;
10547 for(convert = _class->conversions.first; convert; convert = convert->next)
10549 if(convert->memberAccess == 1 || _class->module == privateModule)
10551 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10553 if(!convert->dataType)
10554 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10555 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))
10557 if(!conversions && !convert->Get)
10559 else if(conversions != (((void *)0)))
10561 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))
10565 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10567 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10575 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
10577 if(!source->__anon1._class->__anon1.registered->dataType)
10578 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
10579 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
10581 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))
10583 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
10589 if(source->kind == 8 || source->kind == 19)
10591 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
10593 else if(dest->kind == 7 && source->kind == 6)
10595 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
10597 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
10599 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
10601 else if(dest->kind == 25 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 4 || source->kind == 23))
10603 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
10605 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
10607 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))
10609 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))
10611 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)))
10613 struct Type * paramSource, * paramDest;
10615 if(dest->kind == 16)
10616 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
10617 if(source->kind == 16)
10618 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
10619 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
10620 dest = dest->__anon1.type;
10621 if(source->kind == 13 && source->__anon1.type->kind == 11)
10622 source = source->__anon1.type;
10623 if(dest->kind == 16)
10624 dest = dest->__anon1.__anon3.method->dataType;
10625 if(source->kind == 16)
10626 source = source->__anon1.__anon3.method->dataType;
10627 paramSource = source->__anon1.__anon2.params.first;
10628 if(paramSource && paramSource->kind == 0)
10629 paramSource = (((void *)0));
10630 paramDest = dest->__anon1.__anon2.params.first;
10631 if(paramDest && paramDest->kind == 0)
10632 paramDest = (((void *)0));
10633 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
10635 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))))
10637 if(paramDest && paramDest->kind == 8)
10638 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
10640 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
10643 paramDest = paramDest->next;
10645 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
10647 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
10649 if(dest->__anon1.__anon2.thisClass)
10651 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
10653 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
10659 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
10661 if(owningClassDest)
10662 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
10664 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
10668 paramSource = paramSource->next;
10672 if(dest->__anon1.__anon2.thisClass)
10674 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
10676 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
10682 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
10684 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
10690 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
10692 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
10696 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
10697 for(; paramDest; paramDest = paramDest->next)
10701 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
10705 struct Type * paramDestType = paramDest;
10706 struct Type * paramSourceType = paramSource;
10707 struct Type * type = paramDestType;
10709 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
10712 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
10713 struct __ecereNameSpace__ecere__com__Class * sClass;
10715 for(sClass = owningClassSource; sClass; sClass = sClass->base)
10718 if(sClass->templateClass)
10719 sClass = sClass->templateClass;
10720 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
10722 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
10724 for(sClass = sClass->base; sClass; sClass = sClass->base)
10726 if(sClass->templateClass)
10727 sClass = sClass->templateClass;
10728 id += sClass->templateParams.count;
10739 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
10741 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
10744 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)))
10749 PrintType(paramDest, type, 0, 1);
10750 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
10751 if(paramDestType != paramDest)
10752 FreeType(paramDestType);
10755 if(paramDestType != paramDest)
10756 FreeType(paramDestType);
10758 paramSource = paramSource->next;
10762 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
10767 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
10771 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
10773 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))
10775 ComputeTypeSize(source->__anon1.type);
10776 ComputeTypeSize(dest->__anon1.type);
10777 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))
10785 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
10787 if(exp->__anon1.op.op == SIZEOF)
10789 FreeExpContents(exp);
10791 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
10795 if(!exp->__anon1.op.exp1)
10797 switch(exp->__anon1.op.op)
10801 struct Expression * exp2 = exp->__anon1.op.exp2;
10803 exp->__anon1.op.exp2 = (((void *)0));
10804 FreeExpContents(exp);
10805 FreeType(exp->expType);
10806 FreeType(exp->destType);
10808 ((exp2 ? __extension__ ({
10809 void * __ecerePtrToDelete = (exp2);
10811 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
10812 }) : 0), exp2 = 0);
10818 FreeExpContents(exp);
10819 op1->ops.Neg(exp, op1);
10823 if(op1->ops.BitNot)
10825 FreeExpContents(exp);
10826 op1->ops.BitNot(exp, op1);
10832 FreeExpContents(exp);
10833 op1->ops.Not(exp, op1);
10840 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
10842 if(Promote(op2, op1->kind, op1->type->isSigned))
10843 op2->kind = op1->kind, op2->ops = op1->ops;
10844 else if(Promote(op1, op2->kind, op2->type->isSigned))
10845 op1->kind = op2->kind, op1->ops = op2->ops;
10847 switch(exp->__anon1.op.op)
10852 FreeExpContents(exp);
10853 op1->ops.Add(exp, op1, op2);
10859 FreeExpContents(exp);
10860 op1->ops.Sub(exp, op1, op2);
10866 FreeExpContents(exp);
10867 op1->ops.Mul(exp, op1, op2);
10873 FreeExpContents(exp);
10874 op1->ops.Div(exp, op1, op2);
10880 FreeExpContents(exp);
10881 op1->ops.Mod(exp, op1, op2);
10885 if(exp->__anon1.op.exp2)
10887 if(op1->ops.BitAnd)
10889 FreeExpContents(exp);
10890 op1->ops.BitAnd(exp, op1, op2);
10897 FreeExpContents(exp);
10898 op1->ops.BitOr(exp, op1, op2);
10902 if(op1->ops.BitXor)
10904 FreeExpContents(exp);
10905 op1->ops.BitXor(exp, op1, op2);
10909 if(op1->ops.LShift)
10911 FreeExpContents(exp);
10912 op1->ops.LShift(exp, op1, op2);
10916 if(op1->ops.RShift)
10918 FreeExpContents(exp);
10919 op1->ops.RShift(exp, op1, op2);
10925 FreeExpContents(exp);
10926 op1->ops.Equ(exp, op1, op2);
10932 FreeExpContents(exp);
10933 op1->ops.Nqu(exp, op1, op2);
10939 FreeExpContents(exp);
10940 op1->ops.And(exp, op1, op2);
10946 FreeExpContents(exp);
10947 op1->ops.Or(exp, op1, op2);
10953 FreeExpContents(exp);
10954 op1->ops.Grt(exp, op1, op2);
10960 FreeExpContents(exp);
10961 op1->ops.Sma(exp, op1, op2);
10965 if(op1->ops.GrtEqu)
10967 FreeExpContents(exp);
10968 op1->ops.GrtEqu(exp, op1, op2);
10972 if(op1->ops.SmaEqu)
10974 FreeExpContents(exp);
10975 op1->ops.SmaEqu(exp, op1, op2);
10983 void ApplyAnyObjectLogic(struct Expression * e)
10985 struct Type * destType = e->destType;
10987 if(destType && (destType->classObjectType == 3))
10989 if(e && e->expType)
10991 struct Type * type = e->expType;
10992 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
10994 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10996 _class = type->__anon1._class->__anon1.registered;
10998 else if(type->kind == 19)
11000 _class = FindClass("ecere::com::Class")->__anon1.registered;
11004 char string[1024] = "";
11005 struct Symbol * classSym;
11007 PrintTypeNoConst(type, string, 0, 1);
11008 classSym = FindClass(string);
11010 _class = classSym->__anon1.registered;
11012 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)))
11014 if(!_class || strcmp(_class->fullName, "char *"))
11016 struct Expression * checkedExp = e, * newExp;
11018 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11020 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11022 if(checkedExp->type == 23)
11024 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11027 checkedExp = (*checkedExp->__anon1.list).last;
11029 else if(checkedExp->type == 11)
11030 checkedExp = checkedExp->__anon1.cast.exp;
11032 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11034 newExp = checkedExp->__anon1.op.exp2;
11035 checkedExp->__anon1.op.exp2 = (((void *)0));
11036 FreeExpContents(checkedExp);
11037 if(e->expType && e->expType->passAsTemplate)
11041 ComputeTypeSize(e->expType);
11042 sprintf(size, "%d", e->expType->size);
11043 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))))));
11045 ReplaceExpContents(checkedExp, newExp);
11046 e->byReference = 1;
11048 else if(!e->byReference || (_class && _class->type == 5))
11050 struct Expression * checkedExp;
11053 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;
11055 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11057 struct Context * context = PushContext();
11058 struct Declarator * decl;
11059 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11060 char typeString[1024];
11061 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11063 typeString[0] = '\0';
11065 newExp->prev = (((void *)0));
11066 newExp->next = (((void *)0));
11067 newExp->expType = (((void *)0));
11068 PrintTypeNoConst(e->expType, typeString, 0, 1);
11069 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11070 newExp->destType = ProcessType(specs, decl);
11071 curContext = context;
11075 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
11078 sprintf(name, "__internalValue%03X", internalValueCounter++);
11079 if(!curCompound->__anon1.compound.declarations)
11080 curCompound->__anon1.compound.declarations = MkList();
11081 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
11082 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
11083 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
11084 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
11087 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
11089 struct Type * type = e->destType;
11091 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11092 CopyTypeInto(e->destType, type);
11093 e->destType->refCount = 1;
11094 e->destType->classObjectType = 0;
11097 e->__anon1.compound->__anon1.compound.context = context;
11098 PopContext(context);
11099 curContext = context->parent;
11103 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11105 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11107 if(checkedExp->type == 23)
11109 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11112 checkedExp = (*checkedExp->__anon1.list).last;
11114 else if(checkedExp->type == 11)
11115 checkedExp = checkedExp->__anon1.cast.exp;
11118 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11120 *operand = *checkedExp;
11121 __ecereMethod_Expression_Clear(checkedExp);
11122 checkedExp->destType = ProcessTypeString("void *", 0);
11123 checkedExp->expType = checkedExp->destType;
11124 checkedExp->destType->refCount++;
11125 checkedExp->type = 4;
11126 checkedExp->__anon1.op.op = '&';
11127 checkedExp->__anon1.op.exp1 = (((void *)0));
11128 checkedExp->__anon1.op.exp2 = operand;
11137 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))))
11139 if(e->expType->classObjectType && destType && destType->classObjectType)
11145 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11148 thisExp->prev = (((void *)0));
11149 thisExp->next = (((void *)0));
11150 __ecereMethod_Expression_Clear(e);
11152 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
11153 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
11154 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
11156 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11157 CopyTypeInto(e->expType, thisExp->expType);
11158 e->expType->byReference = 0;
11159 e->expType->refCount = 1;
11160 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))
11162 e->expType->classObjectType = 0;
11167 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
11169 if(destType->kind == 14)
11171 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
11173 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))
11175 unsigned int byReference = e->expType->byReference;
11176 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11177 struct Declarator * decl;
11178 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11179 char typeString[1024];
11180 struct Type * type;
11181 int backupClassObjectType;
11182 unsigned int backupByReference;
11184 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
11188 backupClassObjectType = type->classObjectType;
11189 backupByReference = type->byReference;
11190 type->classObjectType = 0;
11191 type->byReference = 0;
11192 typeString[0] = '\0';
11193 PrintType(type, typeString, 0, 1);
11194 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11195 type->classObjectType = backupClassObjectType;
11196 type->byReference = backupByReference;
11198 thisExp->prev = (((void *)0));
11199 thisExp->next = (((void *)0));
11200 __ecereMethod_Expression_Clear(e);
11201 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)))
11203 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
11206 destType->refCount++;
11208 e->__anon1.op.op = '*';
11209 e->__anon1.op.exp1 = (((void *)0));
11210 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
11211 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11212 CopyTypeInto(t, thisExp->destType);
11213 t->passAsTemplate = 0;
11214 FreeType(thisExp->destType);
11215 thisExp->destType = t;
11216 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11217 CopyTypeInto(t, destType);
11218 t->passAsTemplate = passAsTemplate;
11219 FreeType(destType);
11221 destType->refCount = 0;
11222 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11223 CopyTypeInto(e->expType, type);
11224 if(type->passAsTemplate)
11226 e->expType->classObjectType = 0;
11227 e->expType->passAsTemplate = 0;
11229 e->expType->byReference = 0;
11230 e->expType->refCount = 1;
11235 e->__anon1.cast.typeName = MkTypeName(specs, decl);
11236 e->__anon1.cast.exp = thisExp;
11237 e->byReference = 1;
11242 FreeType(e->destType);
11243 e->destType = destType;
11244 destType->refCount++;
11249 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
11251 struct __ecereNameSpace__ecere__com__Class * _class;
11252 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
11254 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
11255 ComputeModuleClasses(subModule->data);
11256 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
11257 ComputeClassMembers(_class, 0);
11260 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
11262 struct External * external = (((void *)0));
11263 struct Symbol * classSym = FindClass(name);
11264 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
11266 if(!inCompiler || !classSym)
11267 return (((void *)0));
11268 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
11269 return (((void *)0));
11270 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
11271 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
11272 external = classSym->__anon2.__anon1.structExternal;
11273 if(external && external->__anon1.declaration)
11275 struct Specifier * spec;
11277 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
11278 if(spec->type == 3 || spec->type == 4)
11280 curDeclarations = spec->__anon1.__anon2.definitions;
11284 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
11286 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
11287 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
11288 char structName[1024];
11289 unsigned int addedPadding = 0;
11290 struct Specifier * curSpec = (((void *)0));
11292 classSym->declaring++;
11293 if(strchr(classSym->string, '<'))
11295 if(classSym->__anon1.registered->templateClass)
11296 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
11297 classSym->declaring--;
11301 FullClassNameCat(structName, name, 0);
11302 classSym->declaredStructSym = 1;
11303 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
11305 unsigned int add = 0;
11309 external = MkExternalDeclaration((((void *)0)));
11310 classSym->__anon2.__anon1.structExternal = external;
11311 external->symbol = classSym;
11316 declarations = MkList();
11317 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
11319 if(external->__anon1.declaration)
11321 struct Specifier * spec;
11323 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
11324 if(spec->type == 3 || spec->type == 4)
11327 curDeclarations = spec->__anon1.__anon2.definitions;
11331 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
11333 FreeList(declarations, (void *)(FreeClassDef));
11334 declarations = (((void *)0));
11336 if(classSym->__anon1.registered->type != 5 && !declarations)
11338 FreeExternal(external);
11339 external = (((void *)0));
11340 classSym->__anon2.__anon1.structExternal = (((void *)0));
11345 curSpec->__anon1.__anon2.definitions = declarations;
11348 specifiers = MkList();
11349 declarators = MkList();
11350 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
11351 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
11354 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
11357 classSym->declaring--;
11359 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
11361 classSym->declaredStructSym = 1;
11362 if(classSym->__anon1.registered)
11363 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
11364 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
11366 struct Specifier * spec;
11368 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
11370 if(spec->__anon1.__anon2.definitions)
11371 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
11375 if(inCompiler && neededBy && (external || !classSym->imported))
11379 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
11380 external->symbol = classSym;
11381 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
11383 if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
11385 char structName[1024];
11386 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
11389 FullClassNameCat(structName, name, 0);
11390 specifiers = MkList();
11391 declarators = MkList();
11392 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
11393 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
11397 struct External * e = external->fwdDecl ? external->fwdDecl : external;
11399 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
11400 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
11403 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
11408 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
11410 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
11412 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)))
11414 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
11416 if(_class->type == 4)
11418 struct __ecereNameSpace__ecere__sys__OldList converts =
11422 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11425 if(!_class->symbol)
11426 _class->symbol = FindClass(_class->fullName);
11427 type->__anon1._class = _class->symbol;
11428 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))
11430 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
11431 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11435 struct __ecereNameSpace__ecere__com__Class * baseClass;
11437 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
11439 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
11441 for(value = e->values.first; value; value = value->next)
11443 if(!strcmp(value->name, string))
11448 FreeType(sourceExp->expType);
11449 sourceExp->isConstant = 1;
11450 sourceExp->expType = MkClassType(baseClass->fullName);
11451 if(inCompiler || inPreCompiler || inDebugger)
11453 char constant[256];
11455 FreeExpContents(sourceExp);
11456 sourceExp->type = 2;
11457 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
11458 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
11460 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
11461 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
11463 while(converts.first)
11465 struct Conversion * convert = converts.first;
11467 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
11468 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
11470 ((type ? __extension__ ({
11471 void * __ecerePtrToDelete = (type);
11473 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11474 }) : 0), type = 0);
11481 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
11482 ((type ? __extension__ ({
11483 void * __ecerePtrToDelete = (type);
11485 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11486 }) : 0), type = 0);
11489 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)))
11490 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
11495 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
11497 struct __ecereNameSpace__ecere__com__Instance * module;
11499 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))
11501 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))
11503 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))
11505 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)
11507 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
11513 void ProcessExpressionType(struct Expression * exp);
11515 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
11517 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
11519 struct Identifier * id = exp->__anon1.__anon1.identifier;
11520 struct Context * ctx;
11521 struct Symbol * symbol = (((void *)0));
11523 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
11525 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
11529 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
11534 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))))
11536 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
11537 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
11538 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
11539 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
11543 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
11545 if(!prop && !method)
11546 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
11547 if(!prop && !method && !member)
11549 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
11551 if(prop || method || member || classProp)
11554 exp->__anon1.member.member = id;
11555 exp->__anon1.member.memberType = 0;
11556 exp->__anon1.member.exp = QMkExpId("this");
11557 exp->addedThis = 1;
11559 else if(_class && _class->templateParams.first)
11561 struct __ecereNameSpace__ecere__com__Class * sClass;
11563 for(sClass = _class; sClass; sClass = sClass->base)
11565 if(sClass->templateParams.first)
11567 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
11569 for(param = sClass->templateParams.first; param; param = param->next)
11571 if(param->type == 2 && !strcmp(param->name, id->string))
11573 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
11577 struct Declarator * decl;
11578 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11580 FreeIdentifier(exp->__anon1.member.member);
11581 ProcessExpressionType(argExp);
11582 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
11583 exp->expType = ProcessType(specs, decl);
11585 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
11596 int ComputeTypeSize(struct Type * type)
11598 unsigned int size = type ? type->size : 0;
11600 if(!size && type && !type->computing)
11602 type->computing = 1;
11606 type->alignment = size = sizeof(char);
11609 type->alignment = size = sizeof(char);
11612 type->alignment = size = sizeof(int);
11615 type->alignment = size = sizeof(long long);
11618 type->alignment = size = targetBits / 8;
11619 type->pointerAlignment = 1;
11622 type->alignment = size = targetBits / 8;
11623 type->pointerAlignment = 1;
11626 type->alignment = size = sizeof(long);
11629 type->alignment = size = sizeof(short);
11632 type->alignment = size = sizeof(float);
11635 type->alignment = size = sizeof(double);
11639 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
11641 if(_class && _class->type == 1)
11643 ComputeClassMembers(_class, 0);
11644 type->alignment = _class->structAlignment;
11645 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
11646 size = _class->structSize;
11647 if(type->alignment && size % type->alignment)
11648 size += type->alignment - (size % type->alignment);
11650 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
11652 if(!_class->dataType)
11653 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11654 size = type->alignment = ComputeTypeSize(_class->dataType);
11658 size = type->alignment = targetBits / 8;
11659 type->pointerAlignment = 1;
11665 size = type->alignment = targetBits / 8;
11666 type->pointerAlignment = 1;
11669 if(type->__anon1.__anon4.arraySizeExp)
11671 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
11672 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
11673 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)))
11675 struct Location oldLoc = yylloc;
11676 char expression[10240];
11678 expression[0] = '\0';
11679 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
11680 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
11682 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
11683 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
11686 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
11688 else if(type->__anon1.__anon4.enumClass)
11690 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
11692 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
11695 type->__anon1.__anon4.arraySize = 0;
11699 type->__anon1.__anon4.arraySize = 0;
11701 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
11702 if(type->__anon1.type)
11704 type->alignment = type->__anon1.type->alignment;
11705 type->pointerAlignment = type->__anon1.type->pointerAlignment;
11710 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
11712 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
11714 if(symbol && symbol->type)
11716 ComputeTypeSize(symbol->type);
11717 size = symbol->type->size;
11722 struct Type * member;
11724 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
11726 int __simpleStruct0, __simpleStruct1;
11727 unsigned int addSize = ComputeTypeSize(member);
11729 member->offset = size;
11730 if(member->alignment && size % member->alignment)
11731 member->offset += member->alignment - (size % member->alignment);
11732 size = member->offset;
11733 if(member->pointerAlignment && type->size <= 4)
11734 type->pointerAlignment = 1;
11735 else if(!member->pointerAlignment && member->alignment >= 8)
11736 type->pointerAlignment = 0;
11737 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
11740 if(type->alignment && size % type->alignment)
11741 size += type->alignment - (size % type->alignment);
11747 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
11749 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
11751 if(symbol && symbol->type)
11753 ComputeTypeSize(symbol->type);
11754 size = symbol->type->size;
11755 type->alignment = symbol->type->alignment;
11760 struct Type * member;
11762 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
11764 int __simpleStruct0, __simpleStruct1;
11765 unsigned int addSize = ComputeTypeSize(member);
11767 member->offset = size;
11768 if(member->alignment && size % member->alignment)
11769 member->offset += member->alignment - (size % member->alignment);
11770 size = member->offset;
11771 if(member->pointerAlignment && type->size <= 4)
11772 type->pointerAlignment = 1;
11773 else if(!member->pointerAlignment && member->alignment >= 8)
11774 type->pointerAlignment = 0;
11775 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
11776 size = ((size > addSize) ? size : addSize);
11778 if(type->alignment && size % type->alignment)
11779 size += type->alignment - (size % type->alignment);
11785 struct TemplateParameter * param = type->__anon1.templateParameter;
11786 struct Type * baseType = ProcessTemplateParameterType(param);
11790 size = ComputeTypeSize(baseType);
11791 type->alignment = baseType->alignment;
11792 type->pointerAlignment = baseType->pointerAlignment;
11795 type->alignment = size = sizeof(uint64);
11800 type->alignment = size = sizeof(enum
11808 type->alignment = size = targetBits / 8;
11809 type->pointerAlignment = 1;
11814 type->computing = 0;
11819 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
11821 struct Type * source;
11822 struct Type * realDest = dest;
11823 struct Type * backupSourceExpType = (((void *)0));
11824 struct Expression * nbExp = GetNonBracketsExp(sourceExp);
11825 struct Expression * computedExp = nbExp;
11828 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)
11830 computedExp = CopyExpression(nbExp);
11831 ComputeExpression(computedExp);
11833 source = sourceExp->expType;
11834 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
11836 if(computedExp != nbExp)
11838 FreeExpression(computedExp);
11839 computedExp = nbExp;
11844 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
11846 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
11848 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
11850 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
11852 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
11854 if(sourceBase == destBase)
11856 if(computedExp != nbExp)
11858 FreeExpression(computedExp);
11859 computedExp = nbExp;
11868 struct __ecereNameSpace__ecere__sys__OldList * specs;
11869 unsigned int flag = 0;
11870 long long value = (((int)0x7fffffff));
11872 source->refCount++;
11873 if(computedExp->type == 2)
11875 if(source->isSigned)
11876 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
11878 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
11880 else if(computedExp->type == 4 && computedExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
11882 if(source->isSigned)
11883 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
11885 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
11887 if(computedExp != nbExp)
11889 FreeExpression(computedExp);
11890 computedExp = nbExp;
11892 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
11895 source = __extension__ ({
11896 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11898 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
11901 if(dest->kind == 8)
11903 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
11905 if(_class && _class->type == 3)
11907 if(source->kind != 8)
11909 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11910 struct Type * tempDest, * tempSource;
11912 for(; _class->base->type != 1000; _class = _class->base)
11915 tempDest = tempType;
11916 tempType->kind = 8;
11917 if(!_class->symbol)
11918 _class->symbol = FindClass(_class->fullName);
11919 tempType->__anon1._class = _class->symbol;
11920 tempType->truth = dest->truth;
11921 if(tempType->__anon1._class)
11922 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
11923 backupSourceExpType = sourceExp->expType;
11924 if(dest->passAsTemplate)
11926 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11927 CopyTypeInto(sourceExp->expType, dest);
11928 sourceExp->expType->passAsTemplate = 0;
11932 sourceExp->expType = dest;
11936 ((tempType ? __extension__ ({
11937 void * __ecerePtrToDelete = (tempType);
11939 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11940 }) : 0), tempType = 0);
11943 if(_class && _class->type == 2 && source->kind != 8)
11945 if(!dest->__anon1._class->__anon1.registered->dataType)
11946 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11947 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11950 FreeType(sourceExp->expType);
11951 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
11952 source->refCount++;
11955 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
11957 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11958 struct Declarator * decl;
11961 ReadString(string, sourceExp->__anon1.__anon2.string);
11962 decl = SpecDeclFromString(string, specs, (((void *)0)));
11963 FreeExpContents(sourceExp);
11964 FreeType(sourceExp->expType);
11965 sourceExp->type = 24;
11966 sourceExp->__anon1._classExp.specifiers = specs;
11967 sourceExp->__anon1._classExp.decl = decl;
11968 sourceExp->expType = dest;
11972 if(backupSourceExpType)
11973 FreeType(backupSourceExpType);
11977 else if(source->kind == 8)
11979 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
11981 if(_class && (_class->type == 3 || _class->type == 2))
11983 if(dest->kind != 8)
11985 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11986 struct Type * tempDest, * tempSource;
11988 if(!source->__anon1._class->__anon1.registered->dataType)
11989 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11990 for(; _class->base->type != 1000; _class = _class->base)
11993 tempSource = tempType;
11994 tempType->kind = 8;
11995 tempType->__anon1._class = FindClass(_class->fullName);
11996 tempType->truth = source->truth;
11997 tempType->classObjectType = source->classObjectType;
11998 if(tempType->__anon1._class)
11999 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12000 if(conversions && conversions->last)
12002 ((struct Conversion *)conversions->last)->resultType = dest;
12004 modifyPassAsTemplate(&((struct Conversion *)conversions->last)->resultType, 0);
12006 FreeType(sourceExp->expType);
12007 sourceExp->expType = MkClassType(_class->fullName);
12008 sourceExp->expType->truth = source->truth;
12009 sourceExp->expType->classObjectType = source->classObjectType;
12010 if(!sourceExp->destType)
12012 FreeType(sourceExp->destType);
12013 sourceExp->destType = sourceExp->expType;
12014 if(sourceExp->expType)
12015 sourceExp->expType->refCount++;
12017 if(!_class->dataType)
12018 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12020 dest = MkClassType(source->__anon1._class->string);
12021 dest->truth = source->truth;
12022 dest->classObjectType = source->classObjectType;
12024 source = _class->dataType;
12025 source->refCount++;
12026 ((tempType ? __extension__ ({
12027 void * __ecerePtrToDelete = (tempType);
12029 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12030 }) : 0), tempType = 0);
12036 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
12043 if(dest->kind == 8)
12045 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
12046 unsigned int fittingValue = 0;
12048 if(_class && _class->type == 4)
12050 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12051 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12053 if(c && value >= 0 && value <= c->largest)
12056 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
12058 if(_class->type == 0 || _class->type == 5)
12060 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12062 *newExp = *sourceExp;
12063 if(sourceExp->destType)
12064 sourceExp->destType->refCount++;
12065 if(sourceExp->expType)
12066 sourceExp->expType->refCount++;
12067 sourceExp->type = 11;
12068 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
12069 sourceExp->__anon1.cast.exp = newExp;
12070 FreeType(sourceExp->expType);
12071 sourceExp->expType = (((void *)0));
12072 ProcessExpressionType(sourceExp);
12075 FreeType(sourceExp->expType);
12076 sourceExp->expType = dest;
12081 if(backupSourceExpType)
12082 FreeType(backupSourceExpType);
12085 if(!_class->dataType)
12086 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12088 dest = _class->dataType;
12091 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))
12093 specs = MkListOne(MkSpecifier(DOUBLE));
12095 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))
12097 specs = MkListOne(MkSpecifier(FLOAT));
12099 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))
12102 if(!dest->isSigned)
12103 ListAdd(specs, MkSpecifier(UNSIGNED));
12104 ListAdd(specs, MkSpecifier(INT64));
12106 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
12109 if(!dest->isSigned)
12110 ListAdd(specs, MkSpecifier(UNSIGNED));
12111 ListAdd(specs, MkSpecifier(INT));
12113 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
12116 if(!dest->isSigned)
12117 ListAdd(specs, MkSpecifier(UNSIGNED));
12118 ListAdd(specs, MkSpecifier(SHORT));
12120 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
12123 if(!dest->isSigned)
12124 ListAdd(specs, MkSpecifier(UNSIGNED));
12125 ListAdd(specs, MkSpecifier(CHAR));
12131 if(backupSourceExpType)
12133 if(sourceExp->expType)
12134 FreeType(sourceExp->expType);
12135 sourceExp->expType = backupSourceExpType;
12140 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))
12142 specs = MkListOne(MkSpecifier(DOUBLE));
12144 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))
12146 specs = MkListOne(MkSpecifier(FLOAT));
12148 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
12151 ListAdd(specs, MkSpecifier(BOOL));
12153 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)))
12155 if(source->kind == 3)
12159 if(backupSourceExpType)
12160 FreeType(backupSourceExpType);
12166 if(!dest->isSigned)
12167 ListAdd(specs, MkSpecifier(UNSIGNED));
12168 ListAdd(specs, MkSpecifier(CHAR));
12171 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)))))
12173 if(source->kind == 3)
12177 if(backupSourceExpType)
12178 FreeType(backupSourceExpType);
12184 if(!dest->isSigned)
12185 ListAdd(specs, MkSpecifier(UNSIGNED));
12186 ListAdd(specs, MkSpecifier(SHORT));
12189 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
12192 if(!dest->isSigned)
12193 ListAdd(specs, MkSpecifier(UNSIGNED));
12194 ListAdd(specs, MkSpecifier(INT));
12196 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
12199 if(!dest->isSigned)
12200 ListAdd(specs, MkSpecifier(UNSIGNED));
12201 ListAdd(specs, MkSpecifier(INT64));
12203 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
12205 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
12211 if(backupSourceExpType)
12213 if(sourceExp->expType)
12214 FreeType(sourceExp->expType);
12215 sourceExp->expType = backupSourceExpType;
12219 if(!flag && !sourceExp->opDestType)
12221 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12223 *newExp = *sourceExp;
12224 newExp->prev = (((void *)0));
12225 newExp->next = (((void *)0));
12226 if(sourceExp->destType)
12227 sourceExp->destType->refCount++;
12228 if(sourceExp->expType)
12229 sourceExp->expType->refCount++;
12230 sourceExp->type = 11;
12231 if(realDest->kind == 8)
12233 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
12234 FreeList(specs, (void *)(FreeSpecifier));
12237 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
12238 if(newExp->type == 4)
12240 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12243 sourceExp->__anon1.cast.exp = newExp;
12244 FreeType(sourceExp->expType);
12245 sourceExp->expType = (((void *)0));
12246 ProcessExpressionType(sourceExp);
12249 FreeList(specs, (void *)(FreeSpecifier));
12252 if(backupSourceExpType)
12253 FreeType(backupSourceExpType);
12258 if(computedExp != nbExp)
12260 FreeExpression(computedExp);
12261 computedExp = nbExp;
12263 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
12264 sourceExp = (*sourceExp->__anon1.list).last;
12265 if(sourceExp->type == 0)
12267 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
12269 if(dest->kind == 8)
12271 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
12273 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
12274 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12278 for(; _class && _class->type == 4; _class = _class->base)
12280 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12281 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12283 for(value = e->values.first; value; value = value->next)
12285 if(!strcmp(value->name, id->string))
12290 FreeType(sourceExp->expType);
12291 sourceExp->isConstant = 1;
12292 sourceExp->expType = MkClassType(_class->fullName);
12293 if(inCompiler || inPreCompiler || inDebugger)
12295 FreeExpContents(sourceExp);
12296 sourceExp->type = 2;
12297 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
12298 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
12300 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
12309 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
12320 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
12322 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
12324 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
12326 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
12327 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
12330 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12331 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
12332 struct Type * type;
12333 void * ptr = inst->data + dataMember->offset + offset;
12334 char * result = (((void *)0));
12336 exp->loc = member->loc = inst->loc;
12337 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
12338 if(!dataMember->dataType)
12339 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12340 type = dataMember->dataType;
12341 if(type->kind == 8)
12343 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12345 if(_class->type == 4)
12347 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12351 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12352 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
12354 for(item = e->values.first; item; item = item->next)
12356 if(item->data == GetEnumValue(_class, ptr))
12358 result = item->name;
12364 exp->__anon1.__anon1.identifier = MkIdentifier(result);
12366 exp->destType = MkClassType(_class->fullName);
12367 ProcessExpressionType(exp);
12371 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
12373 if(!_class->dataType)
12374 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12375 type = _class->dataType;
12384 FreeExpContents(exp);
12385 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
12391 FreeExpContents(exp);
12392 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
12398 FreeExpContents(exp);
12399 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
12405 FreeExpContents(exp);
12406 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
12412 FreeExpContents(exp);
12413 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
12419 FreeExpContents(exp);
12420 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
12425 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
12428 ListAdd(memberList, member);
12430 if(parentDataMember->type == 1)
12435 void CheckTemplateTypes(struct Expression * exp)
12437 struct Expression * nbExp = GetNonBracketsExp(exp);
12439 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12441 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12442 struct Context * context;
12443 int kind = exp->expType->kind;
12447 exp->destType->refCount++;
12449 exp->expType->refCount++;
12450 newExp->prev = (((void *)0));
12451 newExp->next = (((void *)0));
12452 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
12454 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
12456 if(c->type == 2 || c->type == 4 || c->type == 3)
12459 c->dataType = ProcessTypeString(c->dataTypeString, 0);
12460 kind = c->dataType->kind;
12466 if(exp->destType->classObjectType)
12469 exp->destType->refCount--;
12471 exp->expType->refCount--;
12472 ((newExp ? __extension__ ({
12473 void * __ecerePtrToDelete = (newExp);
12475 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12476 }) : 0), newExp = 0);
12480 struct __ecereNameSpace__ecere__sys__OldList * specs;
12481 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12482 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12484 context = PushContext();
12485 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12486 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12487 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12489 modifyPassAsTemplate(&exp->expType, 1);
12490 modifyPassAsTemplate(&newExp->destType, 0);
12491 modifyPassAsTemplate(&newExp->expType, 0);
12492 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12493 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12494 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12495 exp->__anon1.compound->__anon1.compound.context = context;
12496 PopContext(context);
12500 if(exp->destType->classObjectType)
12503 exp->destType->refCount--;
12505 exp->expType->refCount--;
12506 ((newExp ? __extension__ ({
12507 void * __ecerePtrToDelete = (newExp);
12509 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12510 }) : 0), newExp = 0);
12514 struct __ecereNameSpace__ecere__sys__OldList * specs;
12515 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12516 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12518 context = PushContext();
12519 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(FLOAT)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("f"))), (((void *)0)))));
12520 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12521 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12523 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12524 modifyPassAsTemplate(&exp->expType, 1);
12525 modifyPassAsTemplate(&newExp->destType, 0);
12526 modifyPassAsTemplate(&newExp->expType, 0);
12527 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("f")), '=', newExp))));
12528 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12529 exp->__anon1.compound->__anon1.compound.context = context;
12530 PopContext(context);
12537 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12538 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))
12539 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
12541 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12546 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12548 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12549 struct Context * context;
12550 int kind = exp->expType->kind;
12554 exp->destType->refCount++;
12556 exp->expType->refCount++;
12557 newExp->prev = (((void *)0));
12558 newExp->next = (((void *)0));
12559 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
12561 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
12563 if(c->type == 2 || c->type == 4 || c->type == 3)
12566 c->dataType = ProcessTypeString(c->dataTypeString, 0);
12567 kind = c->dataType->kind;
12573 if(exp->destType->classObjectType)
12576 exp->destType->refCount--;
12578 exp->expType->refCount--;
12579 ((newExp ? __extension__ ({
12580 void * __ecerePtrToDelete = (newExp);
12582 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12583 }) : 0), newExp = 0);
12587 struct __ecereNameSpace__ecere__sys__OldList * specs;
12588 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12589 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12591 context = PushContext();
12592 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12593 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12594 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12596 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12597 modifyPassAsTemplate(&exp->expType, 0);
12598 modifyPassAsTemplate(&newExp->destType, 1);
12599 modifyPassAsTemplate(&newExp->expType, 1);
12600 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12601 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12602 exp->__anon1.compound->__anon1.compound.context = context;
12603 PopContext(context);
12607 if(exp->destType->classObjectType)
12610 exp->destType->refCount--;
12612 exp->expType->refCount--;
12613 ((newExp ? __extension__ ({
12614 void * __ecerePtrToDelete = (newExp);
12616 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12617 }) : 0), newExp = 0);
12621 struct __ecereNameSpace__ecere__sys__OldList * specs;
12622 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12623 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12625 context = PushContext();
12626 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(FLOAT)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("f"))), (((void *)0)))));
12627 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12628 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12630 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12631 modifyPassAsTemplate(&exp->expType, 0);
12632 modifyPassAsTemplate(&newExp->destType, 1);
12633 modifyPassAsTemplate(&newExp->expType, 1);
12634 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12635 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("f")))));
12636 exp->__anon1.compound->__anon1.compound.context = context;
12637 PopContext(context);
12642 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12645 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
12646 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)));
12647 ProcessExpressionType((*exp->__anon1.list).first);
12653 if(__ecereProp_Type_Get_isPointerType(exp->expType))
12655 exp->needTemplateCast = 2;
12656 newExp->needCast = 1;
12657 newExp->needTemplateCast = 2;
12658 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
12660 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12661 exp->needTemplateCast = 2;
12662 newExp->needCast = 1;
12663 newExp->needTemplateCast = 2;
12664 ProcessExpressionType((*exp->__anon1.list).first);
12670 if(exp->expType->kind == 20)
12672 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
12676 FreeType(exp->destType);
12677 FreeType(exp->expType);
12678 ((newExp ? __extension__ ({
12679 void * __ecerePtrToDelete = (newExp);
12681 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
12682 }) : 0), newExp = 0);
12687 char typeString[1024];
12688 struct Declarator * decl;
12689 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12691 typeString[0] = '\0';
12692 PrintType(exp->expType, typeString, 0, 0);
12693 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12695 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
12696 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12697 exp->__anon1.cast.exp->needCast = 1;
12698 exp->needTemplateCast = 2;
12699 newExp->needTemplateCast = 2;
12707 static void ProcessInitializer(struct Initializer * init, struct Type * type)
12712 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
12714 if(init->__anon1.exp && !init->__anon1.exp->destType)
12716 FreeType(init->__anon1.exp->destType);
12717 init->__anon1.exp->destType = type;
12721 if(init->__anon1.exp)
12723 ProcessExpressionType(init->__anon1.exp);
12724 init->isConstant = init->__anon1.exp->isConstant;
12730 struct Expression * exp = init->__anon1.exp;
12731 struct Instantiation * inst = exp->__anon1.instance;
12732 struct MembersInit * members;
12735 init->__anon1.list = MkList();
12738 for(members = (*inst->members).first; members; members = members->next)
12740 if(members->type == 0)
12742 struct MemberInit * member;
12744 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
12746 ListAdd(init->__anon1.list, member->initializer);
12747 member->initializer = (((void *)0));
12752 FreeExpression(exp);
12756 struct Initializer * i;
12757 struct Type * initializerType = (((void *)0));
12758 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
12759 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
12760 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
12761 int subMemberStackPos = 0;
12763 if(type && type->kind == 12)
12764 initializerType = Dereference(type);
12765 else if(type && (type->kind == 9 || type->kind == 10))
12766 initializerType = type->__anon1.__anon1.members.first;
12767 for(i = (*init->__anon1.list).first; i; i = i->next)
12769 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
12771 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
12774 if(!curMember->dataType)
12775 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
12776 initializerType = curMember->dataType;
12779 ProcessInitializer(i, initializerType);
12780 if(initializerType && type && (type->kind == 9 || type->kind == 10))
12781 initializerType = initializerType->next;
12783 init->isConstant = 0;
12785 if(type && type->kind == 12)
12786 FreeType(initializerType);
12787 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))
12789 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
12796 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12798 unsigned int result = 1;
12802 struct __ecereNameSpace__ecere__sys__OldList converts =
12806 struct Conversion * convert;
12808 if(destType->kind == 0)
12810 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12814 for(convert = converts.first; convert; convert = convert->next)
12816 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12820 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12821 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12824 newExp->prev = (((void *)0));
12825 newExp->next = (((void *)0));
12826 newExp->destType = (((void *)0));
12830 exp->addedThis = 1;
12831 exp->__anon1.member.exp = newExp;
12832 FreeType(exp->__anon1.member.exp->expType);
12833 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12834 exp->__anon1.member.exp->expType->classObjectType = objectType;
12835 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12836 exp->__anon1.member.memberType = 1;
12837 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12840 exp->expType->refCount++;
12841 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12847 exp->addedThis = 1;
12848 exp->__anon1.member.exp = newExp;
12849 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)
12851 newExp->byReference = 1;
12853 FreeType(exp->__anon1.member.exp->expType);
12854 exp->__anon1.member.exp->expType = (((void *)0));
12855 if(convert->convert->dataType)
12857 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12858 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12859 exp->__anon1.member.exp->expType->refCount = 1;
12860 exp->__anon1.member.exp->expType->classObjectType = objectType;
12861 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12863 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12864 exp->__anon1.member.memberType = 4;
12865 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12867 if(convert->resultType)
12868 convert->resultType->refCount++;
12874 FreeType(exp->expType);
12877 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12878 if(exp->destType->casted)
12881 exp->expType->refCount++;
12885 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12886 if(exp->destType->casted)
12888 if(convert->resultType)
12889 convert->resultType->refCount++;
12893 if(exp->isConstant && inCompiler)
12894 ComputeExpression(exp);
12895 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12897 if(!result && exp->expType && converts.count)
12899 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12901 if(!result && exp->expType && exp->destType)
12903 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))
12910 void PopulateInstance(struct Instantiation * inst)
12912 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
12913 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
12914 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
12915 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
12918 inst->members = MkListOne(MkMembersInitList(memberList));
12920 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
12921 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
12923 if(!dataMember->isProperty)
12925 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
12926 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
12929 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12930 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
12931 struct Type * type;
12932 void * ptr = inst->data + dataMember->offset;
12933 char * result = (((void *)0));
12935 exp->loc = member->loc = inst->loc;
12936 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
12937 if(!dataMember->dataType)
12938 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12939 type = dataMember->dataType;
12940 if(type->kind == 8)
12942 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12944 if(_class->type == 4)
12946 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12950 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
12951 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
12953 for(item = e->values.first; item; item = item->next)
12955 if(item->data == GetEnumValue(_class, ptr))
12957 result = item->name;
12964 exp->__anon1.__anon1.identifier = MkIdentifier(result);
12966 exp->destType = MkClassType(_class->fullName);
12967 ProcessExpressionType(exp);
12970 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
12972 if(!_class->dataType)
12973 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12974 type = _class->dataType;
12983 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
12989 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
12995 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
13001 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
13007 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
13012 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
13015 ListAdd(memberList, member);
13021 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)
13023 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
13024 unsigned int found = 0;
13025 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
13026 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13027 unsigned int freeType = 0;
13029 yylloc = member->loc;
13034 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
13038 dataMember = *curMember;
13044 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
13045 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
13046 int _subMemberStackPos = 0;
13049 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
13052 dataMember = thisMember;
13053 if(curMember && thisMember->memberAccess == 1)
13055 *curMember = thisMember;
13056 *curClass = thisMember->_class;
13057 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
13058 *subMemberStackPos = _subMemberStackPos;
13064 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
13065 if(method && method->type == 1)
13068 method = (((void *)0));
13073 struct Type * type = (((void *)0));
13077 if(!dataMember->dataType && dataMember->dataTypeString)
13079 struct Context * context = SetupTemplatesContext(_class);
13081 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
13082 FinishTemplatesContext(context);
13084 type = dataMember->dataType;
13088 if(!method->dataType)
13089 ProcessMethodType(method);
13090 type = method->dataType;
13092 if(ident && ident->next)
13094 for(ident = ident->next; ident && type; ident = ident->next)
13096 if(type->kind == 8)
13098 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
13100 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
13102 type = dataMember->dataType;
13104 else if(type->kind == 9 || type->kind == 10)
13106 struct Type * memberType;
13108 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13110 if(!strcmp(memberType->name, ident->string))
13119 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
13122 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
13123 struct __ecereNameSpace__ecere__com__Class * sClass;
13125 for(sClass = _class; sClass; sClass = sClass->base)
13128 if(sClass->templateClass)
13129 sClass = sClass->templateClass;
13130 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
13132 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
13134 for(sClass = sClass->base; sClass; sClass = sClass->base)
13136 if(sClass->templateClass)
13137 sClass = sClass->templateClass;
13138 id += sClass->templateParams.count;
13149 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
13151 if(arg.__anon1.__anon1.dataTypeString)
13153 unsigned int constant = type->constant;
13155 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
13156 if(type->kind == 8 && constant)
13157 type->constant = 1;
13158 else if(type->kind == 13)
13160 struct Type * t = type->__anon1.type;
13162 while(t->kind == 13)
13163 t = t->__anon1.type;
13165 t->constant = constant;
13168 if(type && _class->templateClass)
13169 type->passAsTemplate = 1;
13176 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
13178 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
13179 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
13180 int paramCount = 0;
13181 int lastParam = -1;
13182 char templateString[1024];
13183 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
13185 sprintf(templateString, "%s<", expClass->templateClass->fullName);
13186 for(cClass = expClass; cClass; cClass = cClass->base)
13190 if(cClass->templateClass)
13191 cClass = cClass->templateClass;
13192 for(param = cClass->templateParams.first; param; param = param->next)
13195 struct __ecereNameSpace__ecere__com__Class * sClass;
13196 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
13198 for(sClass = cClass->base; sClass; sClass = sClass->base)
13200 if(sClass->templateClass)
13201 sClass = sClass->templateClass;
13202 id += sClass->templateParams.count;
13204 arg = expClass->templateArgs[id];
13205 for(sClass = _class; sClass; sClass = sClass->base)
13207 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
13209 struct __ecereNameSpace__ecere__com__Class * nextClass;
13211 if(sClass->templateClass)
13212 sClass = sClass->templateClass;
13213 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
13215 if(nextClass->templateClass)
13216 nextClass = nextClass->templateClass;
13217 p += nextClass->templateParams.count;
13219 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
13221 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
13223 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
13225 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
13226 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
13233 char argument[256];
13235 argument[0] = '\0';
13236 switch(param->type)
13240 char expString[1024];
13241 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13242 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
13243 struct Expression * exp;
13244 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
13246 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
13247 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
13248 ProcessExpressionType(exp);
13249 ComputeExpression(exp);
13250 expString[0] = '\0';
13251 PrintExpression(exp, expString);
13252 strcat(argument, expString);
13253 FreeExpression(exp);
13258 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
13263 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
13264 strcat(argument, arg.__anon1.__anon1.dataTypeString);
13271 strcat(templateString, ", ");
13272 if(lastParam != p - 1)
13274 strcat(templateString, param->name);
13275 strcat(templateString, " = ");
13277 strcat(templateString, argument);
13286 int len = strlen(templateString);
13288 if(templateString[len - 1] == '<')
13292 if(templateString[len - 1] == '>')
13293 templateString[len++] = ' ';
13294 templateString[len++] = '>';
13296 templateString[len++] = '\0';
13299 struct Context * context = SetupTemplatesContext(_class);
13303 type = ProcessTypeString(templateString, 0);
13305 FinishTemplatesContext(context);
13308 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
13310 ProcessExpressionType(member->initializer->__anon1.exp);
13311 if(!member->initializer->__anon1.exp->expType)
13315 char expString[10240];
13317 expString[0] = '\0';
13318 PrintExpression(member->initializer->__anon1.exp, expString);
13319 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
13320 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
13323 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
13325 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
13328 else if(member->initializer)
13330 ProcessInitializer(member->initializer, type);
13337 if(_class && _class->type == 3)
13339 if(member->initializer)
13341 struct Type * type = MkClassType(_class->fullName);
13343 ProcessInitializer(member->initializer, type);
13349 if(member->initializer)
13351 ProcessInitializer(member->initializer, (((void *)0)));
13357 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
13361 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
13363 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
13367 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
13372 void ComputeInstantiation(struct Expression * exp)
13374 struct Instantiation * inst = exp->__anon1.instance;
13375 struct MembersInit * members;
13376 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
13377 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
13378 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
13379 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
13380 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
13381 int subMemberStackPos = 0;
13384 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
13388 if(_class->type == 0 || _class->type == 5)
13390 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
13391 if(_class->type == 0)
13392 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
13395 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13399 for(members = (*inst->members).first; members; members = members->next)
13401 switch(members->type)
13405 if(members->__anon1.dataMembers)
13407 struct MemberInit * member;
13409 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
13411 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
13412 unsigned int found = 0;
13413 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13414 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
13415 unsigned int dataMemberOffset;
13419 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
13422 if(curMember->isProperty)
13423 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
13426 dataMember = curMember;
13427 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
13428 if(_class->type == 0)
13429 dataMemberOffset += _class->base->structSize;
13436 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
13440 if(prop->memberAccess == 1)
13442 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
13443 curClass = prop->_class;
13448 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
13449 int _subMemberStackPos = 0;
13451 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
13455 if(dataMember->memberAccess == 1)
13457 curMember = dataMember;
13458 curClass = dataMember->_class;
13459 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
13460 subMemberStackPos = _subMemberStackPos;
13465 if(found && member->initializer && member->initializer->type == 0)
13467 struct Expression * value = member->initializer->__anon1.exp;
13468 struct Type * type = (((void *)0));
13469 unsigned int deepMember = 0;
13473 type = prop->dataType;
13475 else if(dataMember)
13477 if(!dataMember->dataType)
13478 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
13479 type = dataMember->dataType;
13481 if(ident && ident->next)
13484 for(ident = ident->next; ident && type; ident = ident->next)
13486 if(type->kind == 8)
13488 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
13490 type = prop->dataType;
13493 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
13495 type = dataMember->dataType;
13498 else if(type->kind == 9 || type->kind == 10)
13500 struct Type * memberType;
13502 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13504 if(!strcmp(memberType->name, ident->string))
13515 FreeType(value->destType);
13516 value->destType = type;
13519 ComputeExpression(value);
13521 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
13523 if(type->kind == 8)
13525 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13527 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
13529 if(!_class->dataType)
13530 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13531 type = _class->dataType;
13536 void * ptr = inst->data + dataMemberOffset;
13538 if(value->type == 2)
13544 GetInt(value, (int *)ptr);
13549 GetInt64(value, (long long *)ptr);
13554 GetIntPtr(value, (intptr_t *)ptr);
13559 GetIntSize(value, (ssize_t *)ptr);
13564 GetFloat(value, (float *)ptr);
13569 GetDouble(value, (double *)ptr);
13574 else if(value->type == 1)
13576 if(type->kind == 8)
13578 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13580 if(_class->type == 1)
13582 ComputeTypeSize(type);
13583 if(value->__anon1.instance->data)
13584 memcpy(ptr, value->__anon1.instance->data, type->size);
13589 else if(prop && prop->Set != (void *)(intptr_t)1)
13591 if(value->type == 1 && value->__anon1.instance->data)
13593 if(type->kind == 8)
13595 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13597 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)))
13599 void (* Set)(void *, void *) = (void *)prop->Set;
13601 Set(inst->data, value->__anon1.instance->data);
13602 PopulateInstance(inst);
13606 else if(value->type == 2)
13612 void (* Set)(void *, double) = (void *)prop->Set;
13614 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
13619 void (* Set)(void *, float) = (void *)prop->Set;
13621 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
13626 void (* Set)(void *, int) = (void *)prop->Set;
13628 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
13633 void (* Set)(void *, long long) = (void *)prop->Set;
13635 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13640 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13642 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13647 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13649 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
13654 else if(value->type == 3)
13658 ReadString(temp, value->__anon1.__anon2.string);
13659 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
13663 else if(!deepMember && type && _class->type == 3)
13667 if(value->type == 2)
13669 if(type->kind == 8)
13671 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13673 if(_class->type == 3)
13675 if(!_class->dataType)
13676 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13677 type = _class->dataType;
13685 float (* Set)(float) = (void *)prop->Set;
13687 GetFloat(member->initializer->__anon1.exp, &fValue);
13688 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
13695 double (* Set)(double) = (void *)prop->Set;
13697 GetDouble(member->initializer->__anon1.exp, &dValue);
13698 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
13706 else if(!deepMember && type && _class->type == 2)
13710 if(value->type == 1 && value->__anon1.instance->data)
13712 unsigned int (* Set)(void *) = (void *)prop->Set;
13714 bits = Set(value->__anon1.instance->data);
13716 else if(value->type == 2)
13720 else if(dataMember)
13722 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
13723 struct Type * type;
13726 bits = (bits & ~bitMember->mask);
13727 if(!bitMember->dataType)
13728 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
13729 type = bitMember->dataType;
13730 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13732 if(!type->__anon1._class->__anon1.registered->dataType)
13733 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
13734 type = type->__anon1._class->__anon1.registered->dataType;
13743 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
13751 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
13760 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
13768 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
13776 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
13784 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
13789 bits |= part << bitMember->pos;
13795 if(_class && _class->type == 3)
13797 ComputeExpression(member->initializer->__anon1.exp);
13798 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
13800 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
13810 if(_class && _class->type == 2)
13812 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13817 FreeInstance(inst);
13821 void ComputeExpression(struct Expression * exp)
13827 struct Identifier * id = exp->__anon1.__anon1.identifier;
13829 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
13831 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
13833 if(c && c->type == 4)
13835 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13839 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13840 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13842 for(value = e->values.first; value; value = value->next)
13844 if(!strcmp(value->name, id->string))
13849 const char * dts = c->dataTypeString;
13851 FreeExpContents(exp);
13853 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13862 ComputeInstantiation(exp);
13867 struct Expression * exp1, * exp2 = (((void *)0));
13868 struct Operand op1 =
13875 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
13878 struct Operand op2 =
13885 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
13889 if(exp->__anon1.op.exp2)
13891 struct Expression * e = exp->__anon1.op.exp2;
13893 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13895 if(e->type == 5 || e->type == 32 || e->type == 23)
13898 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13900 e = (*e->__anon1.list).last;
13903 if(exp->__anon1.op.op == 261 && e && e->expType)
13905 if(e->type == 3 && e->__anon1.__anon2.string)
13907 char * string = e->__anon1.__anon2.string;
13908 int len = strlen(string);
13909 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13911 len = UnescapeString(tmp, string + 1, len - 2);
13912 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13913 FreeExpContents(exp);
13915 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13919 struct Type * type = e->expType;
13922 FreeExpContents(exp);
13924 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13930 ComputeExpression(exp->__anon1.op.exp2);
13932 if(exp->__anon1.op.exp1)
13934 ComputeExpression(exp->__anon1.op.exp1);
13935 exp1 = exp->__anon1.op.exp1;
13936 exp2 = exp->__anon1.op.exp2;
13937 op1 = GetOperand(exp1);
13939 op1.type->refCount++;
13942 op2 = GetOperand(exp2);
13944 op2.type->refCount++;
13949 exp1 = exp->__anon1.op.exp2;
13950 op1 = GetOperand(exp1);
13952 op1.type->refCount++;
13954 CallOperator(exp, exp1, exp2, &op1, &op2);
13956 FreeType(op1.type);
13958 FreeType(op2.type);
13964 struct Expression * e, * n;
13966 for(e = (*exp->__anon1.list).first; e; e = n)
13971 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13972 struct Expression * prev = exp->prev;
13973 struct Expression * next = exp->next;
13975 if(exp->expType && exp->expType->kind == 8 && (!e->expType || e->expType->kind != 8))
13977 FreeType(e->expType);
13978 e->expType = exp->expType;
13979 e->expType->refCount++;
13981 ComputeExpression(e);
13982 FreeType(exp->expType);
13983 FreeType(exp->destType);
13987 ((e ? __extension__ ({
13988 void * __ecerePtrToDelete = (e);
13990 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13992 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
14003 struct Expression * memberExp = exp->__anon1.member.exp;
14004 struct Identifier * memberID = exp->__anon1.member.member;
14005 struct Type * type;
14007 ComputeExpression(exp->__anon1.member.exp);
14008 type = exp->__anon1.member.exp->expType;
14011 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)));
14012 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
14013 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
14014 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
14016 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
14017 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
14021 struct Symbol * classSym;
14024 PrintTypeNoConst(type, string, 0, 1);
14025 classSym = FindClass(string);
14026 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14028 if(exp->__anon1.member.member)
14030 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
14032 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
14034 if(!prop && !member && _class && exp->__anon1.member.member)
14036 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
14038 convertTo = _class;
14039 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14040 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
14046 struct Type * type = prop->dataType;
14048 if(_class->type == 3)
14050 if(type->kind == 8)
14052 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14054 if(_class->type == 3)
14056 if(!_class->dataType)
14057 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14058 type = _class->dataType;
14066 float (* Get)(float) = (void *)prop->Get;
14068 GetFloat(exp->__anon1.member.exp, &value);
14069 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
14076 double (* Get)(double);
14078 GetDouble(exp->__anon1.member.exp, &value);
14080 Get = (void *)prop->Set;
14082 Get = (void *)prop->Get;
14083 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
14093 struct Expression * value = exp->__anon1.member.exp;
14094 struct Type * type;
14096 if(!prop->dataType)
14097 ProcessPropertyType(prop);
14098 type = prop->dataType;
14102 else if(_class->type == 1)
14108 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
14110 if(propertyClass->type == 1 && value->type == 1)
14112 void (* Set)(void *, void *) = (void *)prop->Set;
14114 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14115 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14116 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14117 exp->__anon1.instance->loc = exp->loc;
14119 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
14120 PopulateInstance(exp->__anon1.instance);
14127 void (* Set)(void *, int) = (void *)prop->Set;
14129 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14130 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14131 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14132 exp->__anon1.instance->loc = exp->loc;
14134 GetInt(value, &intValue);
14135 Set(exp->__anon1.instance->data, intValue);
14136 PopulateInstance(exp->__anon1.instance);
14141 long long intValue;
14142 void (* Set)(void *, long long) = (void *)prop->Set;
14144 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14145 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14146 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14147 exp->__anon1.instance->loc = exp->loc;
14149 GetInt64(value, &intValue);
14150 Set(exp->__anon1.instance->data, intValue);
14151 PopulateInstance(exp->__anon1.instance);
14157 void (* Set)(void *, intptr_t) = (void *)prop->Set;
14159 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14160 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14161 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14162 exp->__anon1.instance->loc = exp->loc;
14164 GetIntPtr(value, &intValue);
14165 Set(exp->__anon1.instance->data, intValue);
14166 PopulateInstance(exp->__anon1.instance);
14172 void (* Set)(void *, ssize_t) = (void *)prop->Set;
14174 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14175 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14176 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14177 exp->__anon1.instance->loc = exp->loc;
14179 GetIntSize(value, &intValue);
14180 Set(exp->__anon1.instance->data, intValue);
14181 PopulateInstance(exp->__anon1.instance);
14187 void (* Set)(void *, float) = (void *)prop->Set;
14189 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14190 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14191 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14192 exp->__anon1.instance->loc = exp->loc;
14194 GetFloat(value, &floatValue);
14195 Set(exp->__anon1.instance->data, floatValue);
14196 PopulateInstance(exp->__anon1.instance);
14201 double doubleValue;
14202 void (* Set)(void *, double) = (void *)prop->Set;
14204 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14205 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14206 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14207 exp->__anon1.instance->loc = exp->loc;
14209 GetDouble(value, &doubleValue);
14210 Set(exp->__anon1.instance->data, doubleValue);
14211 PopulateInstance(exp->__anon1.instance);
14216 else if(_class->type == 2)
14222 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
14224 if(propertyClass->type == 1 && value->__anon1.instance->data)
14226 unsigned int (* Set)(void *) = (void *)prop->Set;
14227 unsigned int bits = Set(value->__anon1.instance->data);
14229 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
14233 else if(_class->type == 2)
14235 unsigned int value;
14236 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
14239 GetUInt(exp->__anon1.member.exp, &value);
14241 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
14250 if(_class->type == 2)
14252 unsigned int value;
14254 GetUInt(exp->__anon1.member.exp, &value);
14259 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14261 if(_class->type == 1)
14263 void (* Get)(unsigned int, void *) = (void *)prop->Get;
14265 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14266 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14267 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14268 exp->__anon1.instance->loc = exp->loc;
14270 Get(value, exp->__anon1.instance->data);
14271 PopulateInstance(exp->__anon1.instance);
14273 else if(_class->type == 2)
14275 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
14276 uint64 bits = Get(value);
14278 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
14285 else if(_class->type == 1)
14287 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
14293 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14295 if(_class->type == 1 && value)
14297 void (* Get)(void *, void *) = (void *)prop->Get;
14299 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
14300 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
14301 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
14302 exp->__anon1.instance->loc = exp->loc;
14304 Get(value, exp->__anon1.instance->data);
14305 PopulateInstance(exp->__anon1.instance);
14316 exp->isConstant = 0;
14325 FreeExpression(memberExp);
14326 FreeIdentifier(memberID);
14332 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
14334 FreeExpContents(exp);
14335 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
14342 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
14344 if(classSym && classSym->__anon1.registered)
14346 if(classSym->__anon1.registered->fixed)
14348 FreeSpecifier(exp->__anon1._class);
14349 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
14354 char className[1024];
14356 strcpy(className, "__ecereClass_");
14357 FullClassNameCat(className, classSym->string, 1);
14358 DeclareClass(curExternal, classSym, className);
14359 FreeExpContents(exp);
14361 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
14362 exp->__anon1.member.member = MkIdentifier("structSize");
14369 struct Type * type;
14370 struct Expression * e = exp;
14372 if(exp->type == 11)
14374 if(exp->__anon1.cast.exp)
14375 ComputeExpression(exp->__anon1.cast.exp);
14376 e = exp->__anon1.cast.exp;
14378 if(e && exp->expType)
14380 type = exp->expType;
14381 if(type->kind == 8)
14383 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
14385 if(_class && (_class->type == 3 || _class->type == 2))
14387 if(!_class->dataType)
14388 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14389 type = _class->dataType;
14400 if(GetChar(e, &value))
14402 FreeExpContents(exp);
14403 exp->__anon1.__anon1.constant = PrintChar(value);
14409 unsigned char value = 0;
14411 if(GetUChar(e, &value))
14413 FreeExpContents(exp);
14414 exp->__anon1.__anon1.constant = PrintUChar(value);
14424 if(GetShort(e, &value))
14426 FreeExpContents(exp);
14427 exp->__anon1.__anon1.constant = PrintShort(value);
14433 unsigned short value = 0;
14435 if(GetUShort(e, &value))
14437 FreeExpContents(exp);
14438 exp->__anon1.__anon1.constant = PrintUShort(value);
14448 if(GetInt(e, &value))
14450 FreeExpContents(exp);
14451 exp->__anon1.__anon1.constant = PrintInt(value);
14457 unsigned int value = 0;
14459 if(GetUInt(e, &value))
14461 FreeExpContents(exp);
14462 exp->__anon1.__anon1.constant = PrintUInt(value);
14470 long long value = 0;
14472 if(GetInt64(e, &value))
14474 FreeExpContents(exp);
14475 exp->__anon1.__anon1.constant = PrintInt64(value);
14483 if(GetUInt64(e, &value))
14485 FreeExpContents(exp);
14486 exp->__anon1.__anon1.constant = PrintUInt64(value);
14494 intptr_t value = 0;
14496 if(GetIntPtr(e, &value))
14498 FreeExpContents(exp);
14499 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
14505 uintptr_t value = 0;
14507 if(GetUIntPtr(e, &value))
14509 FreeExpContents(exp);
14510 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
14520 if(GetIntSize(e, &value))
14522 FreeExpContents(exp);
14523 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
14531 if(GetUIntSize(e, &value))
14533 FreeExpContents(exp);
14534 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
14543 if(GetFloat(e, &value))
14545 FreeExpContents(exp);
14546 exp->__anon1.__anon1.constant = PrintFloat(value);
14555 if(GetDouble(e, &value))
14557 FreeExpContents(exp);
14558 exp->__anon1.__anon1.constant = PrintDouble(value);
14569 struct Operand op1 =
14576 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
14579 struct Operand op2 =
14586 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
14589 struct Operand op3 =
14596 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
14600 if(exp->__anon1.cond.exp)
14601 ComputeExpression((*exp->__anon1.cond.exp).last);
14602 if(exp->__anon1.cond.elseExp)
14603 ComputeExpression(exp->__anon1.cond.elseExp);
14604 if(exp->__anon1.cond.cond)
14605 ComputeExpression(exp->__anon1.cond.cond);
14606 op1 = GetOperand(exp->__anon1.cond.cond);
14608 op1.type->refCount++;
14609 op2 = GetOperand((*exp->__anon1.cond.exp).last);
14611 op2.type->refCount++;
14612 op3 = GetOperand(exp->__anon1.cond.elseExp);
14614 op3.type->refCount++;
14617 FreeExpContents(exp);
14618 op1.ops.Cond(exp, &op1, &op2, &op3);
14621 FreeType(op1.type);
14623 FreeType(op2.type);
14625 FreeType(op3.type);
14631 static void ProcessFunction(struct FunctionDefinition * function);
14633 void ProcessInstantiationType(struct Instantiation * inst)
14635 yylloc = inst->loc;
14638 struct MembersInit * members;
14639 struct Symbol * classSym;
14640 struct __ecereNameSpace__ecere__com__Class * _class;
14642 classSym = inst->_class->__anon1.__anon1.symbol;
14643 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14644 if(!_class || _class->type != 5)
14645 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14646 afterExternal = afterExternal ? afterExternal : curExternal;
14648 ProcessExpressionType(inst->exp);
14649 inst->isConstant = 1;
14652 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14653 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14654 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14655 int subMemberStackPos = 0;
14657 for(members = (*inst->members).first; members; members = members->next)
14659 switch(members->type)
14664 static unsigned int instMethodID = 0;
14665 struct External * external = curExternal;
14666 struct Context * context = curContext;
14667 struct Declarator * declarator = members->__anon1.function->declarator;
14668 struct Identifier * nameID = GetDeclId(declarator);
14669 char * unmangled = nameID ? nameID->string : (((void *)0));
14670 struct Expression * exp;
14671 struct External * createdExternal = (((void *)0));
14677 strcpy(name, "__ecereInstMeth_");
14678 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14680 strcat(name, nameID->string);
14682 sprintf(number, "_%08d", instMethodID++);
14683 strcat(name, number);
14684 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14688 struct Symbol * symbol = declarator->symbol;
14689 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14691 if(method && method->type == 1)
14693 symbol->__anon1.method = method;
14694 ProcessMethodType(method);
14695 if(!symbol->type->__anon1.__anon2.thisClass)
14697 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14699 if(!currentClass->symbol)
14700 currentClass->symbol = FindClass(currentClass->fullName);
14701 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14705 if(!_class->symbol)
14706 _class->symbol = FindClass(_class->fullName);
14707 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14710 DeclareType(curExternal, symbol->type, 1, 1);
14714 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14717 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14720 FreeSpecifier(nameID->_class);
14721 nameID->_class = (((void *)0));
14723 curExternal = createdExternal;
14726 if(createdExternal->__anon1.function)
14727 ProcessFunction(createdExternal->__anon1.function);
14729 else if(declarator)
14731 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14732 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14734 curExternal = external;
14735 curContext = context;
14738 FreeClassFunction(members->__anon1.function);
14739 exp = QMkExpId(name);
14741 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14742 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14748 if(members->__anon1.dataMembers && classSym)
14750 struct MemberInit * member;
14751 struct Location oldyyloc = yylloc;
14753 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14755 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14756 if(member->initializer && !member->initializer->isConstant)
14757 inst->isConstant = 0;
14769 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14771 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14777 if(spec->__anon1.specifier == THISCLASS)
14782 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14783 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14784 ProcessSpecifier(spec, declareStruct, 0);
14791 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14794 DeclareType(curExternal, symbol->type, 1, 1);
14795 else if(spec->__anon1.__anon1.symbol)
14797 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14799 if(warnClasses && !c)
14800 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14801 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14807 struct Enumerator * e;
14809 if(spec->__anon1.__anon2.list)
14811 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14814 ProcessExpressionType(e->exp);
14823 if(spec->__anon1.__anon2.definitions)
14825 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14827 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14834 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14839 if(decl->__anon1.identifier->classSym)
14841 FreeSpecifier(decl->__anon1.identifier->_class);
14842 decl->__anon1.identifier->_class = (((void *)0));
14846 if(decl->__anon1.array.exp)
14847 ProcessExpressionType(decl->__anon1.array.exp);
14855 struct Identifier * id = (((void *)0));
14856 struct Specifier * classSpec = (((void *)0));
14858 if(decl->type == 4)
14860 id = GetDeclId(decl);
14861 if(id && id->_class)
14863 classSpec = id->_class;
14864 id->_class = (((void *)0));
14867 if(decl->declarator)
14868 ProcessDeclarator(decl->declarator, isFunction);
14869 if(decl->type == 4)
14873 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14875 if(!decl->__anon1.function.parameters)
14876 decl->__anon1.function.parameters = MkList();
14877 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14879 if(decl->__anon1.function.parameters)
14881 struct TypeName * param;
14883 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14885 if(param->qualifiers)
14887 struct Specifier * spec;
14889 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14891 if(spec->type == 0)
14893 if(spec->__anon1.specifier == TYPED_OBJECT)
14895 struct Declarator * d = param->declarator;
14896 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);
14898 if(!d || d->type != 5)
14899 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14900 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14901 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14902 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14903 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14904 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14908 else if(spec->__anon1.specifier == ANY_OBJECT)
14910 struct Declarator * d = param->declarator;
14912 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14913 param->qualifiers = MkListOne(MkSpecifier(VOID));
14914 if(!d || d->type != 5)
14915 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14916 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14919 else if(spec->__anon1.specifier == THISCLASS)
14924 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14925 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14926 ProcessSpecifier(spec, 0, 0);
14931 else if(spec->type == 1)
14933 ProcessSpecifier(spec, isFunction, 1);
14935 else if((spec->type == 3 || spec->type == 4) && !spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && spec->__anon1.__anon2.id->string)
14937 struct Declarator * d = param->declarator;
14939 if(!d || d->type != 5)
14940 DeclareStruct(curExternal, spec->__anon1.__anon2.id->string, 0, 1);
14944 if(param->declarator)
14945 ProcessDeclarator(param->declarator, 0);
14954 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14956 yylloc = decl->loc;
14961 unsigned int declareStruct = 0;
14963 if(decl->__anon1.__anon1.declarators)
14965 struct InitDeclarator * d;
14967 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14969 struct Type * type, * subType;
14971 ProcessDeclarator(d->declarator, 0);
14972 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14975 ProcessInitializer(d->initializer, type);
14976 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14978 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14980 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14982 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14983 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14984 if(decl->__anon1.__anon1.specifiers)
14985 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14986 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14989 decl->__anon1.inst = inst;
14993 for(subType = type; subType; )
14995 if(subType->kind == 8)
15000 else if(subType->kind == 13)
15002 else if(subType->kind == 12)
15003 subType = subType->__anon1.__anon4.arrayType;
15012 if(decl->__anon1.__anon1.specifiers)
15014 struct Specifier * s;
15016 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
15018 ProcessSpecifier(s, declareStruct, 1);
15025 ProcessInstantiationType(decl->__anon1.inst);
15030 struct Specifier * spec;
15031 struct Declarator * d;
15032 unsigned int declareStruct = 0;
15034 if(decl->__anon1.__anon1.declarators)
15036 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
15038 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
15039 struct Type * subType;
15041 ProcessDeclarator(d, 0);
15042 for(subType = type; subType; )
15044 if(subType->kind == 8)
15049 else if(subType->kind == 13)
15051 else if(subType->kind == 12)
15052 subType = subType->__anon1.__anon4.arrayType;
15059 if(decl->__anon1.__anon1.specifiers)
15061 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
15062 ProcessSpecifier(spec, declareStruct, warnClasses);
15069 static void ProcessStatement(struct Statement * stmt)
15071 yylloc = stmt->loc;
15075 ProcessStatement(stmt->__anon1.labeled.stmt);
15078 if(stmt->__anon1.caseStmt.exp)
15080 FreeType(stmt->__anon1.caseStmt.exp->destType);
15081 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
15083 curSwitchType->refCount++;
15084 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
15085 ComputeExpression(stmt->__anon1.caseStmt.exp);
15087 if(stmt->__anon1.caseStmt.stmt)
15088 ProcessStatement(stmt->__anon1.caseStmt.stmt);
15092 if(stmt->__anon1.compound.context)
15094 struct Declaration * decl;
15095 struct Statement * s;
15096 struct Statement * prevCompound = curCompound;
15097 struct Context * prevContext = curContext;
15099 if(!stmt->__anon1.compound.isSwitch)
15100 curCompound = stmt;
15101 curContext = stmt->__anon1.compound.context;
15102 if(stmt->__anon1.compound.declarations)
15104 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
15105 ProcessDeclaration(decl, 1);
15107 if(stmt->__anon1.compound.statements)
15109 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
15110 ProcessStatement(s);
15112 curContext = prevContext;
15113 curCompound = prevCompound;
15119 struct Expression * exp;
15121 if(stmt->__anon1.expressions)
15123 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15124 ProcessExpressionType(exp);
15130 struct Expression * exp;
15132 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
15133 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
15134 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
15135 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
15137 ProcessExpressionType(exp);
15139 if(stmt->__anon1.ifStmt.stmt)
15140 ProcessStatement(stmt->__anon1.ifStmt.stmt);
15141 if(stmt->__anon1.ifStmt.elseStmt)
15142 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
15147 struct Type * oldSwitchType = curSwitchType;
15149 if(stmt->__anon1.switchStmt.exp)
15151 struct Expression * exp;
15153 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
15157 ProcessExpressionType(exp);
15160 curSwitchType = exp->expType;
15163 ProcessStatement(stmt->__anon1.switchStmt.stmt);
15164 curSwitchType = oldSwitchType;
15169 if(stmt->__anon1.whileStmt.exp)
15171 struct Expression * exp;
15173 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
15174 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
15175 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
15176 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
15178 ProcessExpressionType(exp);
15181 if(stmt->__anon1.whileStmt.stmt)
15182 ProcessStatement(stmt->__anon1.whileStmt.stmt);
15187 if(stmt->__anon1.doWhile.exp)
15189 struct Expression * exp;
15191 if((*stmt->__anon1.doWhile.exp).last)
15193 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
15194 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
15195 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
15197 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
15199 ProcessExpressionType(exp);
15202 if(stmt->__anon1.doWhile.stmt)
15203 ProcessStatement(stmt->__anon1.doWhile.stmt);
15208 struct Expression * exp;
15210 if(stmt->__anon1.forStmt.init)
15211 ProcessStatement(stmt->__anon1.forStmt.init);
15212 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
15214 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
15215 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
15216 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
15218 if(stmt->__anon1.forStmt.check)
15219 ProcessStatement(stmt->__anon1.forStmt.check);
15220 if(stmt->__anon1.forStmt.increment)
15222 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
15223 ProcessExpressionType(exp);
15225 if(stmt->__anon1.forStmt.stmt)
15226 ProcessStatement(stmt->__anon1.forStmt.stmt);
15231 struct Identifier * id = stmt->__anon1.forEachStmt.id;
15232 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
15233 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
15234 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
15235 char iteratorType[1024];
15236 struct Type * source;
15237 struct Expression * e;
15238 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));
15239 struct Expression * arrayExp;
15240 const char * typeString = (((void *)0));
15241 int builtinCount = 0;
15243 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15247 FreeType(e->destType);
15248 e->destType = ProcessTypeString("Container", 0);
15250 if(!isBuiltin || e->next)
15251 ProcessExpressionType(e);
15253 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15254 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)))
15256 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15257 struct Symbol * symbol;
15258 struct Expression * expIt = (((void *)0));
15259 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15260 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15261 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15262 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15267 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15268 stmt->__anon1.compound.context->parent = curContext;
15269 curContext = stmt->__anon1.compound.context;
15271 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15273 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15275 isCustomAVLTree = 1;
15276 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15279 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15281 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15283 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15286 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15288 if(inCompiler && isArray)
15290 struct Declarator * decl;
15291 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15293 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15294 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15295 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15299 struct Type * type = (((void *)0));
15300 char typeStringBuf[1024];
15302 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15303 if(((struct Expression *)(*exp).last)->type == 11)
15305 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15308 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15310 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)
15312 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15314 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15316 else if(arrayExp->__anon1.list)
15318 struct Expression * e;
15320 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15322 ProcessExpressionType(e);
15332 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15336 e->expType = (((void *)0));
15337 e = (*arrayExp->__anon1.list).first;
15338 ProcessExpressionType(e);
15341 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15343 FreeType(e->expType);
15344 e->expType = (((void *)0));
15346 type = (((void *)0));
15354 FreeType(e->expType);
15355 e->expType = (((void *)0));
15361 typeStringBuf[0] = '\0';
15362 PrintType(type, typeStringBuf, 0, 1);
15363 typeString = typeStringBuf;
15371 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15372 struct Declarator * decl;
15373 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15375 if(arrayExp->__anon1.list)
15377 struct Expression * e;
15379 builtinCount = (*arrayExp->__anon1.list).count;
15380 type = ProcessTypeString(typeString, 0);
15381 while((e = (*arrayExp->__anon1.list).first))
15383 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15384 e->destType = type;
15386 ProcessExpressionType(e);
15388 ListAdd(initializers, MkInitializerAssignment(e));
15391 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15393 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15394 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15395 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15396 FreeList(exp, (void *)(FreeExpression));
15398 else if(arrayExp->__anon1.list)
15400 struct Expression * e;
15402 type = ProcessTypeString(typeString, 0);
15403 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15405 e->destType = type;
15407 ProcessExpressionType(e);
15414 arrayExp->expType = ProcessTypeString("Container", 0);
15415 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15418 else if(inCompiler && isLinkList && !isList)
15420 struct Declarator * decl;
15421 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15423 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15424 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15425 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15427 else if(inCompiler && _class->templateArgs)
15430 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15432 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15433 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)))))))));
15437 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15440 switch(block->type)
15443 if(block->__anon1.compound.context)
15444 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15447 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15448 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15449 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15450 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15453 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15454 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15457 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15458 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15461 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15462 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15465 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15466 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15469 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15470 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15476 block = MkIfStmt(filter, block, (((void *)0)));
15480 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));
15481 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15482 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15483 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15489 sprintf(count, "%d", builtinCount);
15490 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));
15491 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15492 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15493 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15495 else if(isLinkList && !isList)
15497 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15498 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15500 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15502 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));
15506 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15507 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15509 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));
15511 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15512 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15513 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15517 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15519 ProcessExpressionType(expIt);
15520 if((*stmt->__anon1.compound.declarations).first)
15521 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15523 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15524 ProcessStatement(stmt);
15527 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15529 curContext = stmt->__anon1.compound.context->parent;
15534 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15546 struct Expression * exp;
15548 if(stmt->__anon1.expressions)
15550 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15554 if(curFunction && !curFunction->type)
15555 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15556 FreeType(exp->destType);
15557 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15559 exp->destType->refCount++;
15561 ProcessExpressionType(exp);
15568 ProcessDeclaration(stmt->__anon1.decl, 1);
15573 struct AsmField * field;
15575 if(stmt->__anon1.asmStmt.inputFields)
15577 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15578 if(field->expression)
15579 ProcessExpressionType(field->expression);
15581 if(stmt->__anon1.asmStmt.outputFields)
15583 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15584 if(field->expression)
15585 ProcessExpressionType(field->expression);
15587 if(stmt->__anon1.asmStmt.clobberedFields)
15589 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15591 if(field->expression)
15592 ProcessExpressionType(field->expression);
15599 struct PropertyWatch * propWatch;
15600 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15601 struct Expression * object = stmt->__anon1._watch.object;
15602 struct Expression * watcher = stmt->__anon1._watch.watcher;
15605 ProcessExpressionType(watcher);
15607 ProcessExpressionType(object);
15610 if(watcher || thisClass)
15612 struct External * external = curExternal;
15613 struct Context * context = curContext;
15616 stmt->__anon1.expressions = MkList();
15617 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15619 struct ClassFunction * func;
15620 char watcherName[1024];
15621 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;
15622 struct External * createdExternal;
15624 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15625 if(propWatch->deleteWatch)
15626 strcat(watcherName, "_delete");
15629 struct Identifier * propID;
15631 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15633 strcat(watcherName, "_");
15634 strcat(watcherName, propID->string);
15637 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15639 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)));
15640 ProcessClassFunctionBody(func, propWatch->compound);
15641 propWatch->compound = (((void *)0));
15642 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15643 FreeClassFunction(func);
15644 curExternal = createdExternal;
15645 ProcessFunction(createdExternal->__anon1.function);
15646 if(propWatch->deleteWatch)
15648 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15650 ListAdd(args, CopyExpression(object));
15651 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15652 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15653 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15657 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15658 struct Identifier * propID;
15660 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15662 char propName[1024];
15663 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15667 char getName[1024], setName[1024];
15668 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15670 DeclareProperty(createdExternal, prop, setName, getName);
15671 strcpy(propName, "__ecereProp_");
15672 FullClassNameCat(propName, prop->_class->fullName, 0);
15673 strcat(propName, "_");
15674 FullClassNameCat(propName, prop->name, 1);
15675 ListAdd(args, CopyExpression(object));
15676 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15677 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15678 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15679 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15680 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15683 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15688 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15690 curExternal = external;
15691 curContext = context;
15693 FreeExpression(watcher);
15695 FreeExpression(object);
15696 FreeList(watches, (void *)(FreePropertyWatch));
15699 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15703 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15705 ProcessStatement(propWatch->compound);
15712 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15713 struct Expression * object = stmt->__anon1._watch.object;
15714 struct __ecereNameSpace__ecere__com__Class * _class;
15717 ProcessExpressionType(object);
15720 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15723 struct Identifier * propID;
15726 stmt->__anon1.expressions = MkList();
15727 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15729 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15736 for(propID = (*watches).first; propID; propID = propID->next)
15738 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15742 CreateFireWatcher(prop, object, stmt);
15745 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15750 struct __ecereNameSpace__ecere__com__Property * prop;
15751 struct __ecereNameSpace__ecere__com__Class * base;
15753 for(base = _class; base; base = base->base)
15755 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15757 if(prop->isProperty && prop->isWatchable)
15759 CreateFireWatcher(prop, object, stmt);
15765 FreeExpression(object);
15766 FreeList(watches, (void *)(FreeIdentifier));
15769 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15775 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15776 struct Expression * object = stmt->__anon1._watch.object;
15777 struct Expression * watcher = stmt->__anon1._watch.watcher;
15778 struct __ecereNameSpace__ecere__com__Class * _class;
15781 ProcessExpressionType(object);
15783 ProcessExpressionType(watcher);
15786 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15787 if(watcher || thisClass)
15791 struct Identifier * propID;
15794 stmt->__anon1.expressions = MkList();
15797 struct __ecereNameSpace__ecere__sys__OldList * args;
15800 ListAdd(args, CopyExpression(object));
15801 ListAdd(args, MkExpConstant("0"));
15802 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15803 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15807 for(propID = (*watches).first; propID; propID = propID->next)
15809 char propName[1024];
15810 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15814 char getName[1024], setName[1024];
15815 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15817 DeclareProperty(curExternal, prop, setName, getName);
15818 strcpy(propName, "__ecereProp_");
15819 FullClassNameCat(propName, prop->_class->fullName, 0);
15820 strcat(propName, "_");
15821 FullClassNameCat(propName, prop->name, 1);
15822 ListAdd(args, CopyExpression(object));
15823 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15824 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15825 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15828 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15832 FreeExpression(object);
15834 FreeExpression(watcher);
15835 FreeList(watches, (void *)(FreeIdentifier));
15838 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15841 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15848 void ComputeDataTypes()
15850 struct External * external;
15852 currentClass = (((void *)0));
15853 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15854 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15855 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15856 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15857 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15858 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15859 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15860 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15861 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15862 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15863 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15864 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15865 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15866 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15867 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15868 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15869 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15870 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15871 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15872 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15873 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15875 for(external = (*ast).first; external; external = external->next)
15877 afterExternal = curExternal = external;
15878 if(external->type == 0)
15882 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15883 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15885 currentClass = external->__anon1.function->_class;
15886 ProcessFunction(external->__anon1.function);
15888 else if(external->type == 1)
15890 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15892 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15893 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15895 currentClass = (((void *)0));
15896 if(external->__anon1.declaration)
15897 ProcessDeclaration(external->__anon1.declaration, 1);
15899 else if(external->type == 2)
15901 struct ClassDefinition * _class = external->__anon1._class;
15903 currentClass = external->symbol->__anon1.registered;
15906 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15907 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15909 if(_class->definitions)
15911 ProcessClass(_class->definitions, _class->symbol);
15915 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15916 ((external ? __extension__ ({
15917 void * __ecerePtrToDelete = (external);
15919 __ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
15920 }) : 0), external = 0);
15923 else if(external->type == 4)
15925 thisNameSpace = external->__anon1.id->string;
15928 currentClass = (((void *)0));
15929 thisNameSpace = (((void *)0));
15930 curExternal = (((void *)0));
15933 void ProcessExpressionType(struct Expression * exp)
15935 unsigned int unresolved = 0;
15936 struct Location oldyylloc = yylloc;
15937 unsigned int notByReference = 0;
15939 if(!exp || exp->expType)
15946 struct Identifier * id = exp->__anon1.__anon1.identifier;
15948 if(!id || !topContext)
15950 if(id->_class && id->_class->__anon1.__anon1.name)
15952 id->classSym = id->_class->__anon1.__anon1.symbol;
15954 if(!strcmp(id->string, "__runtimePlatform"))
15956 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15959 else if(strstr(id->string, "__ecereClass") == id->string)
15961 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15964 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15966 ReplaceClassMembers(exp, thisClass);
15969 ProcessExpressionType(exp);
15972 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15977 struct Symbol * symbol = (((void *)0));
15978 unsigned int findInGlobal = 0;
15980 if(!topContext->parent && exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered->type == 4)
15983 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15986 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15990 if(thisClass && strcmp(id->string, "this"))
15992 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15995 ProcessExpressionType(exp);
15999 else if(currentClass && !id->_class)
16001 if(ResolveIdWithClass(exp, currentClass, 1))
16004 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16008 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16011 struct Type * type = symbol->type;
16012 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
16014 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
16016 struct Context * context = SetupTemplatesContext(_class);
16018 type = ReplaceThisClassType(_class);
16019 FinishTemplatesContext(context);
16021 type->refCount = 0;
16023 FreeSpecifier(id->_class);
16024 id->_class = (((void *)0));
16025 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16026 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
16027 id->classSym = (((void *)0));
16028 exp->expType = type;
16031 if(type && (type->kind == 15))
16032 exp->isConstant = 1;
16033 if(symbol->isParam || !strcmp(id->string, "this"))
16035 if(_class && _class->type == 1 && !type->declaredWithStruct)
16036 exp->byReference = 1;
16038 if(symbol->isIterator)
16040 if(symbol->isIterator == 3)
16043 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
16044 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
16045 exp->expType = (((void *)0));
16046 ProcessExpressionType(exp);
16048 else if(symbol->isIterator != 4)
16051 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
16052 exp->__anon1.member.exp->expType = exp->expType;
16053 exp->__anon1.member.member = MkIdentifier("data");
16054 exp->expType = (((void *)0));
16055 ProcessExpressionType(exp);
16062 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
16064 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16068 strcpy(name, thisNameSpace);
16069 strcat(name, "::");
16070 strcat(name, id->string);
16071 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
16074 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
16079 for(c = 0; c < definedExpStackPos; c++)
16080 if(definedExpStack[c] == definedExp)
16082 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
16084 struct Location backupYylloc = yylloc;
16085 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
16087 definedExpStack[definedExpStackPos++] = definedExp;
16088 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
16090 int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count);
16092 __internal_VirtualMethod = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
16093 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
16095 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
16096 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write]);
16097 __internal_VirtualMethod ? __internal_VirtualMethod(fileInput, definedExp->value, 1, strlen(definedExp->value)) : (int)1;
16100 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode);
16102 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
16103 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
16105 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
16106 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek]);
16107 __internal_VirtualMethod ? __internal_VirtualMethod(fileInput, 0, 0) : (unsigned int)1;
16110 parsedExpression = (((void *)0));
16112 expression_yyparse();
16113 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
16115 fileInput = backInput;
16116 yylloc = backupYylloc;
16117 if(parsedExpression)
16119 FreeIdentifier(id);
16121 exp->__anon1.list = MkListOne(parsedExpression);
16122 ApplyLocation(parsedExpression, &yylloc);
16123 ProcessExpressionType(exp);
16124 definedExpStackPos--;
16127 definedExpStackPos--;
16133 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
16139 struct GlobalData * data = (((void *)0));
16141 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16145 strcpy(name, thisNameSpace);
16146 strcat(name, "::");
16147 strcat(name, id->string);
16148 data = FindGlobalData(name);
16151 data = FindGlobalData(id->string);
16154 DeclareGlobalData(curExternal, data);
16155 exp->expType = data->dataType;
16157 data->dataType->refCount++;
16158 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16159 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
16160 FreeSpecifier(id->_class);
16161 id->_class = (((void *)0));
16166 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
16168 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16172 strcpy(name, thisNameSpace);
16173 strcat(name, "::");
16174 strcat(name, id->string);
16175 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
16178 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
16183 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16184 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
16186 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
16187 strcpy(name, "__ecereFunction_");
16188 FullClassNameCat(name, id->string, 0);
16189 if(DeclareFunction(curExternal, function, name))
16191 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16192 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
16194 exp->expType = function->dataType;
16195 if(function->dataType)
16196 function->dataType->refCount++;
16197 FreeSpecifier(id->_class);
16198 id->_class = (((void *)0));
16210 if(!exp->__anon1.instance->_class)
16212 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
16214 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
16217 ProcessInstantiationType(exp->__anon1.instance);
16218 exp->isConstant = exp->__anon1.instance->isConstant;
16219 if(exp->__anon1.instance->_class)
16221 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
16229 char * constant = exp->__anon1.__anon1.constant;
16230 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
16232 exp->expType = type;
16233 if(constant[0] == '\'')
16235 if((int)((unsigned char *)constant)[1] > 127)
16238 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
16242 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
16243 exp->__anon1.__anon1.constant = PrintUInt(ch);
16245 type->__anon1._class = FindClass("unichar");
16246 type->isSigned = 0;
16251 type->isSigned = 1;
16256 char * dot = strchr(constant, '.');
16257 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
16262 exponent = strchr(constant, 'p');
16264 exponent = strchr(constant, 'P');
16268 exponent = strchr(constant, 'e');
16270 exponent = strchr(constant, 'E');
16272 if(dot || exponent)
16274 if(strchr(constant, 'f') || strchr(constant, 'F'))
16278 type->isSigned = 1;
16282 unsigned int isSigned = constant[0] == '-';
16283 char * endP = (((void *)0));
16284 long long i64 = strtoll(constant, &endP, 0);
16285 uint64 ui64 = strtoull(constant, &endP, 0);
16286 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16287 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16291 if(i64 < (((int)0x80000000)))
16296 if(ui64 > (((int)0x7fffffff)))
16298 if(ui64 > (0xffffffff))
16301 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16305 else if(constant[0] != '0' || !constant[1])
16310 type->kind = is64Bit ? 4 : 3;
16311 type->isSigned = isSigned;
16314 exp->isConstant = 1;
16315 if(exp->destType && exp->destType->kind == 7)
16317 else if(exp->destType && exp->destType->kind == 6)
16319 else if(exp->destType && exp->destType->kind == 4)
16326 exp->isConstant = 1;
16327 exp->expType = __extension__ ({
16328 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16330 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16331 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16333 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16334 }), __ecereInstance2;
16340 ProcessExpressionType(exp->__anon1._new.size);
16341 exp->expType = __extension__ ({
16342 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16344 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16346 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16350 ProcessExpressionType(exp->__anon1._renew.size);
16351 ProcessExpressionType(exp->__anon1._renew.exp);
16352 exp->expType = __extension__ ({
16353 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16355 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16357 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16361 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16362 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16363 unsigned int useDestType = 0, useSideType = 0;
16364 struct Location oldyylloc = yylloc;
16365 unsigned int useSideUnit = 0;
16366 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16367 unsigned int powerOp = 0, relationOp = 0;
16368 struct __ecereNameSpace__ecere__com__Class * c1 = (((void *)0)), * c2 = (((void *)0));
16369 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16371 switch(exp->__anon1.op.op)
16421 if(exp->__anon1.op.op == '/')
16426 if(exp->__anon1.op.exp1)
16430 if(exp->__anon1.op.op == '*')
16435 if(exp->__anon1.op.op == '&')
16437 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16439 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16440 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16442 if(symbol && symbol->isIterator == 2)
16445 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16446 exp->__anon1.member.member = MkIdentifier("key");
16447 exp->expType = (((void *)0));
16448 exp->__anon1.op.exp2->expType = symbol->type;
16449 symbol->type->refCount++;
16450 ProcessExpressionType(exp);
16456 if(exp->__anon1.op.exp1)
16458 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16460 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16462 if(exp->__anon1.op.exp1->destType)
16463 FreeType(exp->__anon1.op.exp1->destType);
16464 exp->__anon1.op.exp1->destType = exp->destType;
16465 exp->__anon1.op.exp1->opDestType = 1;
16467 exp->destType->refCount++;
16471 if(exp->__anon1.op.exp1->destType)
16472 FreeType(exp->__anon1.op.exp1->destType);
16473 exp->__anon1.op.exp1->destType = dummy;
16476 exp->__anon1.op.exp1->opDestType = 1;
16478 exp->__anon1.op.exp1->usedInComparison = 1;
16480 if(exp->__anon1.op.op == '+' || exp->__anon1.op.op == '-')
16482 if(exp->opDestType)
16483 exp->__anon1.op.exp1->parentOpDestType = 1;
16484 if(exp->usedInComparison)
16485 exp->__anon1.op.exp1->usedInComparison = 1;
16487 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16488 exp->__anon1.op.exp1->destType->count++;
16489 ProcessExpressionType(exp->__anon1.op.exp1);
16490 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16491 exp->__anon1.op.exp1->destType->count--;
16492 exp->__anon1.op.exp1->opDestType = 0;
16493 exp->__anon1.op.exp1->usedInComparison = 0;
16494 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)
16496 exp->__anon1.op.exp2 = MkExpConstant("1");
16497 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16500 if(exp->__anon1.op.exp1->destType == dummy)
16503 exp->__anon1.op.exp1->destType = (((void *)0));
16505 if(exp->__anon1.op.exp2)
16507 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16509 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
16511 FreeType(exp->__anon1.op.exp1->expType);
16512 exp->__anon1.op.exp1->expType = type;
16515 type1 = exp->__anon1.op.exp1->expType;
16517 if(exp->__anon1.op.exp2)
16519 char expString[10240];
16521 expString[0] = '\0';
16522 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16524 if(exp->__anon1.op.exp1)
16526 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16527 if(exp->__anon1.op.exp1->expType)
16528 exp->__anon1.op.exp1->expType->refCount++;
16532 exp->__anon1.op.exp2->destType = exp->destType;
16533 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16534 exp->__anon1.op.exp2->opDestType = 1;
16536 exp->destType->refCount++;
16540 exp->expType = type1;
16545 PrintExpression(exp->__anon1.op.exp2, expString);
16546 if(type1 && type1->kind == 13)
16548 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)
16549 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16550 else if(exp->__anon1.op.op == '=')
16552 if(exp->__anon1.op.exp2->destType)
16553 FreeType(exp->__anon1.op.exp2->destType);
16554 exp->__anon1.op.exp2->destType = type1;
16561 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)
16565 if(exp->__anon1.op.exp2->destType)
16566 FreeType(exp->__anon1.op.exp2->destType);
16567 exp->__anon1.op.exp2->destType = type1;
16574 exp->expType = type1;
16576 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16578 if(exp->__anon1.op.exp2->destType)
16579 FreeType(exp->__anon1.op.exp2->destType);
16580 exp->__anon1.op.exp2->destType = exp->destType;
16581 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16582 exp->__anon1.op.exp2->opDestType = 1;
16584 exp->destType->refCount++;
16588 if(exp->__anon1.op.exp2->destType)
16589 FreeType(exp->__anon1.op.exp2->destType);
16590 exp->__anon1.op.exp2->destType = dummy;
16593 exp->__anon1.op.exp2->opDestType = 1;
16595 exp->__anon1.op.exp2->usedInComparison = 1;
16597 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))
16599 FreeType(exp->__anon1.op.exp2->destType);
16600 exp->__anon1.op.exp2->destType = type1;
16603 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16604 exp->__anon1.op.exp2->destType->count++;
16605 if(exp->__anon1.op.op == SIZEOF)
16607 struct Expression * e = exp->__anon1.op.exp2;
16609 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16611 if(e->type == 5 || e->type == 32 || e->type == 23)
16614 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16616 e = (*e->__anon1.list).last;
16619 if(e->type == 11 && e->__anon1.cast.exp)
16620 e->__anon1.cast.exp->needCast = 1;
16622 if(exp->__anon1.op.op == '+' || exp->__anon1.op.op == '-')
16624 if(exp->opDestType)
16625 exp->__anon1.op.exp2->parentOpDestType = 1;
16626 if(exp->usedInComparison)
16627 exp->__anon1.op.exp2->usedInComparison = 1;
16629 ProcessExpressionType(exp->__anon1.op.exp2);
16630 exp->__anon1.op.exp2->opDestType = 0;
16631 exp->__anon1.op.exp2->usedInComparison = 0;
16632 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16633 exp->__anon1.op.exp2->destType->count--;
16634 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16636 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16638 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
16640 FreeType(exp->__anon1.op.exp2->expType);
16641 exp->__anon1.op.exp2->expType = type;
16644 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16646 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)
16648 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16649 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16651 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)))
16653 if(exp->__anon1.op.op == ADD_ASSIGN)
16654 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16656 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))
16658 if(exp->__anon1.op.op == ADD_ASSIGN)
16659 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16661 else if(inCompiler)
16663 char type1String[1024];
16664 char type2String[1024];
16666 type1String[0] = '\0';
16667 type2String[0] = '\0';
16668 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16669 PrintType(type1, type2String, 0, 1);
16670 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16671 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16674 if(exp->__anon1.op.exp2->destType == dummy)
16677 exp->__anon1.op.exp2->destType = (((void *)0));
16679 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16681 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16682 type2->refCount = 1;
16683 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16684 type2->isSigned = 1;
16686 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))
16688 type2 = __extension__ ({
16689 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16691 __ecereInstance1->kind = 3, __ecereInstance1;
16693 type2->refCount = 1;
16694 type2->isSigned = 1;
16698 type2 = exp->__anon1.op.exp2->expType;
16703 c1 = type1 && type1->kind == 8 && type1->__anon1._class ? type1->__anon1._class->__anon1.registered : (((void *)0));
16704 c2 = type2 && type2->kind == 8 && type2->__anon1._class ? type2->__anon1._class->__anon1.registered : (((void *)0));
16705 if(relationOp && ((exp->__anon1.op.exp1 && exp->__anon1.op.exp1->ambiguousUnits && (!c2 || c2->type != 3)) || (exp->__anon1.op.exp2 && exp->__anon1.op.exp2->ambiguousUnits && (!c1 || c1->type != 3))))
16706 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "ambiguous units in relational operation\n", (((void *)0))));
16707 if(!relationOp && ((exp->__anon1.op.exp1 && exp->__anon1.op.exp1->ambiguousUnits) || (exp->__anon1.op.exp2 && exp->__anon1.op.exp2->ambiguousUnits)) && (!powerOp || !c1 || c1->type != 3 || !c2 || c2->type != 3 || !RelatedUnits(c1, c2)))
16709 if(exp->opDestType || exp->usedInComparison)
16710 exp->ambiguousUnits = 1;
16712 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "ambiguous units\n", (((void *)0))));
16715 if(exp->__anon1.op.op == SIZEOF)
16717 exp->expType = __extension__ ({
16718 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16720 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16722 exp->isConstant = 1;
16724 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16726 exp->expType = Dereference(type2);
16727 if(type2 && type2->kind == 8)
16728 notByReference = 1;
16730 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16731 exp->expType = Reference(type2);
16732 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16734 if(exp->__anon1.op.exp1->expType)
16736 exp->expType = exp->__anon1.op.exp1->expType;
16737 exp->expType->refCount++;
16742 if(c1 && !c1->dataType)
16743 c1->dataType = ProcessTypeString(c1->dataTypeString, 0);
16744 if(c2 && !c2->dataType)
16745 c2->dataType = ProcessTypeString(c2->dataTypeString, 0);
16748 if(exp->__anon1.op.exp1)
16750 if(exp->__anon1.op.exp1->destType)
16751 FreeType(exp->__anon1.op.exp1->destType);
16752 exp->__anon1.op.exp1->destType = MkClassType("bool");
16753 exp->__anon1.op.exp1->destType->truth = 1;
16754 if(!exp->__anon1.op.exp1->expType)
16755 ProcessExpressionType(exp->__anon1.op.exp1);
16757 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16758 FreeType(exp->__anon1.op.exp1->expType);
16759 exp->__anon1.op.exp1->expType = MkClassType("bool");
16760 exp->__anon1.op.exp1->expType->truth = 1;
16762 if(exp->__anon1.op.exp2)
16764 if(exp->__anon1.op.exp2->destType)
16765 FreeType(exp->__anon1.op.exp2->destType);
16766 exp->__anon1.op.exp2->destType = MkClassType("bool");
16767 exp->__anon1.op.exp2->destType->truth = 1;
16768 if(!exp->__anon1.op.exp2->expType)
16769 ProcessExpressionType(exp->__anon1.op.exp2);
16771 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16772 FreeType(exp->__anon1.op.exp2->expType);
16773 exp->__anon1.op.exp2->expType = MkClassType("bool");
16774 exp->__anon1.op.exp2->expType->truth = 1;
16777 else if(powerOp && exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && ((c1 && c1->type == 3) || (c2 && c2->type == 3)))
16779 if(c1 && c1->type == 3 && c2 && c2->type == 3)
16781 if(c1->dataType->kind == 7)
16782 exp->expType = c1->dataType;
16783 else if(c2->dataType->kind == 7)
16784 exp->expType = c2->dataType;
16785 else if(c1->dataType->kind == 6)
16786 exp->expType = c1->dataType;
16787 else if(c2->dataType->kind == 6)
16788 exp->expType = c2->dataType;
16790 exp->expType = c1->dataType;
16792 else if((c1 && c1->type == 3) || exp->__anon1.op.op == '/')
16793 exp->expType = type1;
16795 exp->expType = type2;
16797 exp->expType->refCount++;
16799 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")))))
16801 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"))))
16803 if(exp->__anon1.op.op == '-' && ((c1 && c1->type == 4) || (c2 && c2->type == 4)))
16805 struct Type * intType = ProcessTypeString((c1 && c1->dataType->kind == 4) || (c2 && c2->dataType->kind == 4) ? "int64" : "int", 0);
16807 if(exp->__anon1.op.exp1->destType)
16808 FreeType(exp->__anon1.op.exp1->destType);
16809 if(exp->__anon1.op.exp2->destType)
16810 FreeType(exp->__anon1.op.exp2->destType);
16811 exp->__anon1.op.exp1->destType = intType;
16812 exp->__anon1.op.exp2->destType = intType;
16813 intType->refCount++;
16817 if(exp->__anon1.op.exp2->destType)
16818 FreeType(exp->__anon1.op.exp2->destType);
16819 exp->__anon1.op.exp2->destType = type1;
16821 if(exp->__anon1.op.exp1->destType)
16822 FreeType(exp->__anon1.op.exp1->destType);
16823 exp->__anon1.op.exp1->destType = type2;
16826 if(!boolResult && !exp->opDestType && (!exp->destType || exp->destType->kind != 8) && c1 && c1->type == 3 && c2 && c2->type == 3 && c1 != c2)
16828 if(exp->usedInComparison || exp->parentOpDestType)
16829 exp->ambiguousUnits = 1;
16831 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);
16833 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16835 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16839 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16841 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16842 ProcessExpressionType(exp->__anon1.op.exp1);
16843 if(type2->kind != 13)
16845 ProcessExpressionType(classExp);
16846 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16847 if(!exp->__anon1.op.exp2->expType)
16851 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16852 c2 = (((void *)0));
16855 ProcessExpressionType(exp->__anon1.op.exp2);
16859 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)))
16861 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16862 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16863 exp->expType = type1;
16867 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)))
16869 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16870 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16871 exp->expType = type2;
16875 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))
16877 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16881 unsigned int success = 0;
16883 if(type1->kind == 13 && type2->kind == 13)
16885 if(exp->__anon1.op.op == '+')
16886 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16887 else if(exp->__anon1.op.op == '-')
16889 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16891 exp->expType = __extension__ ({
16892 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16894 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16897 if(type1->__anon1.type->kind == 20)
16899 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16903 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16905 ProcessExpressionType(classExp);
16907 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"))));
16908 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16916 if(!success && exp->__anon1.op.exp1->type == 2)
16918 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16921 FreeType(exp->expType);
16922 exp->expType = exp->__anon1.op.exp1->destType;
16923 if(exp->__anon1.op.exp1->destType)
16924 exp->__anon1.op.exp1->destType->refCount++;
16927 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16930 FreeType(exp->expType);
16931 exp->expType = exp->__anon1.op.exp2->destType;
16932 if(exp->__anon1.op.exp2->destType)
16933 exp->__anon1.op.exp2->destType->refCount++;
16939 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16942 FreeType(exp->expType);
16943 exp->expType = exp->__anon1.op.exp2->destType;
16944 if(exp->__anon1.op.exp2->destType)
16945 exp->__anon1.op.exp2->destType->refCount++;
16948 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16951 FreeType(exp->expType);
16952 exp->expType = exp->__anon1.op.exp1->destType;
16953 if(exp->__anon1.op.exp1->destType)
16954 exp->__anon1.op.exp1->destType->refCount++;
16960 char expString1[10240];
16961 char expString2[10240];
16965 expString1[0] = '\0';
16966 expString2[0] = '\0';
16971 PrintExpression(exp->__anon1.op.exp1, expString1);
16972 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16973 PrintExpression(exp->__anon1.op.exp2, expString2);
16974 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16975 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16976 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16978 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16982 else if(!boolResult && !useSideUnit && c2 && c2->type == 3 && type1 && type1->kind != 8)
16984 if(exp->__anon1.op.exp1->destType)
16985 FreeType(exp->__anon1.op.exp1->destType);
16986 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16987 if(type2->__anon1._class->__anon1.registered->dataType)
16988 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16989 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16990 exp->expType = type2;
16994 else if(!boolResult && !useSideUnit && c1 && c1->type == 3 && type2 && type2->kind != 8)
16996 if(exp->__anon1.op.exp2->destType)
16997 FreeType(exp->__anon1.op.exp2->destType);
16998 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16999 if(type1->__anon1._class->__anon1.registered->dataType)
17000 type1->__anon1._class->__anon1.registered->dataType->refCount++;
17001 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
17002 exp->expType = type1;
17008 unsigned int valid = 0;
17010 if(!boolResult && useSideUnit && c1 && c1->type == 3 && type2 && type2->kind != 8)
17012 if(exp->__anon1.op.exp2->destType)
17013 FreeType(exp->__anon1.op.exp2->destType);
17014 exp->__anon1.op.exp2->destType = c1->dataType;
17015 exp->__anon1.op.exp2->destType->refCount++;
17016 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
17019 type2 = exp->__anon1.op.exp2->destType;
17020 c2 = type2 && type2->kind == 8 && type2->__anon1._class ? type2->__anon1._class->__anon1.registered : (((void *)0));
17023 exp->expType = type2;
17026 if(!boolResult && useSideUnit && c2 && c2->type == 3 && type1 && type1->kind != 8)
17028 if(exp->__anon1.op.exp1->destType)
17029 FreeType(exp->__anon1.op.exp1->destType);
17030 exp->__anon1.op.exp1->destType = c2->dataType;
17031 exp->__anon1.op.exp1->destType->refCount++;
17032 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
17033 type1 = exp->__anon1.op.exp1->destType;
17034 c1 = type1 && type1->kind == 8 && type1->__anon1._class ? type1->__anon1._class->__anon1.registered : (((void *)0));
17035 exp->expType = type1;
17038 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
17040 unsigned int op1IsEnum = c1 && c1->type == 4;
17041 unsigned int op2IsEnum = c2 && c2->type == 4;
17043 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
17045 if(op1IsEnum && exp->__anon1.op.exp2->expType)
17047 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
17050 FreeType(exp->expType);
17051 exp->expType = exp->__anon1.op.exp2->expType;
17052 if(exp->__anon1.op.exp2->expType)
17053 exp->__anon1.op.exp2->expType->refCount++;
17057 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
17059 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
17062 FreeType(exp->expType);
17063 exp->expType = exp->__anon1.op.exp1->expType;
17064 if(exp->__anon1.op.exp1->expType)
17065 exp->__anon1.op.exp1->expType->refCount++;
17072 if(op1IsEnum && exp->__anon1.op.exp2->expType)
17074 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
17077 FreeType(exp->expType);
17078 exp->expType = exp->__anon1.op.exp1->expType;
17079 if(exp->__anon1.op.exp1->expType)
17080 exp->__anon1.op.exp1->expType->refCount++;
17084 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
17086 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
17089 FreeType(exp->expType);
17090 exp->expType = exp->__anon1.op.exp2->expType;
17091 if(exp->__anon1.op.exp2->expType)
17092 exp->__anon1.op.exp2->expType->refCount++;
17100 if(c2 && c2->type == 3 && (!c1 || c1->type != 3))
17102 if(exp->__anon1.op.exp1->destType)
17103 FreeType(exp->__anon1.op.exp1->destType);
17104 exp->__anon1.op.exp1->destType = type2;
17106 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17109 FreeType(exp->expType);
17110 exp->expType = exp->__anon1.op.exp1->destType;
17111 if(exp->__anon1.op.exp1->destType)
17112 exp->__anon1.op.exp1->destType->refCount++;
17117 if(exp->__anon1.op.exp2->destType)
17118 FreeType(exp->__anon1.op.exp2->destType);
17119 exp->__anon1.op.exp2->destType = type1;
17121 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
17124 FreeType(exp->expType);
17125 exp->expType = exp->__anon1.op.exp2->destType;
17126 if(exp->__anon1.op.exp2->destType)
17127 exp->__anon1.op.exp2->destType->refCount++;
17129 else if(type1 && type2)
17131 char expString1[10240];
17132 char expString2[10240];
17133 char type1String[1024];
17134 char type2String[1024];
17136 expString1[0] = '\0';
17137 expString2[0] = '\0';
17138 type1String[0] = '\0';
17139 type2String[0] = '\0';
17142 PrintExpression(exp->__anon1.op.exp1, expString1);
17143 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
17144 PrintExpression(exp->__anon1.op.exp2, expString2);
17145 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
17146 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
17147 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
17149 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
17150 if(c1 && c1->type == 4)
17152 exp->expType = exp->__anon1.op.exp1->expType;
17153 if(exp->__anon1.op.exp1->expType)
17154 exp->__anon1.op.exp1->expType->refCount++;
17156 else if(c2 && c2->type == 4)
17158 exp->expType = exp->__anon1.op.exp2->expType;
17159 if(exp->__anon1.op.exp2->expType)
17160 exp->__anon1.op.exp2->expType->refCount++;
17168 if(c2 && c2->type == 4)
17170 struct Type * oldType = exp->__anon1.op.exp1->expType;
17172 exp->__anon1.op.exp1->expType = (((void *)0));
17173 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17176 exp->__anon1.op.exp1->expType = oldType;
17178 if(exp->__anon1.op.exp1->destType)
17179 FreeType(exp->__anon1.op.exp1->destType);
17180 exp->__anon1.op.exp1->destType = type2;
17182 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
17185 FreeType(exp->expType);
17186 exp->expType = exp->__anon1.op.exp1->destType;
17187 if(exp->__anon1.op.exp1->destType)
17188 exp->__anon1.op.exp1->destType->refCount++;
17192 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
17194 if(type1 && c2 && c2->type == 3)
17196 if(exp->__anon1.op.exp1->destType)
17197 FreeType(exp->__anon1.op.exp1->destType);
17198 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
17199 if(type2->__anon1._class->__anon1.registered->dataType)
17200 type2->__anon1._class->__anon1.registered->dataType->refCount++;
17201 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
17203 if(exp->__anon1.op.op == '!')
17205 exp->expType = MkClassType("bool");
17206 exp->expType->truth = 1;
17210 exp->expType = type2;
17215 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
17217 if(c2 && c2->type == 3)
17219 if(exp->__anon1.op.exp2->destType)
17220 FreeType(exp->__anon1.op.exp2->destType);
17221 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
17222 if(type1->__anon1._class->__anon1.registered->dataType)
17223 type1->__anon1._class->__anon1.registered->dataType->refCount++;
17224 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
17226 exp->expType = type1;
17232 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
17234 char expString[10000];
17236 expString[0] = '\0';
17239 PrintExpression(exp->__anon1.op.exp1, expString);
17240 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17243 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17245 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
17247 char expString[10240];
17249 expString[0] = '\0';
17252 PrintExpression(exp->__anon1.op.exp2, expString);
17253 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17256 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17260 FreeType(exp->expType);
17261 exp->expType = MkClassType("bool");
17262 exp->expType->truth = 1;
17264 if(exp->__anon1.op.op != SIZEOF)
17265 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
17266 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
17268 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
17270 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
17271 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
17272 yylloc = oldyylloc;
17281 struct Expression * e;
17283 exp->isConstant = 1;
17284 for(e = (*exp->__anon1.list).first; e; e = e->next)
17288 FreeType(e->destType);
17289 e->opDestType = exp->opDestType;
17290 e->usedInComparison = exp->usedInComparison;
17291 e->parentOpDestType = exp->parentOpDestType;
17292 e->destType = exp->destType;
17295 exp->destType->refCount++;
17298 ProcessExpressionType(e);
17299 if(e->ambiguousUnits)
17300 exp->ambiguousUnits = 1;
17301 if(!exp->expType && !e->next)
17303 exp->expType = e->expType;
17305 e->expType->refCount++;
17306 exp->needCast = e->needCast;
17309 exp->isConstant = 0;
17311 e = (*exp->__anon1.list).first;
17312 if(!e->next && e->type == 8)
17314 struct Expression * next = exp->next, * prev = exp->prev;
17316 FreeType(exp->expType);
17317 FreeType(exp->destType);
17318 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17322 ((e ? __extension__ ({
17323 void * __ecerePtrToDelete = (e);
17325 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
17327 ProcessExpressionType(exp);
17333 struct Expression * e;
17335 exp->isConstant = 1;
17336 ProcessExpressionType(exp->__anon1.index.exp);
17337 if(!exp->__anon1.index.exp->isConstant)
17338 exp->isConstant = 0;
17339 if(exp->__anon1.index.exp->expType)
17341 struct Type * source = exp->__anon1.index.exp->expType;
17343 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17345 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17346 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17348 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17350 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17351 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17353 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17355 if(type->kind == 8)
17356 type->constant = 1;
17357 else if(type->kind == 13)
17359 struct Type * t = type;
17361 while(t->kind == 13)
17362 t = t->__anon1.type;
17365 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17370 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17372 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17375 FreeType(e->destType);
17376 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17378 ProcessExpressionType(e);
17383 exp->isConstant = 0;
17386 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17388 DeclareType(curExternal, exp->expType, 1, 0);
17393 struct Expression * e;
17394 struct Type * functionType;
17395 struct Type * methodType = (((void *)0));
17401 PrintExpression(exp->__anon1.call.exp, name);
17402 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17404 PrintExpression(exp->__anon1.call.exp, name);
17407 if(exp->__anon1.call.exp->type == 0)
17409 struct Expression * idExp = exp->__anon1.call.exp;
17410 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17412 if(!strcmp(id->string, "__builtin_frame_address"))
17414 exp->expType = ProcessTypeString("void *", 1);
17415 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17416 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17419 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17421 exp->expType = ProcessTypeString("int", 1);
17422 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17423 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17426 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17428 struct Expression * a = (((void *)0));
17429 struct Expression * b = (((void *)0));
17430 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17432 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17434 a = (*exp->__anon1.call.arguments).first;
17435 b = (*exp->__anon1.call.arguments).last;
17439 else if((*exp->__anon1.call.arguments).count == 1)
17441 a = (*exp->__anon1.call.arguments).first;
17446 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17447 idExp->__anon1.__anon1.identifier = (((void *)0));
17448 FreeExpContents(exp);
17449 ProcessExpressionType(a);
17451 ProcessExpressionType(b);
17453 exp->__anon1.list = MkList();
17454 if(a->expType && (!b || b->expType))
17456 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17460 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17461 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17462 struct Declaration * decl;
17463 char temp1[1024], temp2[1024];
17465 GetTypeSpecs(a->expType, specs);
17466 if(a && !a->isConstant && a->type != 0)
17468 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17469 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17470 tempExp1 = QMkExpId(temp1);
17471 tempExp1->expType = a->expType;
17473 a->expType->refCount++;
17474 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17476 if(b && !b->isConstant && b->type != 0)
17478 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17479 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17480 tempExp2 = QMkExpId(temp2);
17481 tempExp2->expType = b->expType;
17483 b->expType->refCount++;
17484 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17486 decl = MkDeclaration(specs, decls);
17487 if(!curCompound->__anon1.compound.declarations)
17488 curCompound->__anon1.compound.declarations = MkList();
17489 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17493 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17495 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17497 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17498 exp->expType = a->expType;
17500 a->expType->refCount++;
17502 else if(!strcmp(id->string, "Abs"))
17504 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17505 exp->expType = a->expType;
17507 a->expType->refCount++;
17509 else if(!strcmp(id->string, "Sgn"))
17511 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"))))));
17512 exp->expType = ProcessTypeString("int", 0);
17514 FreeExpression(tempExp1);
17516 FreeExpression(tempExp2);
17517 FreeIdentifier(id);
17523 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17525 if(!exp->__anon1.call.exp->destType)
17527 exp->__anon1.call.exp->destType = dummy;
17530 ProcessExpressionType(exp->__anon1.call.exp);
17531 if(exp->__anon1.call.exp->destType == dummy)
17534 exp->__anon1.call.exp->destType = (((void *)0));
17538 functionType = exp->__anon1.call.exp->expType;
17539 if(functionType && functionType->kind == 16)
17541 methodType = functionType;
17542 functionType = methodType->__anon1.__anon3.method->dataType;
17543 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17545 char typeString[1024];
17547 typeString[0] = '\0';
17549 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17551 functionType->__anon1.__anon2.thisClass = (((void *)0));
17552 PrintType(functionType, typeString, 1, 1);
17553 functionType->__anon1.__anon2.thisClass = back;
17555 if(strstr(typeString, "thisclass"))
17557 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17558 struct Declarator * decl;
17561 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17563 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17564 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))
17565 thisClassParams = 0;
17566 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17568 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17570 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17571 ProcessDeclarator(decl, 1);
17572 thisClass = backupThisClass;
17574 thisClassParams = 1;
17575 functionType = ProcessType(specs, decl);
17576 functionType->refCount = 0;
17577 FinishTemplatesContext(context);
17579 struct Type * p, * op;
17581 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)
17584 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17587 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17589 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17592 FreeList(specs, (void *)(FreeSpecifier));
17593 FreeDeclarator(decl);
17597 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17599 struct Type * type = functionType->__anon1.type;
17601 if(!functionType->refCount)
17603 functionType->__anon1.type = (((void *)0));
17604 FreeType(functionType);
17606 functionType = type;
17608 if(functionType && functionType->kind != 11)
17610 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17612 else if(functionType)
17614 unsigned int emptyParams = 0, noParams = 0;
17615 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17616 struct Type * type = functionType->__anon1.__anon2.params.first;
17617 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17619 struct Location oldyylloc = yylloc;
17623 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17625 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17628 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17630 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)
17632 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17635 e->destType = type;
17637 type = functionType->__anon1.__anon2.params.first;
17640 type->refCount = 0;
17642 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17644 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17645 type->byReference = functionType->byReference;
17646 type->typedByReference = functionType->typedByReference;
17649 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17651 e->destType = type;
17653 type = functionType->__anon1.__anon2.params.first;
17656 type->refCount = 0;
17659 if(type && type->kind == 0)
17662 if(!type->refCount)
17664 type = (((void *)0));
17666 for(; e; e = e->next)
17668 if(!type && !emptyParams)
17671 if(methodType && methodType->__anon1.__anon3.methodClass)
17672 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);
17674 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);
17677 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17679 struct Type * templatedType = (((void *)0));
17680 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17681 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17684 if(_class && _class->templateArgs)
17686 struct __ecereNameSpace__ecere__com__Class * sClass;
17688 for(sClass = _class; sClass; sClass = sClass->base)
17690 if(sClass->templateClass)
17691 sClass = sClass->templateClass;
17693 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17695 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17697 struct __ecereNameSpace__ecere__com__Class * nextClass;
17699 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17701 if(nextClass->templateClass)
17702 nextClass = nextClass->templateClass;
17703 id += nextClass->templateParams.count;
17713 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17715 unsigned int constant = type->constant;
17716 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17719 struct Context * context = SetupTemplatesContext(_class);
17721 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17722 FinishTemplatesContext(context);
17724 if(templatedType->kind == 8 && constant)
17725 templatedType->constant = 1;
17726 else if(templatedType->kind == 13)
17728 struct Type * t = templatedType->__anon1.type;
17730 while(t->kind == 13)
17731 t = t->__anon1.type;
17733 t->constant = constant;
17735 e->destType = templatedType;
17738 templatedType->passAsTemplate = 1;
17743 e->destType = type;
17750 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17752 e->destType = type->prev;
17753 e->destType->refCount++;
17757 e->destType = type;
17762 if(type && type->kind != 14)
17764 struct Type * next = type->next;
17766 if(!type->refCount)
17771 if(type && type->kind != 14)
17773 if(methodType && methodType->__anon1.__anon3.methodClass)
17774 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);
17776 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);
17778 yylloc = oldyylloc;
17779 if(type && !type->refCount)
17784 functionType = __extension__ ({
17785 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17787 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17789 if(exp->__anon1.call.exp->type == 0)
17791 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17795 struct Symbol * symbol;
17796 struct Location oldyylloc = yylloc;
17798 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17799 if(strstr(string, "__builtin_") == string)
17803 functionType->__anon1.__anon2.returnType = exp->destType;
17804 exp->destType->refCount++;
17808 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17809 symbol = __extension__ ({
17810 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17812 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17814 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17815 if(strstr(symbol->string, "::"))
17816 globalContext->hasNameSpace = 1;
17817 yylloc = oldyylloc;
17820 else if(exp->__anon1.call.exp->type == 8)
17824 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17825 if(!functionType->__anon1.__anon2.returnType)
17827 functionType->__anon1.__anon2.returnType = __extension__ ({
17828 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17830 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17834 if(functionType && functionType->kind == 11)
17836 exp->expType = functionType->__anon1.__anon2.returnType;
17837 if(functionType->__anon1.__anon2.returnType)
17838 functionType->__anon1.__anon2.returnType->refCount++;
17839 if(!functionType->refCount)
17840 FreeType(functionType);
17842 if(exp->__anon1.call.arguments)
17844 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17845 ProcessExpressionType(e);
17851 struct Type * type;
17852 struct Location oldyylloc = yylloc;
17853 unsigned int thisPtr;
17854 struct Expression * checkExp = exp->__anon1.member.exp;
17858 if(checkExp->type == 11)
17859 checkExp = checkExp->__anon1.cast.exp;
17860 else if(checkExp->type == 5)
17861 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17865 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17866 exp->thisPtr = thisPtr;
17867 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17869 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17871 ProcessExpressionType(exp->__anon1.member.exp);
17872 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)
17874 exp->isConstant = 0;
17877 exp->isConstant = exp->__anon1.member.exp->isConstant;
17878 type = exp->__anon1.member.exp->expType;
17880 if(type && (type->kind == 20))
17882 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17883 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17887 for(param = _class->templateParams.first; param; param = param->next)
17889 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17893 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17895 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17899 struct Expression * expMember = exp->__anon1.member.exp;
17900 struct Declarator * decl;
17901 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17902 char thisClassTypeString[1024];
17904 FreeIdentifier(exp->__anon1.member.member);
17905 ProcessExpressionType(argExp);
17907 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17911 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17912 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17915 strcpy(thisClassTypeString, _class->fullName);
17917 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17918 exp->expType = ProcessType(specs, decl);
17919 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17921 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17922 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17923 int paramCount = 0;
17924 int lastParam = -1;
17925 char templateString[1024];
17926 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17928 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17929 for(cClass = expClass; cClass; cClass = cClass->base)
17933 for(param = cClass->templateParams.first; param; param = param->next)
17936 struct __ecereNameSpace__ecere__com__Class * sClass;
17937 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17939 for(sClass = cClass->base; sClass; sClass = sClass->base)
17940 id += sClass->templateParams.count;
17941 arg = expClass->templateArgs[id];
17942 for(sClass = _class; sClass; sClass = sClass->base)
17944 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17946 struct __ecereNameSpace__ecere__com__Class * nextClass;
17948 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17949 p += nextClass->templateParams.count;
17950 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17952 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17954 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17956 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17957 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17964 char argument[256];
17966 argument[0] = '\0';
17967 switch(param->type)
17971 char expString[1024];
17972 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17973 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17974 struct Expression * exp;
17975 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17977 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17978 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17979 ProcessExpressionType(exp);
17980 ComputeExpression(exp);
17981 expString[0] = '\0';
17982 PrintExpression(exp, expString);
17983 strcat(argument, expString);
17984 FreeExpression(exp);
17989 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17994 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17996 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17997 strcat(argument, thisClassTypeString);
17999 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18007 strcat(templateString, ", ");
18008 if(lastParam != p - 1)
18010 strcat(templateString, param->name);
18011 strcat(templateString, " = ");
18013 strcat(templateString, argument);
18022 int len = strlen(templateString);
18024 if(templateString[len - 1] == '>')
18025 templateString[len++] = ' ';
18026 templateString[len++] = '>';
18027 templateString[len++] = '\0';
18030 struct Context * context = SetupTemplatesContext(_class);
18032 FreeType(exp->expType);
18033 exp->expType = ProcessTypeString(templateString, 0);
18034 FinishTemplatesContext(context);
18037 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
18038 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
18040 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")))))))));
18043 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
18045 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
18048 if(type && (type->kind == 20))
18050 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)))
18052 struct Identifier * id = exp->__anon1.member.member;
18053 int typeKind = type->kind;
18054 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));
18056 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
18058 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
18063 if(typeKind == 3 || typeKind == 15)
18064 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
18067 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
18069 _class = type->__anon1._class->__anon1.registered;
18071 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
18073 _class = FindClass("char *")->__anon1.registered;
18075 else if(type->kind == 13)
18077 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
18078 FreeType(exp->expType);
18079 exp->expType = ProcessTypeString("uintptr", 0);
18080 exp->byReference = 1;
18084 char string[1024] = "";
18085 struct Symbol * classSym;
18087 PrintTypeNoConst(type, string, 0, 1);
18088 classSym = FindClass(string);
18090 _class = classSym->__anon1.registered;
18096 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
18097 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
18098 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18099 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
18100 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
18102 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
18103 exp->__anon1.member.memberType = 1;
18104 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
18105 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
18108 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
18110 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
18111 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
18113 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18115 member = (((void *)0));
18117 if(!member && !prop)
18118 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18119 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
18120 exp->__anon1.member.thisPtr = 1;
18124 unsigned int useMemberForNonConst = 0;
18128 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
18129 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);
18130 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
18131 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
18133 if((!prop || useMemberForNonConst) && !member)
18135 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
18138 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
18139 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);
18140 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
18141 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
18146 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
18147 prop = (((void *)0));
18149 member = (((void *)0));
18153 if(!prop && !member && !method)
18154 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
18155 if(!prop && !member && !method)
18159 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
18162 exp->__anon1.member.memberType = 5;
18163 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
18167 char structName[1024];
18168 struct Identifier * id = exp->__anon1.member.member;
18169 struct Expression * classExp = exp->__anon1.member.exp;
18172 FreeType(classExp->expType);
18173 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
18174 strcpy(structName, "__ecereClassData_");
18175 FullClassNameCat(structName, type->__anon1._class->string, 0);
18177 exp->__anon1.member.member = id;
18178 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"))))))));
18180 ProcessExpressionType(exp);
18186 struct Symbol * classSym = FindClass(id->string);
18190 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
18193 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
18197 if(exp->__anon1.member.exp->destType)
18198 FreeType(exp->__anon1.member.exp->destType);
18200 if(method && !method->_class->symbol)
18201 method->_class->symbol = FindClass(method->_class->fullName);
18202 if(prop && !prop->_class->symbol)
18203 prop->_class->symbol = FindClass(prop->_class->fullName);
18204 exp->__anon1.member.exp->destType = __extension__ ({
18205 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18207 __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;
18212 exp->__anon1.member.memberType = 1;
18213 if(!prop->dataType)
18214 ProcessPropertyType(prop);
18215 exp->expType = prop->dataType;
18216 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
18218 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18220 CopyTypeInto(type, exp->expType);
18221 type->refCount = 1;
18222 type->constant = 1;
18223 exp->expType = type;
18225 else if(prop->dataType)
18226 prop->dataType->refCount++;
18230 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
18232 FreeExpContents(exp);
18234 exp->__anon1.__anon1.identifier = MkIdentifier("class");
18235 ProcessExpressionType(exp);
18238 exp->__anon1.member.memberType = 3;
18239 DeclareStruct(curExternal, _class->fullName, 0, 1);
18240 if(member->_class != _class)
18241 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
18242 if(!member->dataType)
18244 struct Context * context = SetupTemplatesContext(_class);
18246 member->dataType = ProcessTypeString(member->dataTypeString, 0);
18247 FinishTemplatesContext(context);
18249 if(exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 2)
18250 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
18251 exp->expType = member->dataType;
18252 if(member->dataType)
18253 member->dataType->refCount++;
18255 else if(revConvert)
18257 exp->__anon1.member.memberType = 4;
18258 exp->expType = MkClassType(revConvert->_class->fullName);
18263 exp->__anon1.member.memberType = 2;
18265 if(!method->dataType)
18266 ProcessMethodType(method);
18267 exp->expType = __extension__ ({
18268 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18270 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
18272 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
18273 exp->expType->__anon1.__anon3.usedClass = _class;
18275 else if(!classProp)
18277 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
18279 FreeExpContents(exp);
18281 exp->__anon1.__anon1.identifier = MkIdentifier("class");
18282 FreeType(exp->expType);
18283 exp->expType = MkClassType("ecere::com::Class");
18286 yylloc = exp->__anon1.member.member->loc;
18287 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
18289 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
18291 if(_class && exp->expType)
18293 struct __ecereNameSpace__ecere__com__Class * tClass;
18295 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
18296 while(tClass && !tClass->templateClass)
18297 tClass = tClass->base;
18298 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
18301 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18302 struct __ecereNameSpace__ecere__com__Class * sClass;
18304 for(sClass = tClass; sClass; sClass = sClass->base)
18307 if(sClass->templateClass)
18308 sClass = sClass->templateClass;
18309 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18311 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
18313 for(sClass = sClass->base; sClass; sClass = sClass->base)
18314 id += sClass->templateParams.count;
18322 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
18324 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18325 struct Context * context = SetupTemplatesContext(tClass);
18326 unsigned int constant = exp->expType->constant;
18327 unsigned int passAsTemplate = 0;
18328 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
18329 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
18331 if(t && t->kind == 8 && t->__anon1._class)
18332 thisClassFrom = t->__anon1._class->__anon1.registered;
18334 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
18336 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
18337 FreeType(exp->expType);
18338 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18339 exp->expType->thisClassFrom = thisClassFrom;
18340 if(exp->expType->kind == 8 && constant)
18341 exp->expType->constant = 1;
18342 else if(exp->expType->kind == 13)
18344 struct Type * t = exp->expType->__anon1.type;
18346 while(t->kind == 13)
18347 t = t->__anon1.type;
18349 t->constant = constant;
18353 if(exp->expType->kind == 21)
18355 FreeType(exp->expType);
18356 exp->expType = ReplaceThisClassType(_class);
18359 exp->expType->passAsTemplate = 1;
18362 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18363 if(exp->destType->kind == 8 && constant)
18364 exp->destType->constant = 1;
18365 else if(exp->destType->kind == 13)
18367 struct Type * t = exp->destType->__anon1.type;
18369 while(t->kind == 13)
18370 t = t->__anon1.type;
18372 t->constant = constant;
18374 if(exp->destType->kind == 21)
18376 FreeType(exp->destType);
18377 exp->destType = ReplaceThisClassType(_class);
18381 FinishTemplatesContext(context);
18384 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)
18387 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18388 struct __ecereNameSpace__ecere__com__Class * sClass;
18390 for(sClass = tClass; sClass; sClass = sClass->base)
18393 if(sClass->templateClass)
18394 sClass = sClass->templateClass;
18395 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18397 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18399 for(sClass = sClass->base; sClass; sClass = sClass->base)
18400 id += sClass->templateParams.count;
18410 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18411 struct Context * context = SetupTemplatesContext(tClass);
18412 struct Type * basicType;
18414 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18417 if(basicType->kind == 21)
18419 FreeType(basicType);
18420 basicType = ReplaceThisClassType(_class);
18422 FreeType(exp->expType);
18423 exp->expType = __extension__ ({
18424 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18426 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18430 exp->destType = exp->expType;
18431 exp->destType->refCount++;
18434 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18435 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18436 struct Declarator * decl;
18438 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18441 exp->destType->refCount++;
18443 exp->expType->refCount++;
18445 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18446 exp->__anon1.cast.exp = newExp;
18449 FinishTemplatesContext(context);
18452 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18454 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18458 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18460 int paramCount = 0;
18461 int lastParam = -1;
18462 char templateString[1024];
18463 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18465 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18466 while(cClass != expClass)
18468 struct __ecereNameSpace__ecere__com__Class * sClass;
18470 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18473 for(param = cClass->templateParams.first; param; param = param->next)
18475 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18477 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18478 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18480 while(cClassCur != tClass && !paramCur)
18482 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18484 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18486 cClassCur = sClassCur;
18487 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18489 if(!strcmp(paramCur->name, param->name))
18496 if(paramCur && paramCur->type == 0)
18497 arg = tClass->templateArgs[cp];
18499 arg = expClass->templateArgs[p];
18501 char argument[256];
18503 argument[0] = '\0';
18504 switch(param->type)
18508 char expString[1024];
18509 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18510 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18511 struct Expression * exp;
18512 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18514 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18515 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18516 ProcessExpressionType(exp);
18517 ComputeExpression(exp);
18518 expString[0] = '\0';
18519 PrintExpression(exp, expString);
18520 strcat(argument, expString);
18521 FreeExpression(exp);
18526 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18531 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18532 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18539 strcat(templateString, ", ");
18540 if(lastParam != p - 1)
18542 strcat(templateString, param->name);
18543 strcat(templateString, " = ");
18545 strcat(templateString, argument);
18554 int len = strlen(templateString);
18556 if(templateString[len - 1] == '>')
18557 templateString[len++] = ' ';
18558 templateString[len++] = '>';
18559 templateString[len++] = '\0';
18561 FreeType(exp->expType);
18563 struct Context * context = SetupTemplatesContext(tClass);
18565 exp->expType = ProcessTypeString(templateString, 0);
18566 FinishTemplatesContext(context);
18573 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)");
18575 else if(type && (type->kind == 9 || type->kind == 10))
18577 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18581 exp->expType = memberType;
18583 memberType->refCount++;
18588 char expString[10240];
18590 expString[0] = '\0';
18593 PrintExpression(exp, expString);
18594 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18596 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18598 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18600 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18602 struct Identifier * id = exp->__anon1.member.member;
18603 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));
18607 FreeType(exp->expType);
18608 exp->expType = ReplaceThisClassType(_class);
18612 yylloc = oldyylloc;
18617 struct Type * destType = exp->destType;
18619 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18621 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18623 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18627 ProcessExpressionType(exp);
18634 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18636 if(classSym && classSym->__anon1.registered)
18638 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18641 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18644 DeclareStruct(curExternal, classSym->string, 0, 1);
18645 FreeSpecifier(exp->__anon1._class);
18646 FullClassNameCat(name, classSym->string, 0);
18650 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18654 struct Expression * e;
18657 if(b->structSize == b->offset)
18658 exp->__anon1.op.exp1 = MkExpConstant("0");
18660 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18661 exp->__anon1.op.op = '+';
18663 while(b->offset != 0)
18665 struct Symbol * sym;
18666 struct Expression * typeSize;
18669 sym = FindClass(b->fullName);
18671 DeclareStruct(curExternal, sym->string, 0, 1);
18672 FullClassNameCat(name, sym->string, 0);
18673 if(b->structSize == b->offset)
18674 typeSize = MkExpConstant("0");
18676 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18677 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18678 e = e->__anon1.op.exp2;
18684 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18686 FreeSpecifier(exp->__anon1._class);
18687 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18692 char className[1024];
18694 strcpy(className, "__ecereClass_");
18695 FullClassNameCat(className, classSym->string, 1);
18696 DeclareClass(curExternal, classSym, className);
18697 FreeExpContents(exp);
18699 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18700 exp->__anon1.member.member = MkIdentifier("structSize");
18704 exp->expType = __extension__ ({
18705 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18707 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18713 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18715 exp->expType = __extension__ ({
18716 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18718 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18720 exp->isConstant = 1;
18721 DeclareType(curExternal, type, 1, 0);
18727 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18730 FreeType(exp->__anon1.cast.exp->destType);
18731 exp->__anon1.cast.exp->destType = type;
18734 ProcessExpressionType(exp->__anon1.cast.exp);
18737 exp->expType = type;
18738 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18740 void * prev = exp->prev, * next = exp->next;
18741 struct Type * expType = exp->__anon1.cast.exp->destType;
18742 struct Expression * castExp = exp->__anon1.cast.exp;
18743 struct Type * destType = exp->destType;
18746 expType->refCount++;
18747 FreeType(exp->expType);
18748 FreeTypeName(exp->__anon1.cast.typeName);
18750 FreeType(exp->expType);
18751 FreeType(exp->destType);
18752 exp->expType = expType;
18753 exp->destType = destType;
18754 ((castExp ? __extension__ ({
18755 void * __ecerePtrToDelete = (castExp);
18757 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
18758 }) : 0), castExp = 0);
18764 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18770 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18772 exp->expType = type;
18777 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18779 ProcessExpressionType(exp->__anon1.vaArg.exp);
18780 exp->expType = type;
18785 struct Expression * e;
18786 struct Type * t = exp->destType;
18788 if(t && !exp->destType->casted)
18790 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18791 CopyTypeInto(t, exp->destType);
18796 exp->isConstant = 1;
18797 FreeType(exp->__anon1.cond.cond->destType);
18798 exp->__anon1.cond.cond->destType = MkClassType("bool");
18799 exp->__anon1.cond.cond->destType->truth = 1;
18800 ProcessExpressionType(exp->__anon1.cond.cond);
18801 if(!exp->__anon1.cond.cond->isConstant)
18802 exp->isConstant = 0;
18803 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18807 FreeType(e->destType);
18810 e->destType->refCount++;
18812 ProcessExpressionType(e);
18815 exp->expType = e->expType;
18817 e->expType->refCount++;
18820 exp->isConstant = 0;
18822 FreeType(exp->__anon1.cond.elseExp->destType);
18823 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18824 if(exp->__anon1.cond.elseExp->destType)
18825 exp->__anon1.cond.elseExp->destType->refCount++;
18826 ProcessExpressionType(exp->__anon1.cond.elseExp);
18827 if(!exp->__anon1.cond.elseExp->isConstant)
18828 exp->isConstant = 0;
18834 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18836 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18838 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18840 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18842 exp->destType->refCount++;
18844 ProcessStatement(exp->__anon1.compound);
18845 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18847 exp->expType->refCount++;
18853 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18855 if(spec && spec->type == 1)
18857 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18858 exp->expType->kind = 19;
18859 exp->byReference = 1;
18863 exp->expType = MkClassType("ecere::com::Class");
18864 exp->byReference = 1;
18870 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18874 struct Identifier * id = exp->__anon1.classData.id;
18875 char structName[1024];
18876 struct Expression * classExp;
18878 strcpy(structName, "__ecereClassData_");
18879 FullClassNameCat(structName, _class->fullName, 0);
18881 exp->__anon1.member.member = id;
18882 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18883 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18885 classExp = MkExpIdentifier(MkIdentifier("class"));
18886 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"))))))));
18887 ProcessExpressionType(exp);
18894 struct Type * type = (((void *)0));
18895 const char * typeString = (((void *)0));
18896 char typeStringBuf[1024];
18898 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))
18900 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18902 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18904 else if(exp->__anon1.list)
18906 struct Expression * e;
18908 for(e = (*exp->__anon1.list).first; e; e = e->next)
18910 ProcessExpressionType(e);
18920 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18924 e->expType = (((void *)0));
18925 e = (*exp->__anon1.list).first;
18926 ProcessExpressionType(e);
18929 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18931 FreeType(e->expType);
18932 e->expType = (((void *)0));
18934 type = (((void *)0));
18942 FreeType(e->expType);
18943 e->expType = (((void *)0));
18949 typeStringBuf[0] = '\0';
18950 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18951 typeString = typeStringBuf;
18953 type = (((void *)0));
18958 char templateString[1024];
18959 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18960 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18961 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18962 struct Expression * expExt;
18963 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18965 sprintf(templateString, "Container<%s>", typeString);
18966 if(exp->__anon1.list)
18968 struct Expression * e;
18970 type = ProcessTypeString(typeString, 0);
18971 while((e = (*exp->__anon1.list).first))
18973 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18974 e->destType = type;
18976 ProcessExpressionType(e);
18977 ListAdd(initializers, MkInitializerAssignment(e));
18980 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18982 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18983 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18984 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18985 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18986 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18987 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18988 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18989 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18990 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18991 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18992 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18994 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18996 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18997 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18998 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18999 exp->expType = ProcessTypeString(templateString, 0);
19001 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
19002 ProcessExpressionType(expExt);
19006 exp->expType = ProcessTypeString("Container", 0);
19007 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
19012 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
19014 FreeType(exp->expType);
19015 exp->expType = ReplaceThisClassType(thisClass);
19017 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)
19019 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
19023 if(exp->expType->kind != 15)
19025 struct Type * member;
19026 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
19028 FreeType(exp->expType);
19029 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19030 exp->expType->kind = symbol->type->kind;
19031 exp->expType->refCount++;
19032 exp->expType->__anon1.__anon1.enumName = enumName;
19033 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
19034 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
19035 member->refCount++;
19039 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
19041 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
19043 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);
19045 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
19050 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)))
19052 exp->byReference = 1;
19055 if(exp->destType && (exp->destType->kind == 18))
19057 else if(exp->destType && !exp->destType->keepCast)
19059 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
19060 exp->needTemplateCast = 1;
19061 if(exp->destType->kind == 0)
19063 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
19065 unsigned int invalidCast = 0;
19067 if(inCompiler && exp->destType->count && exp->expType)
19069 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
19070 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
19072 if(c1 && c1->type != 1)
19073 c1 = (((void *)0));
19074 if(c2 && c2->type != 1)
19075 c2 = (((void *)0));
19076 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
19079 if(!exp->destType->count || unresolved || invalidCast)
19084 if(exp->destType->kind != 14)
19091 char expString[10240];
19093 expString[0] = '\0';
19094 PrintType(exp->destType, type2, 0, 1);
19097 PrintExpression(exp, expString);
19098 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19101 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
19102 else if(exp->type != 16)
19103 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
19108 char expString[10240];
19110 expString[0] = '\0';
19113 PrintExpression(exp, expString);
19114 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19117 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
19118 else if(exp->type != 16)
19119 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
19131 PrintType(exp->expType, type1, 0, 1);
19132 PrintType(exp->destType, type2, 0, 1);
19134 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)))
19138 struct Expression * nbExp = GetNonBracketsExp(exp);
19139 unsigned int skipWarning = 0;
19140 int kind = exp->destType->kind;
19142 if(nbExp->type == 12 && nbExp->destType && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
19144 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
19146 int op = nbExp->__anon1.op.op;
19147 struct Expression * nbExp1, * nbExp2;
19154 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19155 from = nbExp1->expType->promotedFrom;
19156 if(from == 1 || (kind == 2 && from == 2))
19161 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19162 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19163 from = nbExp1->expType->promotedFrom;
19164 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
19166 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
19168 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
19169 int s = from == 1 ? 8 : 16;
19171 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
19172 s = nbExp1->expType->bitMemberSize;
19173 if(nbExp->__anon1.op.op == RIGHT_OP)
19177 if(s <= (kind == 1 ? 8 : 16))
19182 if(!exp->destType->isSigned)
19184 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19185 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19186 from = nbExp2->expType->promotedFrom;
19187 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
19189 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
19191 if(n == (from == 1 ? 255 : 65535))
19200 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19201 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19202 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
19203 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
19204 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) && ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
19212 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
19213 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
19214 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
19215 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
19216 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) || ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
19224 char expString[10240];
19226 expString[0] = '\0';
19229 PrintExpression(exp, expString);
19230 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19232 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")))
19235 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19237 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19242 FreeType(exp->expType);
19243 exp->destType->refCount++;
19244 exp->expType = exp->destType;
19250 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))
19252 struct Expression * nbExp = GetNonBracketsExp(exp);
19254 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
19256 struct Expression * e = MoveExpContents(exp);
19258 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
19260 exp->__anon1.cast.exp->destType = exp->destType;
19262 exp->destType->refCount++;
19263 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
19267 else if(unresolved)
19269 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
19270 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);
19271 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
19272 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
19274 else if(!exp->expType && exp->type != 16)
19276 char expString[10240];
19278 expString[0] = '\0';
19281 PrintExpression(exp, expString);
19282 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19284 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
19287 ApplyAnyObjectLogic(exp);
19288 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)))
19290 exp->byReference = 1;
19292 yylloc = oldyylloc;
19295 static void ProcessFunction(struct FunctionDefinition * function)
19297 struct Identifier * id = GetDeclId(function->declarator);
19298 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
19299 struct Type * type = symbol ? symbol->type : (((void *)0));
19300 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
19301 struct Context * oldTopContext = topContext;
19303 yylloc = function->loc;
19304 if(type && type->__anon1.__anon2.thisClass)
19306 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
19307 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
19308 char className[1024];
19309 char structName[1024];
19310 struct Declarator * funcDecl;
19311 struct Symbol * thisSymbol;
19312 unsigned int typedObject = 0;
19314 if(_class && !_class->base)
19316 _class = currentClass;
19317 if(_class && !_class->symbol)
19318 _class->symbol = FindClass(_class->fullName);
19319 classSym = _class ? _class->symbol : (((void *)0));
19322 thisClass = _class;
19323 if(inCompiler && _class)
19325 if(type->kind == 11)
19327 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
19329 struct Type * param = symbol->type->__anon1.__anon2.params.first;
19331 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
19334 if(type->classObjectType != 1)
19336 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
19337 symbol->type->__anon1.__anon2.staticMethod = 1;
19338 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
19339 symbol->type->extraParam = 0;
19342 strcpy(className, "__ecereClass_");
19343 FullClassNameCat(className, _class->fullName, 1);
19345 FullClassNameCat(structName, _class->fullName, 0);
19346 funcDecl = GetFuncDecl(function->declarator);
19349 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19351 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19353 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19355 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19356 FreeTypeName(param);
19359 if(!function->propertyNoThis)
19361 struct TypeName * thisParam = (((void *)0));
19363 if(type->classObjectType != 1)
19365 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19366 if(!funcDecl->__anon1.function.parameters)
19367 funcDecl->__anon1.function.parameters = MkList();
19368 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19372 if(type->classObjectType != 1)
19374 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19375 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19377 thisParam = __extension__ ({
19378 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19380 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19382 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19383 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19387 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19389 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19391 funcDecl = GetFuncDecl(initDecl->declarator);
19394 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19396 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19398 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19400 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19401 FreeTypeName(param);
19404 if(type->classObjectType != 1)
19406 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19408 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19410 if(!funcDecl->__anon1.function.parameters)
19411 funcDecl->__anon1.function.parameters = MkList();
19412 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19420 if(type->classObjectType != 1)
19422 thisSymbol = __extension__ ({
19423 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19425 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19427 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19428 if(typedObject && thisSymbol->type)
19430 thisSymbol->type->classObjectType = 2;
19431 thisSymbol->type->byReference = type->byReference;
19432 thisSymbol->type->typedByReference = type->byReference;
19436 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19438 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19441 struct __ecereNameSpace__ecere__com__Class * base;
19443 for(base = _class; base && base->type != 1000; base = base->next)
19445 for(member = base->membersAndProperties.first; member; member = member->next)
19446 if(!member->isProperty)
19452 for(member = _class->membersAndProperties.first; member; member = member->next)
19453 if(!member->isProperty)
19457 char pointerName[1024];
19458 struct Declaration * decl;
19459 struct Initializer * initializer;
19460 struct Expression * exp, * bytePtr;
19462 strcpy(pointerName, "__ecerePointer_");
19463 FullClassNameCat(pointerName, _class->fullName, 0);
19465 char className[1024];
19467 strcpy(className, "__ecereClass_");
19468 FullClassNameCat(className, classSym->string, 1);
19469 DeclareClass(curExternal, classSym, className);
19471 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19474 struct Expression * e;
19476 if(_class->offset && _class->offset == (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize))
19478 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19479 ProcessExpressionType(e);
19485 sprintf(string, "%d", _class->offset);
19486 e = MkExpConstant(string);
19488 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19492 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19494 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19495 exp->expType = __extension__ ({
19496 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19498 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19499 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19501 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19502 }), __ecereInstance2;
19506 yylloc = function->body->loc;
19507 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19509 struct Context * prevContext = curContext;
19510 struct __ecereNameSpace__ecere__sys__OldList * list;
19512 curContext = function->body->__anon1.compound.context;
19513 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19514 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19515 curContext = prevContext;
19517 decl->symbol = (((void *)0));
19518 if(!function->body->__anon1.compound.declarations)
19519 function->body->__anon1.compound.declarations = MkList();
19520 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19526 thisClass = (((void *)0));
19529 FreeSpecifier(id->_class);
19530 id->_class = (((void *)0));
19531 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19533 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19535 id = GetDeclId(initDecl->declarator);
19536 FreeSpecifier(id->_class);
19537 id->_class = (((void *)0));
19541 topContext = function->body->__anon1.compound.context;
19543 struct FunctionDefinition * oldFunction = curFunction;
19545 curFunction = function;
19547 ProcessStatement(function->body);
19548 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19550 struct Statement * prevCompound = curCompound;
19551 struct Context * prevContext = curContext;
19552 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19554 if(!function->body->__anon1.compound.statements)
19555 function->body->__anon1.compound.statements = MkList();
19556 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19557 curCompound = function->body;
19558 curContext = function->body->__anon1.compound.context;
19559 ProcessStatement(fireWatchers);
19560 curContext = prevContext;
19561 curCompound = prevCompound;
19563 curFunction = oldFunction;
19565 if(function->declarator)
19567 ProcessDeclarator(function->declarator, 1);
19569 topContext = oldTopContext;
19570 thisClass = oldThisClass;
19573 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19575 struct ClassDef * def;
19576 struct External * external = curExternal;
19577 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19579 for(def = definitions->first; def; def = def->next)
19583 if(def->__anon1.function->declarator)
19584 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19586 curExternal = external;
19587 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19589 else if(def->type == 2)
19591 if(def->__anon1.decl->type == 2)
19593 thisClass = regClass;
19594 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19595 thisClass = (((void *)0));
19599 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19602 thisClass = regClass;
19603 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19604 thisClass = backThisClass;
19607 else if(def->type == 1 && def->__anon1.defProperties)
19609 struct MemberInit * defProperty;
19610 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);
19612 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19613 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19615 thisClass = regClass;
19616 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19617 thisClass = (((void *)0));
19619 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19620 FreeSymbol(thisSymbol);
19622 else if(def->type == 3 && def->__anon1.propertyDef)
19624 struct PropertyDef * prop = def->__anon1.propertyDef;
19626 thisClass = regClass;
19631 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19633 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19635 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19636 ProcessStatement(prop->setStmt);
19642 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19644 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19646 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19647 ProcessStatement(prop->getStmt);
19649 if(prop->issetStmt)
19653 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19655 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19657 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19658 ProcessStatement(prop->issetStmt);
19660 thisClass = (((void *)0));
19662 else if(def->type == 4 && def->__anon1.propertyWatch)
19664 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19666 thisClass = regClass;
19667 if(propertyWatch->compound)
19669 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);
19671 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19672 curExternal = (((void *)0));
19673 ProcessStatement(propertyWatch->compound);
19675 thisClass = (((void *)0));
19680 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19682 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19684 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19685 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19686 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19687 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19688 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19689 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19690 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19691 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19692 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19693 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19694 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19695 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19696 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19697 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19698 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19699 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19700 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19701 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19702 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19703 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19704 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19705 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19706 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19707 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19708 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19709 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19710 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19711 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19712 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19713 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19714 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19715 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19716 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19717 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19718 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19719 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19720 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19721 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19722 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19723 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19724 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19725 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19726 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19727 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19728 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19729 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19730 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19731 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19732 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19733 __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);
19734 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19735 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19736 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19737 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19738 __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);
19739 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19740 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19741 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19742 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19743 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19744 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19745 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19746 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19747 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19748 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19749 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19750 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19751 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19752 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19753 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19754 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)
19755 __ecereClass_Conversion = class;
19756 __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);
19757 __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);
19758 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19759 __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);
19760 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19761 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19762 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19763 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19764 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19765 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19766 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19767 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19768 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("modifyPassAsTemplate", "void modifyPassAsTemplate(Type * typePtr, bool value)", modifyPassAsTemplate, module, 1);
19770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19771 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19772 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19773 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19774 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19775 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19776 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19777 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19778 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19779 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19780 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RelatedUnits", "bool RelatedUnits(ecere::com::Class c1, ecere::com::Class c2)", RelatedUnits, module, 1);
19781 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19782 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19783 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);