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 #include <sys/types.h>
42 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
45 extern int returnCode;
47 extern unsigned int yydebug;
49 extern unsigned int echoOn;
55 int expression_yyparse();
57 static char * thisNameSpace;
59 unsigned int thisClassParams = 1;
61 unsigned int internalValueCounter;
63 extern unsigned int outputLineNumbers;
65 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
67 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
69 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
71 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
73 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
75 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
77 extern int targetBits;
79 extern unsigned int inCompiler;
81 extern unsigned int inPreCompiler;
83 extern unsigned int inDebugger;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
89 int UnescapeString(char * d, char * s, int len)
94 while(j < len && (ch = s[j]))
145 char * OffsetEscapedString(char * s, int len, int offset)
150 while(j < len && k < offset && (ch = s[j]))
156 return (k == offset) ? s + j : (((void *)0));
159 extern int __ecereVMethodID_class_OnGetString;
161 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
163 extern unsigned int parseError;
165 static int definedExpStackPos;
167 static void * definedExpStack[512];
169 extern const char * sourceFile;
171 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
173 extern unsigned int memoryGuard;
175 struct __ecereNameSpace__ecere__sys__OldList
182 } __attribute__ ((gcc_struct));
184 struct __ecereNameSpace__ecere__com__DataValue
199 } __attribute__ ((gcc_struct)) __anon1;
200 } __attribute__ ((gcc_struct));
202 struct __ecereNameSpace__ecere__com__SerialBuffer
204 unsigned char * _buffer;
208 } __attribute__ ((gcc_struct));
210 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
212 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
214 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
216 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
218 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
226 struct TemplateArgument;
240 } __attribute__ ((gcc_struct));
242 extern size_t strlen(const char * );
244 extern int strcmp(const char * , const char * );
246 extern int sprintf(char * , const char * , ...);
248 extern char * strcat(char * , const char * );
250 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
252 extern int isprint(int c);
254 extern char * strcpy(char * , const char * );
256 extern void Compiler_Error(const char * format, ...);
258 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
260 struct __ecereNameSpace__ecere__com__LinkList
265 } __attribute__ ((gcc_struct));
267 extern char * strchr(const char * , int);
269 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
271 extern void * memcpy(void * , const void * , size_t size);
273 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
275 extern void Compiler_Warning(const char * format, ...);
277 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
279 extern long long strtoll(const char * nptr, char * * endptr, int base);
281 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
283 extern int strtol(const char * , char * * , int base);
285 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
287 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
289 extern double strtod(const char * , char * * );
291 extern int strncmp(const char * , const char * , size_t n);
293 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
295 extern char * QMkString(const char * source);
297 extern char * strncpy(char * , const char * , size_t n);
299 extern int printf(const char * , ...);
301 extern char * strstr(const char * , const char * );
303 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
305 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
307 extern int (* __ecereProp_float_Get_signBit)(float this);
309 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
311 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
313 extern int (* __ecereProp_double_Get_signBit)(double this);
315 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
317 extern float (* __ecereMethod_float_inf)(void);
319 extern float (* __ecereMethod_float_nan)(void);
321 extern double (* __ecereMethod_double_inf)(void);
323 extern double (* __ecereMethod_double_nan)(void);
325 int __ecereVMethodID_class_OnGetString;
327 void SetYydebug(unsigned int b)
332 unsigned int GetParseError()
337 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
339 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
341 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
343 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
345 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
347 struct __ecereNameSpace__ecere__com__EnumClassData
349 struct __ecereNameSpace__ecere__sys__OldList values;
351 } __attribute__ ((gcc_struct));
353 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
355 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
357 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
359 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
361 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
363 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
365 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
367 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
371 struct CodePosition start;
372 struct CodePosition end;
373 } __attribute__ ((gcc_struct));
375 void ReadString(char * output, char * string)
377 int len = strlen(string);
379 unsigned int quoted = 0, escaped = 0;
381 for(c = 0; c < len; c++)
441 char * PrintInt(long long result)
445 if(result > (((int)0x7fffffff)))
446 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
448 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
449 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
451 return __ecereNameSpace__ecere__sys__CopyString(temp);
454 char * PrintUInt(uint64 result)
458 if(result > (0xffffffff))
459 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
460 else if(result > (((int)0x7fffffff)))
461 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
463 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
464 return __ecereNameSpace__ecere__sys__CopyString(temp);
467 char * PrintInt64(long long result)
471 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
472 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
474 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
475 return __ecereNameSpace__ecere__sys__CopyString(temp);
478 char * PrintUInt64(uint64 result)
482 if(result > (0xffffffff))
483 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
484 else if(result > (((int)0x7fffffff)))
485 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
487 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
488 return __ecereNameSpace__ecere__sys__CopyString(temp);
491 char * PrintHexUInt(uint64 result)
495 if(result > (0xffffffff))
496 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
498 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
499 if(result > (0xffffffff))
501 return __ecereNameSpace__ecere__sys__CopyString(temp);
504 char * PrintHexUInt64(uint64 result)
508 if(result > (0xffffffff))
509 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
511 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 return __ecereNameSpace__ecere__sys__CopyString(temp);
515 char * PrintShort(short result)
519 sprintf(temp, "%d", (unsigned short)result);
520 return __ecereNameSpace__ecere__sys__CopyString(temp);
523 char * PrintUShort(unsigned short result)
527 if(result > (unsigned short)32767)
528 sprintf(temp, "0x%X", (int)result);
530 sprintf(temp, "%d", (int)result);
531 return __ecereNameSpace__ecere__sys__CopyString(temp);
534 char * PrintUChar(unsigned char result)
538 sprintf(temp, "0x%X", result);
539 return __ecereNameSpace__ecere__sys__CopyString(temp);
542 char * PrintChar(char result)
546 if(result > (char)0 && isprint(result))
547 sprintf(temp, "'%c'", result);
548 else if(result < (char)0)
549 sprintf(temp, "%d", (int)result);
551 sprintf(temp, "0x%X", (unsigned char)result);
552 return __ecereNameSpace__ecere__sys__CopyString(temp);
555 char * PrintFloat(float result)
559 if(__ecereProp_float_Get_isInf(result))
561 if(__ecereProp_float_Get_signBit(result))
562 strcpy(temp, "-inf");
566 else if(__ecereProp_float_Get_isNan(result))
568 if(__ecereProp_float_Get_signBit(result))
569 strcpy(temp, "-nan");
574 sprintf(temp, "%.16ff", result);
575 return __ecereNameSpace__ecere__sys__CopyString(temp);
578 char * PrintDouble(double result)
582 if(__ecereProp_double_Get_isInf(result))
584 if(__ecereProp_double_Get_signBit(result))
585 strcpy(temp, "-inf");
589 else if(__ecereProp_double_Get_isNan(result))
591 if(__ecereProp_double_Get_signBit(result))
592 strcpy(temp, "-nan");
597 sprintf(temp, "%.16f", result);
598 return __ecereNameSpace__ecere__sys__CopyString(temp);
601 extern struct Location yylloc;
610 struct Attrib * attr;
611 } __attribute__ ((gcc_struct)) __anon1;
612 } __attribute__ ((gcc_struct));
614 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
618 extern struct Expression * parsedExpression;
620 extern struct Expression * QMkExpId(const char * id);
622 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
624 void ComputeExpression(struct Expression * exp);
626 extern struct Expression * MkExpConstant(const char * string);
628 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
630 extern void FreeExpression(struct Expression * exp);
632 extern void FreeExpContents(struct Expression * exp);
634 extern struct Expression * CopyExpression(struct Expression * exp);
636 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
638 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
640 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
642 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
644 extern struct Expression * MoveExpContents(struct Expression * exp);
646 extern struct Expression * QBrackets(struct Expression * exp);
648 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
652 static struct Statement * curCompound;
654 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
656 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
658 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
660 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
662 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
664 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
668 struct External * curExternal, * afterExternal;
670 extern void FreeExternal(struct External * external);
674 static struct Type * curSwitchType;
676 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
678 extern void FreeType(struct Type * type);
680 extern struct Type * MkClassType(const char * name);
682 extern void CopyTypeInto(struct Type * type, struct Type * src);
684 struct __ecereNameSpace__ecere__com__Class;
686 struct __ecereNameSpace__ecere__com__Instance
689 struct __ecereNameSpace__ecere__com__Class * _class;
691 } __attribute__ ((gcc_struct));
693 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
695 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
697 static struct __ecereNameSpace__ecere__com__Class * currentClass;
699 struct __ecereNameSpace__ecere__com__Class * thisClass;
701 struct __ecereNameSpace__ecere__com__Class * containerClass;
703 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
705 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
707 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
709 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
711 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
713 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
715 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
717 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
719 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
721 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
723 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
725 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
730 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
737 extern struct Context * curContext;
739 extern struct Context * topContext;
741 extern struct Context * PushContext(void);
743 extern void PopContext(struct Context * ctx);
745 extern void FreeContext(struct Context * context);
747 extern struct Context * globalContext;
751 extern struct ModuleImport * mainModule;
755 struct ModuleImport * prev;
756 struct ModuleImport * next;
758 struct __ecereNameSpace__ecere__sys__OldList classes;
759 struct __ecereNameSpace__ecere__sys__OldList functions;
762 } __attribute__ ((gcc_struct));
766 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
768 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
770 static void ProcessDeclaration(struct Declaration * decl);
772 struct __ecereNameSpace__ecere__com__NameSpace;
774 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
776 struct FunctionDefinition;
778 static struct FunctionDefinition * curFunction;
780 struct __ecereNameSpace__ecere__sys__BTNode;
782 struct __ecereNameSpace__ecere__sys__BTNode
785 struct __ecereNameSpace__ecere__sys__BTNode * parent;
786 struct __ecereNameSpace__ecere__sys__BTNode * left;
787 struct __ecereNameSpace__ecere__sys__BTNode * right;
789 } __attribute__ ((gcc_struct));
791 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
793 struct __ecereNameSpace__ecere__com__Property;
795 struct __ecereNameSpace__ecere__com__Property
797 struct __ecereNameSpace__ecere__com__Property * prev;
798 struct __ecereNameSpace__ecere__com__Property * next;
800 unsigned int isProperty;
803 struct __ecereNameSpace__ecere__com__Class * _class;
804 const char * dataTypeString;
805 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
806 struct Type * dataType;
807 void (* Set)(void * , int);
808 int (* Get)(void * );
809 unsigned int (* IsSet)(void * );
813 unsigned int conversion;
814 unsigned int watcherOffset;
815 const char * category;
816 unsigned int compiled;
817 unsigned int selfWatchable;
818 unsigned int isWatchable;
819 } __attribute__ ((gcc_struct));
821 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
823 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);
825 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
827 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
831 extern void FreeIdentifier(struct Identifier * id);
833 extern struct Identifier * MkIdentifier(const char * string);
835 extern struct Expression * MkExpIdentifier(struct Identifier * id);
837 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
839 extern struct Identifier * CopyIdentifier(struct Identifier * id);
841 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
843 struct __ecereNameSpace__ecere__sys__OldLink;
845 struct __ecereNameSpace__ecere__sys__OldLink
847 struct __ecereNameSpace__ecere__sys__OldLink * prev;
848 struct __ecereNameSpace__ecere__sys__OldLink * next;
850 } __attribute__ ((gcc_struct));
854 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
856 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
858 extern struct Specifier * MkSpecifier(int specifier);
860 extern struct Specifier * MkSpecifierName(const char * name);
862 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
864 extern void FreeSpecifier(struct Specifier * spec);
866 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
870 struct Statement * prev;
871 struct Statement * next;
876 struct __ecereNameSpace__ecere__sys__OldList * expressions;
879 struct Identifier * id;
880 struct Statement * stmt;
881 } __attribute__ ((gcc_struct)) labeled;
884 struct Expression * exp;
885 struct Statement * stmt;
886 } __attribute__ ((gcc_struct)) caseStmt;
889 struct __ecereNameSpace__ecere__sys__OldList * declarations;
890 struct __ecereNameSpace__ecere__sys__OldList * statements;
891 struct Context * context;
892 unsigned int isSwitch;
893 } __attribute__ ((gcc_struct)) compound;
896 struct __ecereNameSpace__ecere__sys__OldList * exp;
897 struct Statement * stmt;
898 struct Statement * elseStmt;
899 } __attribute__ ((gcc_struct)) ifStmt;
902 struct __ecereNameSpace__ecere__sys__OldList * exp;
903 struct Statement * stmt;
904 } __attribute__ ((gcc_struct)) switchStmt;
907 struct __ecereNameSpace__ecere__sys__OldList * exp;
908 struct Statement * stmt;
909 } __attribute__ ((gcc_struct)) whileStmt;
912 struct __ecereNameSpace__ecere__sys__OldList * exp;
913 struct Statement * stmt;
914 } __attribute__ ((gcc_struct)) doWhile;
917 struct Statement * init;
918 struct Statement * check;
919 struct __ecereNameSpace__ecere__sys__OldList * increment;
920 struct Statement * stmt;
921 } __attribute__ ((gcc_struct)) forStmt;
924 struct Identifier * id;
925 } __attribute__ ((gcc_struct)) gotoStmt;
928 struct Specifier * spec;
930 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
931 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
932 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
933 } __attribute__ ((gcc_struct)) asmStmt;
936 struct Expression * watcher;
937 struct Expression * object;
938 struct __ecereNameSpace__ecere__sys__OldList * watches;
939 } __attribute__ ((gcc_struct)) _watch;
942 struct Identifier * id;
943 struct __ecereNameSpace__ecere__sys__OldList * exp;
944 struct __ecereNameSpace__ecere__sys__OldList * filter;
945 struct Statement * stmt;
946 } __attribute__ ((gcc_struct)) forEachStmt;
947 struct Declaration * decl;
948 } __attribute__ ((gcc_struct)) __anon1;
949 } __attribute__ ((gcc_struct));
951 extern struct Specifier * CopySpecifier(struct Specifier * spec);
953 extern struct Expression * MkExpClassSize(struct Specifier * _class);
959 struct Identifier * prev;
960 struct Identifier * next;
962 struct Symbol * classSym;
963 struct Specifier * _class;
965 struct Identifier * badID;
966 } __attribute__ ((gcc_struct));
968 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
970 extern struct Symbol * FindClass(const char * name);
972 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
974 extern struct Symbol * FindType(struct Context * ctx, const char * name);
976 extern void FreeSymbol(struct Symbol * symbol);
980 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
982 extern void FreeClassDef(struct ClassDef * def);
986 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
988 struct TemplateDatatype
990 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
991 struct Declarator * decl;
992 } __attribute__ ((gcc_struct));
994 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
996 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
998 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1000 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1002 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1006 struct Declarator * prev;
1007 struct Declarator * next;
1008 struct Location loc;
1010 struct Symbol * symbol;
1011 struct Declarator * declarator;
1014 struct Identifier * identifier;
1017 struct Expression * exp;
1018 struct Expression * posExp;
1019 struct Attrib * attrib;
1020 } __attribute__ ((gcc_struct)) structDecl;
1023 struct Expression * exp;
1024 struct Specifier * enumClass;
1025 } __attribute__ ((gcc_struct)) array;
1028 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1029 } __attribute__ ((gcc_struct)) function;
1032 struct Pointer * pointer;
1033 } __attribute__ ((gcc_struct)) pointer;
1036 struct ExtDecl * extended;
1037 } __attribute__ ((gcc_struct)) extended;
1038 } __attribute__ ((gcc_struct)) __anon1;
1039 } __attribute__ ((gcc_struct));
1041 extern struct Identifier * GetDeclId(struct Declarator * decl);
1043 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1045 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1047 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1049 extern void FreeDeclarator(struct Declarator * decl);
1051 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1053 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1055 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1057 struct FunctionDefinition
1059 struct FunctionDefinition * prev;
1060 struct FunctionDefinition * next;
1061 struct Location loc;
1062 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1063 struct Declarator * declarator;
1064 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1065 struct Statement * body;
1066 struct __ecereNameSpace__ecere__com__Class * _class;
1067 struct __ecereNameSpace__ecere__sys__OldList attached;
1070 struct Symbol * propSet;
1072 unsigned int propertyNoThis;
1073 } __attribute__ ((gcc_struct));
1075 extern struct Declarator * QMkPtrDecl(const char * id);
1077 struct ClassFunction;
1079 struct ClassFunction
1081 struct ClassFunction * prev;
1082 struct ClassFunction * next;
1083 struct Location loc;
1084 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1085 struct Declarator * declarator;
1086 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1087 struct Statement * body;
1088 struct __ecereNameSpace__ecere__com__Class * _class;
1089 struct __ecereNameSpace__ecere__sys__OldList attached;
1092 struct Symbol * propSet;
1093 unsigned int isVirtual;
1094 unsigned int isConstructor;
1095 unsigned int isDestructor;
1096 unsigned int dontMangle;
1099 } __attribute__ ((gcc_struct));
1101 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);
1103 extern void FreeClassFunction(struct ClassFunction * func);
1105 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1107 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1111 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1113 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1117 struct TypeName * prev;
1118 struct TypeName * next;
1119 struct Location loc;
1120 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1121 struct Declarator * declarator;
1122 int classObjectType;
1123 struct Expression * bitCount;
1124 } __attribute__ ((gcc_struct));
1126 extern void FreeTypeName(struct TypeName * typeName);
1128 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1130 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1132 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1134 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1136 struct __ecereNameSpace__ecere__com__BTNamedLink;
1138 struct __ecereNameSpace__ecere__com__BTNamedLink
1141 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1142 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1143 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1146 } __attribute__ ((gcc_struct));
1148 struct __ecereNameSpace__ecere__sys__NamedLink64;
1150 struct __ecereNameSpace__ecere__sys__NamedLink64
1152 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1153 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1156 } __attribute__ ((gcc_struct));
1158 struct Instantiation;
1162 struct Declaration * prev;
1163 struct Declaration * next;
1164 struct Location loc;
1170 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1171 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1172 } __attribute__ ((gcc_struct)) __anon1;
1173 struct Instantiation * inst;
1176 struct Identifier * id;
1177 struct Expression * exp;
1178 } __attribute__ ((gcc_struct)) __anon2;
1179 } __attribute__ ((gcc_struct)) __anon1;
1180 struct Specifier * extStorage;
1181 struct Symbol * symbol;
1183 } __attribute__ ((gcc_struct));
1185 struct Instantiation
1187 struct Instantiation * prev;
1188 struct Instantiation * next;
1189 struct Location loc;
1190 struct Specifier * _class;
1191 struct Expression * exp;
1192 struct __ecereNameSpace__ecere__sys__OldList * members;
1193 struct Symbol * symbol;
1194 unsigned int fullSet;
1195 unsigned int isConstant;
1196 unsigned char * data;
1197 struct Location nameLoc;
1198 struct Location insideLoc;
1200 } __attribute__ ((gcc_struct));
1202 extern void FreeInstance(struct Instantiation * inst);
1204 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1206 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1208 struct InitDeclarator;
1210 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1212 struct PropertyWatch;
1214 struct PropertyWatch
1216 struct PropertyWatch * prev;
1217 struct PropertyWatch * next;
1218 struct Location loc;
1219 struct Statement * compound;
1220 struct __ecereNameSpace__ecere__sys__OldList * properties;
1221 unsigned int deleteWatch;
1222 } __attribute__ ((gcc_struct));
1224 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1226 struct PropertyImport;
1228 struct PropertyImport
1230 struct PropertyImport * prev;
1231 struct PropertyImport * next;
1233 unsigned int isVirtual;
1234 unsigned int hasSet;
1235 unsigned int hasGet;
1236 } __attribute__ ((gcc_struct));
1238 struct MethodImport;
1242 struct MethodImport * prev;
1243 struct MethodImport * next;
1245 unsigned int isVirtual;
1246 } __attribute__ ((gcc_struct));
1248 struct FunctionImport;
1250 struct FunctionImport
1252 struct FunctionImport * prev;
1253 struct FunctionImport * next;
1255 } __attribute__ ((gcc_struct));
1261 struct ClassImport * prev;
1262 struct ClassImport * next;
1264 struct __ecereNameSpace__ecere__sys__OldList methods;
1265 struct __ecereNameSpace__ecere__sys__OldList properties;
1266 unsigned int itself;
1268 } __attribute__ ((gcc_struct));
1274 struct Expression * prev;
1275 struct Expression * next;
1276 struct Location loc;
1283 struct Identifier * identifier;
1284 } __attribute__ ((gcc_struct)) __anon1;
1285 struct Statement * compound;
1286 struct Instantiation * instance;
1290 unsigned int intlString;
1291 unsigned int wideString;
1292 } __attribute__ ((gcc_struct)) __anon2;
1293 struct __ecereNameSpace__ecere__sys__OldList * list;
1296 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1297 struct Declarator * decl;
1298 } __attribute__ ((gcc_struct)) _classExp;
1301 struct Identifier * id;
1302 } __attribute__ ((gcc_struct)) classData;
1305 struct Expression * exp;
1306 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1307 struct Location argLoc;
1308 } __attribute__ ((gcc_struct)) call;
1311 struct Expression * exp;
1312 struct __ecereNameSpace__ecere__sys__OldList * index;
1313 } __attribute__ ((gcc_struct)) index;
1316 struct Expression * exp;
1317 struct Identifier * member;
1319 unsigned int thisPtr;
1320 } __attribute__ ((gcc_struct)) member;
1324 struct Expression * exp1;
1325 struct Expression * exp2;
1326 } __attribute__ ((gcc_struct)) op;
1327 struct TypeName * typeName;
1328 struct Specifier * _class;
1331 struct TypeName * typeName;
1332 struct Expression * exp;
1333 } __attribute__ ((gcc_struct)) cast;
1336 struct Expression * cond;
1337 struct __ecereNameSpace__ecere__sys__OldList * exp;
1338 struct Expression * elseExp;
1339 } __attribute__ ((gcc_struct)) cond;
1342 struct TypeName * typeName;
1343 struct Expression * size;
1344 } __attribute__ ((gcc_struct)) _new;
1347 struct TypeName * typeName;
1348 struct Expression * size;
1349 struct Expression * exp;
1350 } __attribute__ ((gcc_struct)) _renew;
1354 struct Identifier * id;
1355 } __attribute__ ((gcc_struct)) db;
1358 struct Expression * ds;
1359 struct Expression * name;
1360 } __attribute__ ((gcc_struct)) dbopen;
1363 struct TypeName * typeName;
1364 struct Initializer * initializer;
1365 } __attribute__ ((gcc_struct)) initializer;
1368 struct Expression * exp;
1369 struct TypeName * typeName;
1370 } __attribute__ ((gcc_struct)) vaArg;
1371 } __attribute__ ((gcc_struct)) __anon1;
1372 unsigned int debugValue;
1373 struct __ecereNameSpace__ecere__com__DataValue val;
1375 unsigned int hasAddress;
1376 struct Type * expType;
1377 struct Type * destType;
1380 unsigned int byReference;
1381 unsigned int isConstant;
1382 unsigned int addedThis;
1383 unsigned int needCast;
1384 unsigned int thisPtr;
1385 unsigned int opDestType;
1386 unsigned int needTemplateCast;
1387 } __attribute__ ((gcc_struct));
1389 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1393 struct Initializer * prev;
1394 struct Initializer * next;
1395 struct Location loc;
1399 struct Expression * exp;
1400 struct __ecereNameSpace__ecere__sys__OldList * list;
1401 } __attribute__ ((gcc_struct)) __anon1;
1402 unsigned int isConstant;
1403 struct Identifier * id;
1404 } __attribute__ ((gcc_struct));
1406 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1408 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1410 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1412 struct InitDeclarator
1414 struct InitDeclarator * prev;
1415 struct InitDeclarator * next;
1416 struct Location loc;
1417 struct Declarator * declarator;
1418 struct Initializer * initializer;
1419 } __attribute__ ((gcc_struct));
1421 void ApplyLocation(struct Expression * exp, struct Location * loc)
1427 if(exp->__anon1.op.exp1)
1428 ApplyLocation(exp->__anon1.op.exp1, loc);
1429 if(exp->__anon1.op.exp2)
1430 ApplyLocation(exp->__anon1.op.exp2, loc);
1433 if(exp->__anon1.list)
1435 struct Expression * e;
1437 for(e = (*exp->__anon1.list).first; e; e = e->next)
1438 ApplyLocation(e, loc);
1442 if(exp->__anon1.index.index)
1444 struct Expression * e;
1446 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1447 ApplyLocation(e, loc);
1449 if(exp->__anon1.index.exp)
1450 ApplyLocation(exp->__anon1.index.exp, loc);
1453 if(exp->__anon1.call.arguments)
1455 struct Expression * arg;
1457 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1458 ApplyLocation(arg, loc);
1460 if(exp->__anon1.call.exp)
1461 ApplyLocation(exp->__anon1.call.exp, loc);
1465 if(exp->__anon1.member.exp)
1466 ApplyLocation(exp->__anon1.member.exp, loc);
1469 if(exp->__anon1.cast.exp)
1470 ApplyLocation(exp->__anon1.cast.exp, loc);
1473 if(exp->__anon1.cond.exp)
1475 struct Expression * e;
1477 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1478 ApplyLocation(e, loc);
1480 if(exp->__anon1.cond.cond)
1481 ApplyLocation(exp->__anon1.cond.cond, loc);
1482 if(exp->__anon1.cond.elseExp)
1483 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1486 if(exp->__anon1.vaArg.exp)
1487 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1494 void __ecereMethod_Expression_Clear();
1500 struct MembersInit * prev;
1501 struct MembersInit * next;
1502 struct Location loc;
1506 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1507 struct ClassFunction * function;
1508 } __attribute__ ((gcc_struct)) __anon1;
1509 } __attribute__ ((gcc_struct));
1511 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1517 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1518 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1519 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1520 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1521 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1522 unsigned int (* Neg)(struct Expression *, struct Operand *);
1523 unsigned int (* Inc)(struct Expression *, struct Operand *);
1524 unsigned int (* Dec)(struct Expression *, struct Operand *);
1525 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1526 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1527 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1528 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1529 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1530 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1531 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1532 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1533 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1534 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1535 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1537 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* Not)(struct Expression *, struct Operand *);
1543 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1552 } __attribute__ ((gcc_struct));
1558 unsigned int ptrSize;
1571 } __attribute__ ((gcc_struct)) __anon1;
1573 } __attribute__ ((gcc_struct));
1575 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1577 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1579 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1582 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1584 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1586 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1589 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1591 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1594 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1596 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1598 _PrintType(type, string, printName, fullName, 1);
1601 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1603 _PrintType(type, string, printName, fullName, 0);
1606 struct __ecereNameSpace__ecere__com__Method;
1608 struct __ecereNameSpace__ecere__com__Method
1611 struct __ecereNameSpace__ecere__com__Method * parent;
1612 struct __ecereNameSpace__ecere__com__Method * left;
1613 struct __ecereNameSpace__ecere__com__Method * right;
1618 struct __ecereNameSpace__ecere__com__Class * _class;
1620 const char * dataTypeString;
1621 struct Type * dataType;
1623 } __attribute__ ((gcc_struct));
1628 struct Symbol * parent;
1629 struct Symbol * left;
1630 struct Symbol * right;
1635 struct __ecereNameSpace__ecere__com__Method * method;
1636 struct __ecereNameSpace__ecere__com__Property * _property;
1637 struct __ecereNameSpace__ecere__com__Class * registered;
1638 } __attribute__ ((gcc_struct)) __anon1;
1639 unsigned int notYetDeclared;
1644 struct External * pointerExternal;
1645 struct External * structExternal;
1646 } __attribute__ ((gcc_struct)) __anon1;
1649 struct External * externalGet;
1650 struct External * externalSet;
1651 struct External * externalPtr;
1652 struct External * externalIsSet;
1653 } __attribute__ ((gcc_struct)) __anon2;
1656 struct External * methodExternal;
1657 struct External * methodCodeExternal;
1658 } __attribute__ ((gcc_struct)) __anon3;
1659 } __attribute__ ((gcc_struct)) __anon2;
1660 unsigned int imported;
1661 unsigned int declaredStructSym;
1662 struct __ecereNameSpace__ecere__com__Class * _class;
1663 unsigned int declaredStruct;
1664 unsigned int needConstructor;
1665 unsigned int needDestructor;
1666 char * constructorName;
1669 char * destructorName;
1670 struct ModuleImport * module;
1671 struct ClassImport * _import;
1672 struct Location nameLoc;
1673 unsigned int isParam;
1674 unsigned int isRemote;
1675 unsigned int isStruct;
1676 unsigned int fireWatchersDone;
1678 unsigned int classData;
1679 unsigned int isStatic;
1681 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1682 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1683 struct Context * ctx;
1685 struct Expression * propCategory;
1686 } __attribute__ ((gcc_struct));
1688 struct __ecereNameSpace__ecere__com__ClassProperty;
1690 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1692 struct __ecereNameSpace__ecere__com__ClassProperty
1695 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1696 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1697 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1699 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1700 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1701 const char * dataTypeString;
1702 struct Type * dataType;
1703 unsigned int constant;
1704 } __attribute__ ((gcc_struct));
1706 struct __ecereNameSpace__ecere__com__BitMember;
1708 struct __ecereNameSpace__ecere__com__BitMember
1710 struct __ecereNameSpace__ecere__com__BitMember * prev;
1711 struct __ecereNameSpace__ecere__com__BitMember * next;
1713 unsigned int isProperty;
1716 struct __ecereNameSpace__ecere__com__Class * _class;
1717 const char * dataTypeString;
1718 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1719 struct Type * dataType;
1724 } __attribute__ ((gcc_struct));
1726 struct __ecereNameSpace__ecere__com__DataMember;
1728 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1734 const char * dataTypeString;
1735 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1736 } __attribute__ ((gcc_struct)) __anon1;
1737 struct __ecereNameSpace__ecere__com__DataValue expression;
1740 const char * memberString;
1743 struct __ecereNameSpace__ecere__com__DataMember * member;
1744 struct __ecereNameSpace__ecere__com__Property * prop;
1745 struct __ecereNameSpace__ecere__com__Method * method;
1746 } __attribute__ ((gcc_struct)) __anon1;
1747 } __attribute__ ((gcc_struct)) __anon2;
1748 } __attribute__ ((gcc_struct)) __anon1;
1749 } __attribute__ ((gcc_struct));
1751 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);
1753 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);
1755 struct TemplateParameter;
1757 struct TemplateParameter
1759 struct TemplateParameter * prev;
1760 struct TemplateParameter * next;
1761 struct Location loc;
1763 struct Identifier * identifier;
1766 struct TemplateDatatype * dataType;
1768 } __attribute__ ((gcc_struct)) __anon1;
1769 struct TemplateArgument * defaultArgument;
1770 const char * dataTypeString;
1771 struct Type * baseType;
1772 } __attribute__ ((gcc_struct));
1781 struct Symbol * _class;
1784 struct __ecereNameSpace__ecere__sys__OldList members;
1786 } __attribute__ ((gcc_struct)) __anon1;
1789 struct Type * returnType;
1790 struct __ecereNameSpace__ecere__sys__OldList params;
1791 struct Symbol * thisClass;
1792 unsigned int staticMethod;
1793 struct TemplateParameter * thisClassTemplate;
1794 } __attribute__ ((gcc_struct)) __anon2;
1797 struct __ecereNameSpace__ecere__com__Method * method;
1798 struct __ecereNameSpace__ecere__com__Class * methodClass;
1799 struct __ecereNameSpace__ecere__com__Class * usedClass;
1800 } __attribute__ ((gcc_struct)) __anon3;
1803 struct Type * arrayType;
1805 struct Expression * arraySizeExp;
1806 unsigned int freeExp;
1807 struct Symbol * enumClass;
1808 } __attribute__ ((gcc_struct)) __anon4;
1810 struct TemplateParameter * templateParameter;
1811 } __attribute__ ((gcc_struct)) __anon1;
1816 int classObjectType;
1818 unsigned int offset;
1821 unsigned int isSigned : 1;
1822 unsigned int constant : 1;
1823 unsigned int truth : 1;
1824 unsigned int byReference : 1;
1825 unsigned int extraParam : 1;
1826 unsigned int directClassAccess : 1;
1827 unsigned int computing : 1;
1828 unsigned int keepCast : 1;
1829 unsigned int passAsTemplate : 1;
1830 unsigned int dllExport : 1;
1831 unsigned int attrStdcall : 1;
1832 unsigned int declaredWithStruct : 1;
1833 unsigned int typedByReference : 1;
1834 unsigned int casted : 1;
1835 unsigned int pointerAlignment : 1;
1836 } __attribute__ ((gcc_struct));
1840 struct Specifier * prev;
1841 struct Specifier * next;
1842 struct Location loc;
1849 struct ExtDecl * extDecl;
1851 struct Symbol * symbol;
1852 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1853 } __attribute__ ((gcc_struct)) __anon1;
1856 struct Identifier * id;
1857 struct __ecereNameSpace__ecere__sys__OldList * list;
1858 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1859 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1860 unsigned int addNameSpace;
1861 struct Context * ctx;
1862 struct ExtDecl * extDeclStruct;
1863 } __attribute__ ((gcc_struct)) __anon2;
1864 struct Expression * expression;
1865 struct Specifier * _class;
1866 struct TemplateParameter * templateParameter;
1867 } __attribute__ ((gcc_struct)) __anon1;
1868 } __attribute__ ((gcc_struct));
1870 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1872 struct TemplatedType
1875 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1876 struct __ecereNameSpace__ecere__sys__BTNode * left;
1877 struct __ecereNameSpace__ecere__sys__BTNode * right;
1879 struct TemplateParameter * param;
1880 } __attribute__ ((gcc_struct));
1882 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1884 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1886 if(!param->baseType)
1888 if(param->dataTypeString)
1889 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1891 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1893 return param->baseType;
1895 return (((void *)0));
1898 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1900 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1902 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1906 if(type1->kind == type2->kind)
1917 if(type1->passAsTemplate && !type2->passAsTemplate)
1919 return type1->isSigned != type2->isSigned;
1921 return type1->__anon1._class != type2->__anon1._class;
1923 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1931 unsigned int GetOpInt(struct Operand * op2, int * value2)
1933 if(op2->kind == 3 && op2->type->isSigned)
1934 *value2 = op2->__anon1.i;
1935 else if(op2->kind == 3)
1936 *value2 = (int)op2->__anon1.ui;
1937 else if(op2->kind == 4 && op2->type->isSigned)
1938 *value2 = (int)op2->__anon1.i64;
1939 else if(op2->kind == 4)
1940 *value2 = (int)op2->__anon1.ui64;
1941 else if(op2->kind == 23 && op2->type->isSigned)
1942 *value2 = (int)op2->__anon1.i64;
1943 else if(op2->kind == 23)
1944 *value2 = (int)op2->__anon1.ui64;
1945 else if(op2->kind == 22 && op2->type->isSigned)
1946 *value2 = (int)op2->__anon1.i64;
1947 else if(op2->kind == 22)
1948 *value2 = (int)op2->__anon1.ui64;
1949 else if(op2->kind == 2 && op2->type->isSigned)
1950 *value2 = (int)op2->__anon1.s;
1951 else if(op2->kind == 2)
1952 *value2 = (int)op2->__anon1.us;
1953 else if(op2->kind == 1 && op2->type->isSigned)
1954 *value2 = (int)op2->__anon1.c;
1955 else if(op2->kind == 24 || op2->kind == 1)
1956 *value2 = (int)op2->__anon1.uc;
1957 else if(op2->kind == 6)
1958 *value2 = (int)op2->__anon1.f;
1959 else if(op2->kind == 7)
1960 *value2 = (int)op2->__anon1.d;
1961 else if(op2->kind == 13)
1962 *value2 = (int)op2->__anon1.ui64;
1968 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1970 if(op2->kind == 3 && op2->type->isSigned)
1971 *value2 = (unsigned int)op2->__anon1.i;
1972 else if(op2->kind == 3)
1973 *value2 = op2->__anon1.ui;
1974 else if(op2->kind == 4 && op2->type->isSigned)
1975 *value2 = (unsigned int)op2->__anon1.i64;
1976 else if(op2->kind == 4)
1977 *value2 = (unsigned int)op2->__anon1.ui64;
1978 else if(op2->kind == 23 && op2->type->isSigned)
1979 *value2 = (unsigned int)op2->__anon1.i64;
1980 else if(op2->kind == 23)
1981 *value2 = (unsigned int)op2->__anon1.ui64;
1982 else if(op2->kind == 22 && op2->type->isSigned)
1983 *value2 = (unsigned int)op2->__anon1.i64;
1984 else if(op2->kind == 22)
1985 *value2 = (unsigned int)op2->__anon1.ui64;
1986 else if(op2->kind == 2 && op2->type->isSigned)
1987 *value2 = (unsigned int)op2->__anon1.s;
1988 else if(op2->kind == 2)
1989 *value2 = (unsigned int)op2->__anon1.us;
1990 else if(op2->kind == 1 && op2->type->isSigned)
1991 *value2 = (unsigned int)op2->__anon1.c;
1992 else if(op2->kind == 24 || op2->kind == 1)
1993 *value2 = (unsigned int)op2->__anon1.uc;
1994 else if(op2->kind == 6)
1995 *value2 = (unsigned int)op2->__anon1.f;
1996 else if(op2->kind == 7)
1997 *value2 = (unsigned int)op2->__anon1.d;
1998 else if(op2->kind == 13)
1999 *value2 = (unsigned int)op2->__anon1.ui64;
2005 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2007 if(op2->kind == 3 && op2->type->isSigned)
2008 *value2 = (long long)op2->__anon1.i;
2009 else if(op2->kind == 3)
2010 *value2 = (long long)op2->__anon1.ui;
2011 else if(op2->kind == 4 && op2->type->isSigned)
2012 *value2 = op2->__anon1.i64;
2013 else if(op2->kind == 4)
2014 *value2 = (long long)op2->__anon1.ui64;
2015 else if(op2->kind == 23 && op2->type->isSigned)
2016 *value2 = op2->__anon1.i64;
2017 else if(op2->kind == 23)
2018 *value2 = (long long)op2->__anon1.ui64;
2019 else if(op2->kind == 22 && op2->type->isSigned)
2020 *value2 = op2->__anon1.i64;
2021 else if(op2->kind == 22)
2022 *value2 = (long long)op2->__anon1.ui64;
2023 else if(op2->kind == 2 && op2->type->isSigned)
2024 *value2 = (long long)op2->__anon1.s;
2025 else if(op2->kind == 2)
2026 *value2 = (long long)op2->__anon1.us;
2027 else if(op2->kind == 1 && op2->type->isSigned)
2028 *value2 = (long long)op2->__anon1.c;
2029 else if(op2->kind == 24 || op2->kind == 1)
2030 *value2 = (long long)op2->__anon1.uc;
2031 else if(op2->kind == 6)
2032 *value2 = (long long)op2->__anon1.f;
2033 else if(op2->kind == 7)
2034 *value2 = (long long)op2->__anon1.d;
2035 else if(op2->kind == 13)
2036 *value2 = (long long)op2->__anon1.ui64;
2042 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2044 if(op2->kind == 3 && op2->type->isSigned)
2045 *value2 = (uint64)op2->__anon1.i;
2046 else if(op2->kind == 3)
2047 *value2 = (uint64)op2->__anon1.ui;
2048 else if(op2->kind == 4 && op2->type->isSigned)
2049 *value2 = (uint64)op2->__anon1.i64;
2050 else if(op2->kind == 4)
2051 *value2 = op2->__anon1.ui64;
2052 else if(op2->kind == 23 && op2->type->isSigned)
2053 *value2 = (uint64)op2->__anon1.i64;
2054 else if(op2->kind == 23)
2055 *value2 = op2->__anon1.ui64;
2056 else if(op2->kind == 22 && op2->type->isSigned)
2057 *value2 = (uint64)op2->__anon1.i64;
2058 else if(op2->kind == 22)
2059 *value2 = op2->__anon1.ui64;
2060 else if(op2->kind == 2 && op2->type->isSigned)
2061 *value2 = (uint64)op2->__anon1.s;
2062 else if(op2->kind == 2)
2063 *value2 = (uint64)op2->__anon1.us;
2064 else if(op2->kind == 1 && op2->type->isSigned)
2065 *value2 = (uint64)op2->__anon1.c;
2066 else if(op2->kind == 24 || op2->kind == 1)
2067 *value2 = (uint64)op2->__anon1.uc;
2068 else if(op2->kind == 6)
2069 *value2 = (uint64)op2->__anon1.f;
2070 else if(op2->kind == 7)
2071 *value2 = (uint64)op2->__anon1.d;
2072 else if(op2->kind == 13)
2073 *value2 = op2->__anon1.ui64;
2079 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2081 if(op2->kind == 3 && op2->type->isSigned)
2082 *value2 = (intptr_t)op2->__anon1.i;
2083 else if(op2->kind == 3)
2084 *value2 = (intptr_t)op2->__anon1.ui;
2085 else if(op2->kind == 4 && op2->type->isSigned)
2086 *value2 = (intptr_t)op2->__anon1.i64;
2087 else if(op2->kind == 4)
2088 *value2 = (intptr_t)op2->__anon1.ui64;
2089 else if(op2->kind == 23 && op2->type->isSigned)
2090 *value2 = (intptr_t)op2->__anon1.i64;
2091 else if(op2->kind == 23)
2092 *value2 = (intptr_t)op2->__anon1.ui64;
2093 else if(op2->kind == 22 && op2->type->isSigned)
2094 *value2 = (intptr_t)op2->__anon1.i64;
2095 else if(op2->kind == 22)
2096 *value2 = (intptr_t)op2->__anon1.ui64;
2097 else if(op2->kind == 2 && op2->type->isSigned)
2098 *value2 = (intptr_t)op2->__anon1.s;
2099 else if(op2->kind == 2)
2100 *value2 = (intptr_t)op2->__anon1.us;
2101 else if(op2->kind == 1 && op2->type->isSigned)
2102 *value2 = (intptr_t)op2->__anon1.c;
2103 else if(op2->kind == 24 || op2->kind == 1)
2104 *value2 = (intptr_t)op2->__anon1.uc;
2105 else if(op2->kind == 6)
2106 *value2 = (intptr_t)op2->__anon1.f;
2107 else if(op2->kind == 7)
2108 *value2 = (intptr_t)op2->__anon1.d;
2109 else if(op2->kind == 13)
2110 *value2 = (intptr_t)op2->__anon1.ui64;
2116 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2118 if(op2->kind == 3 && op2->type->isSigned)
2119 *value2 = (uintptr_t)op2->__anon1.i;
2120 else if(op2->kind == 3)
2121 *value2 = (uintptr_t)op2->__anon1.ui;
2122 else if(op2->kind == 4 && op2->type->isSigned)
2123 *value2 = (uintptr_t)op2->__anon1.i64;
2124 else if(op2->kind == 4)
2125 *value2 = (uintptr_t)op2->__anon1.ui64;
2126 else if(op2->kind == 23 && op2->type->isSigned)
2127 *value2 = (uintptr_t)op2->__anon1.i64;
2128 else if(op2->kind == 23)
2129 *value2 = (uintptr_t)op2->__anon1.ui64;
2130 else if(op2->kind == 22 && op2->type->isSigned)
2131 *value2 = (uintptr_t)op2->__anon1.i64;
2132 else if(op2->kind == 22)
2133 *value2 = (uintptr_t)op2->__anon1.ui64;
2134 else if(op2->kind == 2 && op2->type->isSigned)
2135 *value2 = (uintptr_t)op2->__anon1.s;
2136 else if(op2->kind == 2)
2137 *value2 = (uintptr_t)op2->__anon1.us;
2138 else if(op2->kind == 1 && op2->type->isSigned)
2139 *value2 = (uintptr_t)op2->__anon1.c;
2140 else if(op2->kind == 24 || op2->kind == 1)
2141 *value2 = (uintptr_t)op2->__anon1.uc;
2142 else if(op2->kind == 6)
2143 *value2 = (uintptr_t)op2->__anon1.f;
2144 else if(op2->kind == 7)
2145 *value2 = (uintptr_t)op2->__anon1.d;
2146 else if(op2->kind == 13)
2147 *value2 = (uintptr_t)op2->__anon1.ui64;
2153 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2155 if(op2->kind == 3 && op2->type->isSigned)
2156 *value2 = (ssize_t)op2->__anon1.i;
2157 else if(op2->kind == 3)
2158 *value2 = (ssize_t)op2->__anon1.ui;
2159 else if(op2->kind == 4 && op2->type->isSigned)
2160 *value2 = (ssize_t)op2->__anon1.i64;
2161 else if(op2->kind == 4)
2162 *value2 = (ssize_t)op2->__anon1.ui64;
2163 else if(op2->kind == 23 && op2->type->isSigned)
2164 *value2 = (ssize_t)op2->__anon1.i64;
2165 else if(op2->kind == 23)
2166 *value2 = (ssize_t)op2->__anon1.ui64;
2167 else if(op2->kind == 22 && op2->type->isSigned)
2168 *value2 = (ssize_t)op2->__anon1.i64;
2169 else if(op2->kind == 22)
2170 *value2 = (ssize_t)op2->__anon1.ui64;
2171 else if(op2->kind == 2 && op2->type->isSigned)
2172 *value2 = (ssize_t)op2->__anon1.s;
2173 else if(op2->kind == 2)
2174 *value2 = (ssize_t)op2->__anon1.us;
2175 else if(op2->kind == 1 && op2->type->isSigned)
2176 *value2 = (ssize_t)op2->__anon1.c;
2177 else if(op2->kind == 24 || op2->kind == 1)
2178 *value2 = (ssize_t)op2->__anon1.uc;
2179 else if(op2->kind == 6)
2180 *value2 = (ssize_t)op2->__anon1.f;
2181 else if(op2->kind == 7)
2182 *value2 = (ssize_t)op2->__anon1.d;
2183 else if(op2->kind == 13)
2184 *value2 = (ssize_t)op2->__anon1.ui64;
2190 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2192 if(op2->kind == 3 && op2->type->isSigned)
2193 *value2 = (size_t)op2->__anon1.i;
2194 else if(op2->kind == 3)
2195 *value2 = (size_t)op2->__anon1.ui;
2196 else if(op2->kind == 4 && op2->type->isSigned)
2197 *value2 = (size_t)op2->__anon1.i64;
2198 else if(op2->kind == 4)
2199 *value2 = (size_t)op2->__anon1.ui64;
2200 else if(op2->kind == 23 && op2->type->isSigned)
2201 *value2 = (size_t)op2->__anon1.i64;
2202 else if(op2->kind == 23)
2203 *value2 = (size_t)op2->__anon1.ui64;
2204 else if(op2->kind == 22 && op2->type->isSigned)
2205 *value2 = (size_t)op2->__anon1.i64;
2206 else if(op2->kind == 22)
2207 *value2 = (size_t)op2->__anon1.ui64;
2208 else if(op2->kind == 2 && op2->type->isSigned)
2209 *value2 = (size_t)op2->__anon1.s;
2210 else if(op2->kind == 2)
2211 *value2 = (size_t)op2->__anon1.us;
2212 else if(op2->kind == 1 && op2->type->isSigned)
2213 *value2 = (size_t)op2->__anon1.c;
2214 else if(op2->kind == 24 || op2->kind == 1)
2215 *value2 = (size_t)op2->__anon1.uc;
2216 else if(op2->kind == 6)
2217 *value2 = (size_t)op2->__anon1.f;
2218 else if(op2->kind == 7)
2219 *value2 = (size_t)op2->__anon1.d;
2220 else if(op2->kind == 13)
2221 *value2 = (size_t)op2->__anon1.ui64;
2227 unsigned int GetOpShort(struct Operand * op2, short * value2)
2229 if(op2->kind == 3 && op2->type->isSigned)
2230 *value2 = (short)op2->__anon1.i;
2231 else if(op2->kind == 3)
2232 *value2 = (short)op2->__anon1.ui;
2233 else if(op2->kind == 4 && op2->type->isSigned)
2234 *value2 = (short)op2->__anon1.i64;
2235 else if(op2->kind == 4)
2236 *value2 = (short)op2->__anon1.ui64;
2237 else if(op2->kind == 23 && op2->type->isSigned)
2238 *value2 = (short)op2->__anon1.i64;
2239 else if(op2->kind == 23)
2240 *value2 = (short)op2->__anon1.ui64;
2241 else if(op2->kind == 22 && op2->type->isSigned)
2242 *value2 = (short)op2->__anon1.i64;
2243 else if(op2->kind == 22)
2244 *value2 = (short)op2->__anon1.ui64;
2245 else if(op2->kind == 2 && op2->type->isSigned)
2246 *value2 = op2->__anon1.s;
2247 else if(op2->kind == 2)
2248 *value2 = (short)op2->__anon1.us;
2249 else if(op2->kind == 1 && op2->type->isSigned)
2250 *value2 = (short)op2->__anon1.c;
2251 else if(op2->kind == 24 || op2->kind == 1)
2252 *value2 = (short)op2->__anon1.uc;
2253 else if(op2->kind == 6)
2254 *value2 = (short)op2->__anon1.f;
2255 else if(op2->kind == 7)
2256 *value2 = (short)op2->__anon1.d;
2257 else if(op2->kind == 13)
2258 *value2 = (short)op2->__anon1.ui64;
2264 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2266 if(op2->kind == 3 && op2->type->isSigned)
2267 *value2 = (unsigned short)op2->__anon1.i;
2268 else if(op2->kind == 3)
2269 *value2 = (unsigned short)op2->__anon1.ui;
2270 else if(op2->kind == 4 && op2->type->isSigned)
2271 *value2 = (unsigned short)op2->__anon1.i64;
2272 else if(op2->kind == 4)
2273 *value2 = (unsigned short)op2->__anon1.ui64;
2274 else if(op2->kind == 23 && op2->type->isSigned)
2275 *value2 = (unsigned short)op2->__anon1.i64;
2276 else if(op2->kind == 23)
2277 *value2 = (unsigned short)op2->__anon1.ui64;
2278 else if(op2->kind == 22 && op2->type->isSigned)
2279 *value2 = (unsigned short)op2->__anon1.i64;
2280 else if(op2->kind == 22)
2281 *value2 = (unsigned short)op2->__anon1.ui64;
2282 else if(op2->kind == 2 && op2->type->isSigned)
2283 *value2 = (unsigned short)op2->__anon1.s;
2284 else if(op2->kind == 2)
2285 *value2 = op2->__anon1.us;
2286 else if(op2->kind == 1 && op2->type->isSigned)
2287 *value2 = (unsigned short)op2->__anon1.c;
2288 else if(op2->kind == 24 || op2->kind == 1)
2289 *value2 = (unsigned short)op2->__anon1.uc;
2290 else if(op2->kind == 6)
2291 *value2 = (unsigned short)op2->__anon1.f;
2292 else if(op2->kind == 7)
2293 *value2 = (unsigned short)op2->__anon1.d;
2294 else if(op2->kind == 13)
2295 *value2 = (unsigned short)op2->__anon1.ui64;
2301 unsigned int GetOpChar(struct Operand * op2, char * value2)
2303 if(op2->kind == 3 && op2->type->isSigned)
2304 *value2 = (char)op2->__anon1.i;
2305 else if(op2->kind == 3)
2306 *value2 = (char)op2->__anon1.ui;
2307 else if(op2->kind == 4 && op2->type->isSigned)
2308 *value2 = (char)op2->__anon1.i64;
2309 else if(op2->kind == 4)
2310 *value2 = (char)op2->__anon1.ui64;
2311 else if(op2->kind == 23 && op2->type->isSigned)
2312 *value2 = (char)op2->__anon1.i64;
2313 else if(op2->kind == 23)
2314 *value2 = (char)op2->__anon1.ui64;
2315 else if(op2->kind == 22 && op2->type->isSigned)
2316 *value2 = (char)op2->__anon1.i64;
2317 else if(op2->kind == 22)
2318 *value2 = (char)op2->__anon1.ui64;
2319 else if(op2->kind == 2 && op2->type->isSigned)
2320 *value2 = (char)op2->__anon1.s;
2321 else if(op2->kind == 2)
2322 *value2 = (char)op2->__anon1.us;
2323 else if(op2->kind == 1 && op2->type->isSigned)
2324 *value2 = op2->__anon1.c;
2325 else if(op2->kind == 24 || op2->kind == 1)
2326 *value2 = (char)op2->__anon1.uc;
2327 else if(op2->kind == 6)
2328 *value2 = (char)op2->__anon1.f;
2329 else if(op2->kind == 7)
2330 *value2 = (char)op2->__anon1.d;
2331 else if(op2->kind == 13)
2332 *value2 = (char)op2->__anon1.ui64;
2338 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2340 if(op2->kind == 3 && op2->type->isSigned)
2341 *value2 = (unsigned char)op2->__anon1.i;
2342 else if(op2->kind == 3)
2343 *value2 = (unsigned char)op2->__anon1.ui;
2344 else if(op2->kind == 4 && op2->type->isSigned)
2345 *value2 = (unsigned char)op2->__anon1.i64;
2346 else if(op2->kind == 4)
2347 *value2 = (unsigned char)op2->__anon1.ui64;
2348 else if(op2->kind == 23 && op2->type->isSigned)
2349 *value2 = (unsigned char)op2->__anon1.i64;
2350 else if(op2->kind == 23)
2351 *value2 = (unsigned char)op2->__anon1.ui64;
2352 else if(op2->kind == 22 && op2->type->isSigned)
2353 *value2 = (unsigned char)op2->__anon1.i64;
2354 else if(op2->kind == 22)
2355 *value2 = (unsigned char)op2->__anon1.ui64;
2356 else if(op2->kind == 2 && op2->type->isSigned)
2357 *value2 = (unsigned char)op2->__anon1.s;
2358 else if(op2->kind == 2)
2359 *value2 = (unsigned char)op2->__anon1.us;
2360 else if(op2->kind == 1 && op2->type->isSigned)
2361 *value2 = (unsigned char)op2->__anon1.c;
2362 else if(op2->kind == 24 || op2->kind == 1)
2363 *value2 = op2->__anon1.uc;
2364 else if(op2->kind == 6)
2365 *value2 = (unsigned char)op2->__anon1.f;
2366 else if(op2->kind == 7)
2367 *value2 = (unsigned char)op2->__anon1.d;
2368 else if(op2->kind == 13)
2369 *value2 = (unsigned char)op2->__anon1.ui64;
2375 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2377 if(op2->kind == 3 && op2->type->isSigned)
2378 *value2 = (float)(float)op2->__anon1.i;
2379 else if(op2->kind == 3)
2380 *value2 = (float)(float)op2->__anon1.ui;
2381 else if(op2->kind == 4 && op2->type->isSigned)
2382 *value2 = (float)(float)op2->__anon1.i64;
2383 else if(op2->kind == 4)
2384 *value2 = (float)(float)op2->__anon1.ui64;
2385 else if(op2->kind == 23 && op2->type->isSigned)
2386 *value2 = (float)(float)op2->__anon1.i64;
2387 else if(op2->kind == 23)
2388 *value2 = (float)(float)op2->__anon1.ui64;
2389 else if(op2->kind == 22 && op2->type->isSigned)
2390 *value2 = (float)(float)op2->__anon1.i64;
2391 else if(op2->kind == 22)
2392 *value2 = (float)(float)op2->__anon1.ui64;
2393 else if(op2->kind == 2 && op2->type->isSigned)
2394 *value2 = (float)(float)op2->__anon1.s;
2395 else if(op2->kind == 2)
2396 *value2 = (float)(float)op2->__anon1.us;
2397 else if(op2->kind == 1 && op2->type->isSigned)
2398 *value2 = (float)(float)op2->__anon1.c;
2399 else if(op2->kind == 24 || op2->kind == 1)
2400 *value2 = (float)(float)op2->__anon1.uc;
2401 else if(op2->kind == 6)
2402 *value2 = (float)op2->__anon1.f;
2403 else if(op2->kind == 7)
2404 *value2 = (float)op2->__anon1.d;
2405 else if(op2->kind == 13)
2406 *value2 = (float)(float)op2->__anon1.ui64;
2412 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2414 if(op2->kind == 3 && op2->type->isSigned)
2415 *value2 = (double)(double)op2->__anon1.i;
2416 else if(op2->kind == 3)
2417 *value2 = (double)(double)op2->__anon1.ui;
2418 else if(op2->kind == 4 && op2->type->isSigned)
2419 *value2 = (double)(double)op2->__anon1.i64;
2420 else if(op2->kind == 4)
2421 *value2 = (double)(double)op2->__anon1.ui64;
2422 else if(op2->kind == 23 && op2->type->isSigned)
2423 *value2 = (double)(double)op2->__anon1.i64;
2424 else if(op2->kind == 23)
2425 *value2 = (double)(double)op2->__anon1.ui64;
2426 else if(op2->kind == 22 && op2->type->isSigned)
2427 *value2 = (double)(double)op2->__anon1.i64;
2428 else if(op2->kind == 22)
2429 *value2 = (double)(double)op2->__anon1.ui64;
2430 else if(op2->kind == 2 && op2->type->isSigned)
2431 *value2 = (double)(double)op2->__anon1.s;
2432 else if(op2->kind == 2)
2433 *value2 = (double)(double)op2->__anon1.us;
2434 else if(op2->kind == 1 && op2->type->isSigned)
2435 *value2 = (double)(double)op2->__anon1.c;
2436 else if(op2->kind == 24 || op2->kind == 1)
2437 *value2 = (double)(double)op2->__anon1.uc;
2438 else if(op2->kind == 6)
2439 *value2 = (double)op2->__anon1.f;
2440 else if(op2->kind == 7)
2441 *value2 = (double)op2->__anon1.d;
2442 else if(op2->kind == 13)
2443 *value2 = (double)(double)op2->__anon1.ui64;
2449 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2451 int value2 = op2->__anon1.i;
2454 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2457 exp->expType = op1->type;
2459 op1->type->refCount++;
2464 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2466 unsigned int value2 = op2->__anon1.ui;
2469 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2472 exp->expType = op1->type;
2474 op1->type->refCount++;
2479 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2481 long long value2 = op2->__anon1.i64;
2484 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2487 exp->expType = op1->type;
2489 op1->type->refCount++;
2494 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2496 uint64 value2 = op2->__anon1.ui64;
2499 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2502 exp->expType = op1->type;
2504 op1->type->refCount++;
2509 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2511 short value2 = op2->__anon1.s;
2514 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
2517 exp->expType = op1->type;
2519 op1->type->refCount++;
2524 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2526 unsigned short value2 = op2->__anon1.us;
2529 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
2532 exp->expType = op1->type;
2534 op1->type->refCount++;
2539 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2541 char value2 = op2->__anon1.c;
2544 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
2547 exp->expType = op1->type;
2549 op1->type->refCount++;
2554 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2556 unsigned char value2 = op2->__anon1.uc;
2559 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
2562 exp->expType = op1->type;
2564 op1->type->refCount++;
2569 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2571 float value2 = op2->__anon1.f;
2574 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2577 exp->expType = op1->type;
2579 op1->type->refCount++;
2584 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2586 double value2 = op2->__anon1.d;
2589 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2592 exp->expType = op1->type;
2594 op1->type->refCount++;
2599 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2601 int value2 = op2->__anon1.i;
2604 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2607 exp->expType = op1->type;
2609 op1->type->refCount++;
2614 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2616 unsigned int value2 = op2->__anon1.ui;
2619 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2622 exp->expType = op1->type;
2624 op1->type->refCount++;
2629 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2631 long long value2 = op2->__anon1.i64;
2634 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2637 exp->expType = op1->type;
2639 op1->type->refCount++;
2644 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2646 uint64 value2 = op2->__anon1.ui64;
2649 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2652 exp->expType = op1->type;
2654 op1->type->refCount++;
2659 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2661 short value2 = op2->__anon1.s;
2664 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
2667 exp->expType = op1->type;
2669 op1->type->refCount++;
2674 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2676 unsigned short value2 = op2->__anon1.us;
2679 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
2682 exp->expType = op1->type;
2684 op1->type->refCount++;
2689 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2691 char value2 = op2->__anon1.c;
2694 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
2697 exp->expType = op1->type;
2699 op1->type->refCount++;
2704 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2706 unsigned char value2 = op2->__anon1.uc;
2709 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
2712 exp->expType = op1->type;
2714 op1->type->refCount++;
2719 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2721 float value2 = op2->__anon1.f;
2724 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2727 exp->expType = op1->type;
2729 op1->type->refCount++;
2734 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2736 double value2 = op2->__anon1.d;
2739 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2742 exp->expType = op1->type;
2744 op1->type->refCount++;
2749 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2751 int value2 = op2->__anon1.i;
2754 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2757 exp->expType = op1->type;
2759 op1->type->refCount++;
2764 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2766 unsigned int value2 = op2->__anon1.ui;
2769 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2772 exp->expType = op1->type;
2774 op1->type->refCount++;
2779 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2781 long long value2 = op2->__anon1.i64;
2784 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2787 exp->expType = op1->type;
2789 op1->type->refCount++;
2794 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2796 uint64 value2 = op2->__anon1.ui64;
2799 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2802 exp->expType = op1->type;
2804 op1->type->refCount++;
2809 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2811 short value2 = op2->__anon1.s;
2814 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
2817 exp->expType = op1->type;
2819 op1->type->refCount++;
2824 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2826 unsigned short value2 = op2->__anon1.us;
2829 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
2832 exp->expType = op1->type;
2834 op1->type->refCount++;
2839 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2841 char value2 = op2->__anon1.c;
2844 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
2847 exp->expType = op1->type;
2849 op1->type->refCount++;
2854 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2856 unsigned char value2 = op2->__anon1.uc;
2859 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
2862 exp->expType = op1->type;
2864 op1->type->refCount++;
2869 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2871 float value2 = op2->__anon1.f;
2874 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2877 exp->expType = op1->type;
2879 op1->type->refCount++;
2884 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2886 double value2 = op2->__anon1.d;
2889 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2892 exp->expType = op1->type;
2894 op1->type->refCount++;
2899 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2901 int value2 = op2->__anon1.i;
2904 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
2907 exp->expType = op1->type;
2909 op1->type->refCount++;
2914 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2916 unsigned int value2 = op2->__anon1.ui;
2919 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
2922 exp->expType = op1->type;
2924 op1->type->refCount++;
2929 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2931 long long value2 = op2->__anon1.i64;
2934 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
2937 exp->expType = op1->type;
2939 op1->type->refCount++;
2944 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2946 uint64 value2 = op2->__anon1.ui64;
2949 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
2952 exp->expType = op1->type;
2954 op1->type->refCount++;
2959 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2961 short value2 = op2->__anon1.s;
2964 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
2967 exp->expType = op1->type;
2969 op1->type->refCount++;
2974 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2976 unsigned short value2 = op2->__anon1.us;
2979 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
2982 exp->expType = op1->type;
2984 op1->type->refCount++;
2989 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2991 char value2 = op2->__anon1.c;
2994 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
2997 exp->expType = op1->type;
2999 op1->type->refCount++;
3004 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3006 unsigned char value2 = op2->__anon1.uc;
3009 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
3012 exp->expType = op1->type;
3014 op1->type->refCount++;
3019 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3021 float value2 = op2->__anon1.f;
3024 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
3027 exp->expType = op1->type;
3029 op1->type->refCount++;
3034 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3036 double value2 = op2->__anon1.d;
3039 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
3042 exp->expType = op1->type;
3044 op1->type->refCount++;
3049 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3051 int value2 = op2->__anon1.i;
3054 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
3057 exp->expType = op1->type;
3059 op1->type->refCount++;
3064 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3066 unsigned int value2 = op2->__anon1.ui;
3069 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
3072 exp->expType = op1->type;
3074 op1->type->refCount++;
3079 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3081 long long value2 = op2->__anon1.i64;
3084 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
3087 exp->expType = op1->type;
3089 op1->type->refCount++;
3094 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3096 uint64 value2 = op2->__anon1.ui64;
3099 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
3102 exp->expType = op1->type;
3104 op1->type->refCount++;
3109 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3111 short value2 = op2->__anon1.s;
3114 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
3117 exp->expType = op1->type;
3119 op1->type->refCount++;
3124 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3126 unsigned short value2 = op2->__anon1.us;
3129 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
3132 exp->expType = op1->type;
3134 op1->type->refCount++;
3139 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3141 char value2 = op2->__anon1.c;
3144 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
3147 exp->expType = op1->type;
3149 op1->type->refCount++;
3154 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3156 unsigned char value2 = op2->__anon1.uc;
3159 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
3162 exp->expType = op1->type;
3164 op1->type->refCount++;
3169 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3172 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3175 exp->expType = op1->type;
3177 op1->type->refCount++;
3182 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3185 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3188 exp->expType = op1->type;
3190 op1->type->refCount++;
3195 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3198 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3201 exp->expType = op1->type;
3203 op1->type->refCount++;
3208 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3211 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3214 exp->expType = op1->type;
3216 op1->type->refCount++;
3221 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3224 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3227 exp->expType = op1->type;
3229 op1->type->refCount++;
3234 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3237 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3240 exp->expType = op1->type;
3242 op1->type->refCount++;
3247 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3250 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3253 exp->expType = op1->type;
3255 op1->type->refCount++;
3260 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3263 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3266 exp->expType = op1->type;
3268 op1->type->refCount++;
3273 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3276 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3279 exp->expType = op1->type;
3281 op1->type->refCount++;
3286 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3289 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3292 exp->expType = op1->type;
3294 op1->type->refCount++;
3299 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3302 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3305 exp->expType = op1->type;
3307 op1->type->refCount++;
3312 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3315 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3318 exp->expType = op1->type;
3320 op1->type->refCount++;
3325 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3328 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3331 exp->expType = op1->type;
3333 op1->type->refCount++;
3338 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3341 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3344 exp->expType = op1->type;
3346 op1->type->refCount++;
3351 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3354 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3357 exp->expType = op1->type;
3359 op1->type->refCount++;
3364 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3367 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3370 exp->expType = op1->type;
3372 op1->type->refCount++;
3377 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3380 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3383 exp->expType = op1->type;
3385 op1->type->refCount++;
3390 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3393 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3396 exp->expType = op1->type;
3398 op1->type->refCount++;
3403 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3406 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3409 exp->expType = op1->type;
3411 op1->type->refCount++;
3416 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3419 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3422 exp->expType = op1->type;
3424 op1->type->refCount++;
3429 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3432 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3435 exp->expType = op1->type;
3437 op1->type->refCount++;
3442 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3445 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3448 exp->expType = op1->type;
3450 op1->type->refCount++;
3455 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3458 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3461 exp->expType = op1->type;
3463 op1->type->refCount++;
3468 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3471 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3474 exp->expType = op1->type;
3476 op1->type->refCount++;
3481 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3484 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3487 exp->expType = op1->type;
3489 op1->type->refCount++;
3494 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3497 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3500 exp->expType = op1->type;
3502 op1->type->refCount++;
3507 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3510 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3513 exp->expType = op1->type;
3515 op1->type->refCount++;
3520 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3523 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3526 exp->expType = op1->type;
3528 op1->type->refCount++;
3533 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3536 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3539 exp->expType = op1->type;
3541 op1->type->refCount++;
3546 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3549 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3552 exp->expType = op1->type;
3554 op1->type->refCount++;
3559 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3561 int value2 = op2->__anon1.i;
3564 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3567 exp->expType = op1->type;
3569 op1->type->refCount++;
3574 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3576 unsigned int value2 = op2->__anon1.ui;
3579 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3582 exp->expType = op1->type;
3584 op1->type->refCount++;
3589 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3591 long long value2 = op2->__anon1.i64;
3594 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3597 exp->expType = op1->type;
3599 op1->type->refCount++;
3604 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3606 uint64 value2 = op2->__anon1.ui64;
3609 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3612 exp->expType = op1->type;
3614 op1->type->refCount++;
3619 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3621 short value2 = op2->__anon1.s;
3624 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3627 exp->expType = op1->type;
3629 op1->type->refCount++;
3634 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3636 unsigned short value2 = op2->__anon1.us;
3639 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3642 exp->expType = op1->type;
3644 op1->type->refCount++;
3649 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3651 char value2 = op2->__anon1.c;
3654 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3657 exp->expType = op1->type;
3659 op1->type->refCount++;
3664 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3666 unsigned char value2 = op2->__anon1.uc;
3669 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3672 exp->expType = op1->type;
3674 op1->type->refCount++;
3679 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3681 float value2 = op2->__anon1.f;
3684 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3687 exp->expType = op1->type;
3689 op1->type->refCount++;
3694 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3696 double value2 = op2->__anon1.d;
3699 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3702 exp->expType = op1->type;
3704 op1->type->refCount++;
3709 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3711 int value2 = op2->__anon1.i;
3714 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3717 exp->expType = op1->type;
3719 op1->type->refCount++;
3724 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3726 unsigned int value2 = op2->__anon1.ui;
3729 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3732 exp->expType = op1->type;
3734 op1->type->refCount++;
3739 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3741 long long value2 = op2->__anon1.i64;
3744 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3747 exp->expType = op1->type;
3749 op1->type->refCount++;
3754 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3756 uint64 value2 = op2->__anon1.ui64;
3759 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3762 exp->expType = op1->type;
3764 op1->type->refCount++;
3769 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3771 short value2 = op2->__anon1.s;
3774 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3777 exp->expType = op1->type;
3779 op1->type->refCount++;
3784 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3786 unsigned short value2 = op2->__anon1.us;
3789 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3792 exp->expType = op1->type;
3794 op1->type->refCount++;
3799 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3801 char value2 = op2->__anon1.c;
3804 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3807 exp->expType = op1->type;
3809 op1->type->refCount++;
3814 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3816 unsigned char value2 = op2->__anon1.uc;
3819 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3822 exp->expType = op1->type;
3824 op1->type->refCount++;
3829 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3831 float value2 = op2->__anon1.f;
3834 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3837 exp->expType = op1->type;
3839 op1->type->refCount++;
3844 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3846 double value2 = op2->__anon1.d;
3849 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3852 exp->expType = op1->type;
3854 op1->type->refCount++;
3859 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3861 int value2 = op2->__anon1.i;
3864 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3867 exp->expType = op1->type;
3869 op1->type->refCount++;
3874 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3876 unsigned int value2 = op2->__anon1.ui;
3879 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3882 exp->expType = op1->type;
3884 op1->type->refCount++;
3889 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3891 long long value2 = op2->__anon1.i64;
3894 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3897 exp->expType = op1->type;
3899 op1->type->refCount++;
3904 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3906 uint64 value2 = op2->__anon1.ui64;
3909 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3912 exp->expType = op1->type;
3914 op1->type->refCount++;
3919 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3921 short value2 = op2->__anon1.s;
3924 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3927 exp->expType = op1->type;
3929 op1->type->refCount++;
3934 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3936 unsigned short value2 = op2->__anon1.us;
3939 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3942 exp->expType = op1->type;
3944 op1->type->refCount++;
3949 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3951 char value2 = op2->__anon1.c;
3954 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3957 exp->expType = op1->type;
3959 op1->type->refCount++;
3964 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3966 unsigned char value2 = op2->__anon1.uc;
3969 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3972 exp->expType = op1->type;
3974 op1->type->refCount++;
3979 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3981 float value2 = op2->__anon1.f;
3984 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
3987 exp->expType = op1->type;
3989 op1->type->refCount++;
3994 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3996 double value2 = op2->__anon1.d;
3999 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4002 exp->expType = op1->type;
4004 op1->type->refCount++;
4009 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4011 int value2 = op2->__anon1.i;
4014 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4017 exp->expType = op1->type;
4019 op1->type->refCount++;
4024 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4026 unsigned int value2 = op2->__anon1.ui;
4029 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4032 exp->expType = op1->type;
4034 op1->type->refCount++;
4039 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4041 long long value2 = op2->__anon1.i64;
4044 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4047 exp->expType = op1->type;
4049 op1->type->refCount++;
4054 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4056 uint64 value2 = op2->__anon1.ui64;
4059 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4062 exp->expType = op1->type;
4064 op1->type->refCount++;
4069 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4071 short value2 = op2->__anon1.s;
4074 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4077 exp->expType = op1->type;
4079 op1->type->refCount++;
4084 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4086 unsigned short value2 = op2->__anon1.us;
4089 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4092 exp->expType = op1->type;
4094 op1->type->refCount++;
4099 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4101 char value2 = op2->__anon1.c;
4104 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4107 exp->expType = op1->type;
4109 op1->type->refCount++;
4114 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4116 unsigned char value2 = op2->__anon1.uc;
4119 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4122 exp->expType = op1->type;
4124 op1->type->refCount++;
4129 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4131 float value2 = op2->__anon1.f;
4134 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4137 exp->expType = op1->type;
4139 op1->type->refCount++;
4144 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4146 double value2 = op2->__anon1.d;
4149 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4152 exp->expType = op1->type;
4154 op1->type->refCount++;
4159 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4161 int value2 = op2->__anon1.i;
4164 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
4167 exp->expType = op1->type;
4169 op1->type->refCount++;
4174 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4176 unsigned int value2 = op2->__anon1.ui;
4179 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
4182 exp->expType = op1->type;
4184 op1->type->refCount++;
4189 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4191 long long value2 = op2->__anon1.i64;
4194 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
4197 exp->expType = op1->type;
4199 op1->type->refCount++;
4204 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4206 uint64 value2 = op2->__anon1.ui64;
4209 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
4212 exp->expType = op1->type;
4214 op1->type->refCount++;
4219 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4221 short value2 = op2->__anon1.s;
4224 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
4227 exp->expType = op1->type;
4229 op1->type->refCount++;
4234 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4236 unsigned short value2 = op2->__anon1.us;
4239 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
4242 exp->expType = op1->type;
4244 op1->type->refCount++;
4249 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4251 char value2 = op2->__anon1.c;
4254 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
4257 exp->expType = op1->type;
4259 op1->type->refCount++;
4264 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4266 unsigned char value2 = op2->__anon1.uc;
4269 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
4272 exp->expType = op1->type;
4274 op1->type->refCount++;
4279 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4281 float value2 = op2->__anon1.f;
4284 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
4287 exp->expType = op1->type;
4289 op1->type->refCount++;
4294 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4296 double value2 = op2->__anon1.d;
4299 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
4302 exp->expType = op1->type;
4304 op1->type->refCount++;
4309 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4311 int value2 = op2->__anon1.i;
4314 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
4317 exp->expType = op1->type;
4319 op1->type->refCount++;
4324 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4326 unsigned int value2 = op2->__anon1.ui;
4329 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
4332 exp->expType = op1->type;
4334 op1->type->refCount++;
4339 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4341 long long value2 = op2->__anon1.i64;
4344 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
4347 exp->expType = op1->type;
4349 op1->type->refCount++;
4354 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4356 uint64 value2 = op2->__anon1.ui64;
4359 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
4362 exp->expType = op1->type;
4364 op1->type->refCount++;
4369 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4371 short value2 = op2->__anon1.s;
4374 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
4377 exp->expType = op1->type;
4379 op1->type->refCount++;
4384 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4386 unsigned short value2 = op2->__anon1.us;
4389 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
4392 exp->expType = op1->type;
4394 op1->type->refCount++;
4399 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4401 char value2 = op2->__anon1.c;
4404 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
4407 exp->expType = op1->type;
4409 op1->type->refCount++;
4414 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4416 unsigned char value2 = op2->__anon1.uc;
4419 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
4422 exp->expType = op1->type;
4424 op1->type->refCount++;
4429 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4431 int value2 = op2->__anon1.i;
4434 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4437 exp->expType = op1->type;
4439 op1->type->refCount++;
4444 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4446 unsigned int value2 = op2->__anon1.ui;
4449 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4452 exp->expType = op1->type;
4454 op1->type->refCount++;
4459 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4461 long long value2 = op2->__anon1.i64;
4464 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4467 exp->expType = op1->type;
4469 op1->type->refCount++;
4474 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4476 uint64 value2 = op2->__anon1.ui64;
4479 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4482 exp->expType = op1->type;
4484 op1->type->refCount++;
4489 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4491 short value2 = op2->__anon1.s;
4494 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
4497 exp->expType = op1->type;
4499 op1->type->refCount++;
4504 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4506 unsigned short value2 = op2->__anon1.us;
4509 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
4512 exp->expType = op1->type;
4514 op1->type->refCount++;
4519 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4521 char value2 = op2->__anon1.c;
4524 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
4527 exp->expType = op1->type;
4529 op1->type->refCount++;
4534 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4536 unsigned char value2 = op2->__anon1.uc;
4539 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
4542 exp->expType = op1->type;
4544 op1->type->refCount++;
4549 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4551 int value2 = op2->__anon1.i;
4554 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4557 exp->expType = op1->type;
4559 op1->type->refCount++;
4564 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4566 unsigned int value2 = op2->__anon1.ui;
4569 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4572 exp->expType = op1->type;
4574 op1->type->refCount++;
4579 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4581 long long value2 = op2->__anon1.i64;
4584 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4587 exp->expType = op1->type;
4589 op1->type->refCount++;
4594 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4596 uint64 value2 = op2->__anon1.ui64;
4599 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4602 exp->expType = op1->type;
4604 op1->type->refCount++;
4609 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4611 short value2 = op2->__anon1.s;
4614 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
4617 exp->expType = op1->type;
4619 op1->type->refCount++;
4624 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4626 unsigned short value2 = op2->__anon1.us;
4629 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
4632 exp->expType = op1->type;
4634 op1->type->refCount++;
4639 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4641 char value2 = op2->__anon1.c;
4644 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
4647 exp->expType = op1->type;
4649 op1->type->refCount++;
4654 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4656 unsigned char value2 = op2->__anon1.uc;
4659 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
4662 exp->expType = op1->type;
4664 op1->type->refCount++;
4669 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4671 int value2 = op2->__anon1.i;
4674 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4677 exp->expType = op1->type;
4679 op1->type->refCount++;
4684 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4686 unsigned int value2 = op2->__anon1.ui;
4689 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4692 exp->expType = op1->type;
4694 op1->type->refCount++;
4699 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4701 long long value2 = op2->__anon1.i64;
4704 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4707 exp->expType = op1->type;
4709 op1->type->refCount++;
4714 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4716 uint64 value2 = op2->__anon1.ui64;
4719 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4722 exp->expType = op1->type;
4724 op1->type->refCount++;
4729 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4731 short value2 = op2->__anon1.s;
4734 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
4737 exp->expType = op1->type;
4739 op1->type->refCount++;
4744 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4746 unsigned short value2 = op2->__anon1.us;
4749 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
4752 exp->expType = op1->type;
4754 op1->type->refCount++;
4759 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4761 char value2 = op2->__anon1.c;
4764 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
4767 exp->expType = op1->type;
4769 op1->type->refCount++;
4774 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4776 unsigned char value2 = op2->__anon1.uc;
4779 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
4782 exp->expType = op1->type;
4784 op1->type->refCount++;
4789 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4791 int value2 = op2->__anon1.i;
4794 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4797 exp->expType = op1->type;
4799 op1->type->refCount++;
4804 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4806 unsigned int value2 = op2->__anon1.ui;
4809 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4812 exp->expType = op1->type;
4814 op1->type->refCount++;
4819 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4821 long long value2 = op2->__anon1.i64;
4824 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4827 exp->expType = op1->type;
4829 op1->type->refCount++;
4834 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4836 uint64 value2 = op2->__anon1.ui64;
4839 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4842 exp->expType = op1->type;
4844 op1->type->refCount++;
4849 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4851 short value2 = op2->__anon1.s;
4854 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
4857 exp->expType = op1->type;
4859 op1->type->refCount++;
4864 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4866 unsigned short value2 = op2->__anon1.us;
4869 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
4872 exp->expType = op1->type;
4874 op1->type->refCount++;
4879 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4881 char value2 = op2->__anon1.c;
4884 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
4887 exp->expType = op1->type;
4889 op1->type->refCount++;
4894 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4896 unsigned char value2 = op2->__anon1.uc;
4899 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
4902 exp->expType = op1->type;
4904 op1->type->refCount++;
4909 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4911 int value2 = op2->__anon1.i;
4914 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4917 exp->expType = op1->type;
4919 op1->type->refCount++;
4924 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4926 unsigned int value2 = op2->__anon1.ui;
4929 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4932 exp->expType = op1->type;
4934 op1->type->refCount++;
4939 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4941 long long value2 = op2->__anon1.i64;
4944 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4947 exp->expType = op1->type;
4949 op1->type->refCount++;
4954 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4956 uint64 value2 = op2->__anon1.ui64;
4959 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4962 exp->expType = op1->type;
4964 op1->type->refCount++;
4969 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4971 short value2 = op2->__anon1.s;
4974 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
4977 exp->expType = op1->type;
4979 op1->type->refCount++;
4984 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4986 unsigned short value2 = op2->__anon1.us;
4989 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
4992 exp->expType = op1->type;
4994 op1->type->refCount++;
4999 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5001 char value2 = op2->__anon1.c;
5004 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
5007 exp->expType = op1->type;
5009 op1->type->refCount++;
5014 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5016 unsigned char value2 = op2->__anon1.uc;
5019 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
5022 exp->expType = op1->type;
5024 op1->type->refCount++;
5029 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5032 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5035 exp->expType = op1->type;
5037 op1->type->refCount++;
5042 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5045 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5048 exp->expType = op1->type;
5050 op1->type->refCount++;
5055 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5058 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5061 exp->expType = op1->type;
5063 op1->type->refCount++;
5068 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5071 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5074 exp->expType = op1->type;
5076 op1->type->refCount++;
5081 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5084 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5087 exp->expType = op1->type;
5089 op1->type->refCount++;
5094 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5097 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5100 exp->expType = op1->type;
5102 op1->type->refCount++;
5107 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5110 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5113 exp->expType = op1->type;
5115 op1->type->refCount++;
5120 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5123 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5126 exp->expType = op1->type;
5128 op1->type->refCount++;
5133 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5135 int value2 = op2->__anon1.i;
5138 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5141 exp->expType = op1->type;
5143 op1->type->refCount++;
5148 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5150 unsigned int value2 = op2->__anon1.ui;
5153 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5156 exp->expType = op1->type;
5158 op1->type->refCount++;
5163 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5165 long long value2 = op2->__anon1.i64;
5168 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5171 exp->expType = op1->type;
5173 op1->type->refCount++;
5178 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5180 uint64 value2 = op2->__anon1.ui64;
5183 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5186 exp->expType = op1->type;
5188 op1->type->refCount++;
5193 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5195 short value2 = op2->__anon1.s;
5198 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5201 exp->expType = op1->type;
5203 op1->type->refCount++;
5208 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5210 unsigned short value2 = op2->__anon1.us;
5213 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5216 exp->expType = op1->type;
5218 op1->type->refCount++;
5223 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5225 char value2 = op2->__anon1.c;
5228 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5231 exp->expType = op1->type;
5233 op1->type->refCount++;
5238 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5240 unsigned char value2 = op2->__anon1.uc;
5243 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5246 exp->expType = op1->type;
5248 op1->type->refCount++;
5253 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5255 int value2 = op2->__anon1.i;
5258 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5261 exp->expType = op1->type;
5263 op1->type->refCount++;
5268 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5270 unsigned int value2 = op2->__anon1.ui;
5273 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5276 exp->expType = op1->type;
5278 op1->type->refCount++;
5283 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5285 long long value2 = op2->__anon1.i64;
5288 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5291 exp->expType = op1->type;
5293 op1->type->refCount++;
5298 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5300 uint64 value2 = op2->__anon1.ui64;
5303 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5306 exp->expType = op1->type;
5308 op1->type->refCount++;
5313 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5315 short value2 = op2->__anon1.s;
5318 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5321 exp->expType = op1->type;
5323 op1->type->refCount++;
5328 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5330 unsigned short value2 = op2->__anon1.us;
5333 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5336 exp->expType = op1->type;
5338 op1->type->refCount++;
5343 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5345 char value2 = op2->__anon1.c;
5348 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5351 exp->expType = op1->type;
5353 op1->type->refCount++;
5358 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5360 unsigned char value2 = op2->__anon1.uc;
5363 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5366 exp->expType = op1->type;
5368 op1->type->refCount++;
5373 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5375 int value2 = op2->__anon1.i;
5378 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5381 exp->expType = op1->type;
5383 op1->type->refCount++;
5388 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5390 unsigned int value2 = op2->__anon1.ui;
5393 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5396 exp->expType = op1->type;
5398 op1->type->refCount++;
5403 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5405 long long value2 = op2->__anon1.i64;
5408 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5411 exp->expType = op1->type;
5413 op1->type->refCount++;
5418 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5420 uint64 value2 = op2->__anon1.ui64;
5423 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5426 exp->expType = op1->type;
5428 op1->type->refCount++;
5433 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5435 short value2 = op2->__anon1.s;
5438 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5441 exp->expType = op1->type;
5443 op1->type->refCount++;
5448 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5450 unsigned short value2 = op2->__anon1.us;
5453 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5456 exp->expType = op1->type;
5458 op1->type->refCount++;
5463 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5465 char value2 = op2->__anon1.c;
5468 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5471 exp->expType = op1->type;
5473 op1->type->refCount++;
5478 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5480 unsigned char value2 = op2->__anon1.uc;
5483 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5486 exp->expType = op1->type;
5488 op1->type->refCount++;
5493 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5495 int value2 = op2->__anon1.i;
5498 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5501 exp->expType = op1->type;
5503 op1->type->refCount++;
5508 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5510 unsigned int value2 = op2->__anon1.ui;
5513 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5516 exp->expType = op1->type;
5518 op1->type->refCount++;
5523 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5525 long long value2 = op2->__anon1.i64;
5528 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5531 exp->expType = op1->type;
5533 op1->type->refCount++;
5538 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5540 uint64 value2 = op2->__anon1.ui64;
5543 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5546 exp->expType = op1->type;
5548 op1->type->refCount++;
5553 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5555 short value2 = op2->__anon1.s;
5558 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5561 exp->expType = op1->type;
5563 op1->type->refCount++;
5568 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5570 unsigned short value2 = op2->__anon1.us;
5573 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5576 exp->expType = op1->type;
5578 op1->type->refCount++;
5583 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5585 char value2 = op2->__anon1.c;
5588 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5591 exp->expType = op1->type;
5593 op1->type->refCount++;
5598 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5600 unsigned char value2 = op2->__anon1.uc;
5603 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5606 exp->expType = op1->type;
5608 op1->type->refCount++;
5613 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5615 int value2 = op2->__anon1.i;
5618 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5621 exp->expType = op1->type;
5623 op1->type->refCount++;
5628 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5630 unsigned int value2 = op2->__anon1.ui;
5633 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5636 exp->expType = op1->type;
5638 op1->type->refCount++;
5643 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5645 long long value2 = op2->__anon1.i64;
5648 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5651 exp->expType = op1->type;
5653 op1->type->refCount++;
5658 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5660 uint64 value2 = op2->__anon1.ui64;
5663 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5666 exp->expType = op1->type;
5668 op1->type->refCount++;
5673 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5675 short value2 = op2->__anon1.s;
5678 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5681 exp->expType = op1->type;
5683 op1->type->refCount++;
5688 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5690 unsigned short value2 = op2->__anon1.us;
5693 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5696 exp->expType = op1->type;
5698 op1->type->refCount++;
5703 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5705 char value2 = op2->__anon1.c;
5708 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5711 exp->expType = op1->type;
5713 op1->type->refCount++;
5718 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5720 unsigned char value2 = op2->__anon1.uc;
5723 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5726 exp->expType = op1->type;
5728 op1->type->refCount++;
5733 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5736 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5739 exp->expType = op1->type;
5741 op1->type->refCount++;
5746 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5749 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5752 exp->expType = op1->type;
5754 op1->type->refCount++;
5759 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5762 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5765 exp->expType = op1->type;
5767 op1->type->refCount++;
5772 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5775 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5778 exp->expType = op1->type;
5780 op1->type->refCount++;
5785 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5788 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5791 exp->expType = op1->type;
5793 op1->type->refCount++;
5798 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5801 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5804 exp->expType = op1->type;
5806 op1->type->refCount++;
5811 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5814 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5817 exp->expType = op1->type;
5819 op1->type->refCount++;
5824 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5827 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5830 exp->expType = op1->type;
5832 op1->type->refCount++;
5837 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5839 int value2 = op2->__anon1.i;
5842 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5845 exp->expType = op1->type;
5847 op1->type->refCount++;
5852 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5854 unsigned int value2 = op2->__anon1.ui;
5857 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5860 exp->expType = op1->type;
5862 op1->type->refCount++;
5867 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5869 long long value2 = op2->__anon1.i64;
5872 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5875 exp->expType = op1->type;
5877 op1->type->refCount++;
5882 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5884 uint64 value2 = op2->__anon1.ui64;
5887 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5890 exp->expType = op1->type;
5892 op1->type->refCount++;
5897 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5899 short value2 = op2->__anon1.s;
5902 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5905 exp->expType = op1->type;
5907 op1->type->refCount++;
5912 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5914 unsigned short value2 = op2->__anon1.us;
5917 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5920 exp->expType = op1->type;
5922 op1->type->refCount++;
5927 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5929 char value2 = op2->__anon1.c;
5932 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5935 exp->expType = op1->type;
5937 op1->type->refCount++;
5942 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5944 unsigned char value2 = op2->__anon1.uc;
5947 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5950 exp->expType = op1->type;
5952 op1->type->refCount++;
5957 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5959 float value2 = op2->__anon1.f;
5962 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5965 exp->expType = op1->type;
5967 op1->type->refCount++;
5972 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5974 double value2 = op2->__anon1.d;
5977 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5980 exp->expType = op1->type;
5982 op1->type->refCount++;
5987 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5989 int value2 = op2->__anon1.i;
5992 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
5995 exp->expType = op1->type;
5997 op1->type->refCount++;
6002 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6004 unsigned int value2 = op2->__anon1.ui;
6007 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6010 exp->expType = op1->type;
6012 op1->type->refCount++;
6017 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6019 long long value2 = op2->__anon1.i64;
6022 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6025 exp->expType = op1->type;
6027 op1->type->refCount++;
6032 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6034 uint64 value2 = op2->__anon1.ui64;
6037 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6040 exp->expType = op1->type;
6042 op1->type->refCount++;
6047 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6049 short value2 = op2->__anon1.s;
6052 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6055 exp->expType = op1->type;
6057 op1->type->refCount++;
6062 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6064 unsigned short value2 = op2->__anon1.us;
6067 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6070 exp->expType = op1->type;
6072 op1->type->refCount++;
6077 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6079 char value2 = op2->__anon1.c;
6082 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6085 exp->expType = op1->type;
6087 op1->type->refCount++;
6092 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6094 unsigned char value2 = op2->__anon1.uc;
6097 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6100 exp->expType = op1->type;
6102 op1->type->refCount++;
6107 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6109 float value2 = op2->__anon1.f;
6112 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6115 exp->expType = op1->type;
6117 op1->type->refCount++;
6122 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6124 double value2 = op2->__anon1.d;
6127 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6130 exp->expType = op1->type;
6132 op1->type->refCount++;
6137 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6139 int value2 = op2->__anon1.i;
6142 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6145 exp->expType = op1->type;
6147 op1->type->refCount++;
6152 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6154 unsigned int value2 = op2->__anon1.ui;
6157 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6160 exp->expType = op1->type;
6162 op1->type->refCount++;
6167 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6169 long long value2 = op2->__anon1.i64;
6172 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6175 exp->expType = op1->type;
6177 op1->type->refCount++;
6182 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6184 uint64 value2 = op2->__anon1.ui64;
6187 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6190 exp->expType = op1->type;
6192 op1->type->refCount++;
6197 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6199 short value2 = op2->__anon1.s;
6202 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6205 exp->expType = op1->type;
6207 op1->type->refCount++;
6212 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6214 unsigned short value2 = op2->__anon1.us;
6217 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6220 exp->expType = op1->type;
6222 op1->type->refCount++;
6227 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6229 char value2 = op2->__anon1.c;
6232 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6235 exp->expType = op1->type;
6237 op1->type->refCount++;
6242 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6244 unsigned char value2 = op2->__anon1.uc;
6247 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6250 exp->expType = op1->type;
6252 op1->type->refCount++;
6257 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6259 float value2 = op2->__anon1.f;
6262 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6265 exp->expType = op1->type;
6267 op1->type->refCount++;
6272 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6274 double value2 = op2->__anon1.d;
6277 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6280 exp->expType = op1->type;
6282 op1->type->refCount++;
6287 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6289 int value2 = op2->__anon1.i;
6292 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6295 exp->expType = op1->type;
6297 op1->type->refCount++;
6302 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6304 unsigned int value2 = op2->__anon1.ui;
6307 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6310 exp->expType = op1->type;
6312 op1->type->refCount++;
6317 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6319 long long value2 = op2->__anon1.i64;
6322 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6325 exp->expType = op1->type;
6327 op1->type->refCount++;
6332 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6334 uint64 value2 = op2->__anon1.ui64;
6337 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6340 exp->expType = op1->type;
6342 op1->type->refCount++;
6347 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6349 short value2 = op2->__anon1.s;
6352 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6355 exp->expType = op1->type;
6357 op1->type->refCount++;
6362 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6364 unsigned short value2 = op2->__anon1.us;
6367 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6370 exp->expType = op1->type;
6372 op1->type->refCount++;
6377 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6379 char value2 = op2->__anon1.c;
6382 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6385 exp->expType = op1->type;
6387 op1->type->refCount++;
6392 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6394 unsigned char value2 = op2->__anon1.uc;
6397 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6400 exp->expType = op1->type;
6402 op1->type->refCount++;
6407 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6409 float value2 = op2->__anon1.f;
6412 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6415 exp->expType = op1->type;
6417 op1->type->refCount++;
6422 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6424 double value2 = op2->__anon1.d;
6427 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6430 exp->expType = op1->type;
6432 op1->type->refCount++;
6437 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6439 int value2 = op2->__anon1.i;
6442 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6445 exp->expType = op1->type;
6447 op1->type->refCount++;
6452 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6454 unsigned int value2 = op2->__anon1.ui;
6457 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6460 exp->expType = op1->type;
6462 op1->type->refCount++;
6467 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6469 long long value2 = op2->__anon1.i64;
6472 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6475 exp->expType = op1->type;
6477 op1->type->refCount++;
6482 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6484 uint64 value2 = op2->__anon1.ui64;
6487 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6490 exp->expType = op1->type;
6492 op1->type->refCount++;
6497 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6499 short value2 = op2->__anon1.s;
6502 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6505 exp->expType = op1->type;
6507 op1->type->refCount++;
6512 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6514 unsigned short value2 = op2->__anon1.us;
6517 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6520 exp->expType = op1->type;
6522 op1->type->refCount++;
6527 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6529 char value2 = op2->__anon1.c;
6532 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6535 exp->expType = op1->type;
6537 op1->type->refCount++;
6542 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6544 unsigned char value2 = op2->__anon1.uc;
6547 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6550 exp->expType = op1->type;
6552 op1->type->refCount++;
6557 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6559 float value2 = op2->__anon1.f;
6562 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6565 exp->expType = op1->type;
6567 op1->type->refCount++;
6572 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6574 double value2 = op2->__anon1.d;
6577 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6580 exp->expType = op1->type;
6582 op1->type->refCount++;
6587 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6589 int value2 = op2->__anon1.i;
6592 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6595 exp->expType = op1->type;
6597 op1->type->refCount++;
6602 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6604 unsigned int value2 = op2->__anon1.ui;
6607 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6610 exp->expType = op1->type;
6612 op1->type->refCount++;
6617 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6619 long long value2 = op2->__anon1.i64;
6622 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6625 exp->expType = op1->type;
6627 op1->type->refCount++;
6632 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6634 uint64 value2 = op2->__anon1.ui64;
6637 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6640 exp->expType = op1->type;
6642 op1->type->refCount++;
6647 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6649 short value2 = op2->__anon1.s;
6652 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6655 exp->expType = op1->type;
6657 op1->type->refCount++;
6662 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6664 unsigned short value2 = op2->__anon1.us;
6667 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6670 exp->expType = op1->type;
6672 op1->type->refCount++;
6677 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6679 char value2 = op2->__anon1.c;
6682 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6685 exp->expType = op1->type;
6687 op1->type->refCount++;
6692 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6694 unsigned char value2 = op2->__anon1.uc;
6697 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6700 exp->expType = op1->type;
6702 op1->type->refCount++;
6707 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6709 float value2 = op2->__anon1.f;
6712 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6715 exp->expType = op1->type;
6717 op1->type->refCount++;
6722 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6724 double value2 = op2->__anon1.d;
6727 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6730 exp->expType = op1->type;
6732 op1->type->refCount++;
6737 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6739 int value2 = op2->__anon1.i;
6742 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6745 exp->expType = op1->type;
6747 op1->type->refCount++;
6752 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6754 unsigned int value2 = op2->__anon1.ui;
6757 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6760 exp->expType = op1->type;
6762 op1->type->refCount++;
6767 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6769 long long value2 = op2->__anon1.i64;
6772 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6775 exp->expType = op1->type;
6777 op1->type->refCount++;
6782 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6784 uint64 value2 = op2->__anon1.ui64;
6787 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6790 exp->expType = op1->type;
6792 op1->type->refCount++;
6797 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6799 short value2 = op2->__anon1.s;
6802 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6805 exp->expType = op1->type;
6807 op1->type->refCount++;
6812 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6814 unsigned short value2 = op2->__anon1.us;
6817 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6820 exp->expType = op1->type;
6822 op1->type->refCount++;
6827 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6829 char value2 = op2->__anon1.c;
6832 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6835 exp->expType = op1->type;
6837 op1->type->refCount++;
6842 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6844 unsigned char value2 = op2->__anon1.uc;
6847 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6850 exp->expType = op1->type;
6852 op1->type->refCount++;
6857 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6859 float value2 = op2->__anon1.f;
6862 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6865 exp->expType = op1->type;
6867 op1->type->refCount++;
6872 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6874 double value2 = op2->__anon1.d;
6877 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6880 exp->expType = op1->type;
6882 op1->type->refCount++;
6887 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6889 int value2 = op2->__anon1.i;
6892 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6895 exp->expType = op1->type;
6897 op1->type->refCount++;
6902 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6904 unsigned int value2 = op2->__anon1.ui;
6907 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6910 exp->expType = op1->type;
6912 op1->type->refCount++;
6917 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6919 long long value2 = op2->__anon1.i64;
6922 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6925 exp->expType = op1->type;
6927 op1->type->refCount++;
6932 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6934 uint64 value2 = op2->__anon1.ui64;
6937 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6940 exp->expType = op1->type;
6942 op1->type->refCount++;
6947 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6949 short value2 = op2->__anon1.s;
6952 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6955 exp->expType = op1->type;
6957 op1->type->refCount++;
6962 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6964 unsigned short value2 = op2->__anon1.us;
6967 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6970 exp->expType = op1->type;
6972 op1->type->refCount++;
6977 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6979 char value2 = op2->__anon1.c;
6982 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
6985 exp->expType = op1->type;
6987 op1->type->refCount++;
6992 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6994 unsigned char value2 = op2->__anon1.uc;
6997 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7000 exp->expType = op1->type;
7002 op1->type->refCount++;
7007 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7009 float value2 = op2->__anon1.f;
7012 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7015 exp->expType = op1->type;
7017 op1->type->refCount++;
7022 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7024 double value2 = op2->__anon1.d;
7027 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7030 exp->expType = op1->type;
7032 op1->type->refCount++;
7037 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7040 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7043 exp->expType = op1->type;
7045 op1->type->refCount++;
7050 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7053 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7056 exp->expType = op1->type;
7058 op1->type->refCount++;
7063 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7066 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7069 exp->expType = op1->type;
7071 op1->type->refCount++;
7076 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7079 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7082 exp->expType = op1->type;
7084 op1->type->refCount++;
7089 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7092 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7095 exp->expType = op1->type;
7097 op1->type->refCount++;
7102 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7105 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7108 exp->expType = op1->type;
7110 op1->type->refCount++;
7115 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7118 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7121 exp->expType = op1->type;
7123 op1->type->refCount++;
7128 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7131 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7134 exp->expType = op1->type;
7136 op1->type->refCount++;
7141 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7143 if(type->name && type->name[0])
7146 strcat(string, type->name);
7149 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7155 strcat(string, name);
7160 static void PrintAttribs(struct Type * type, char * string)
7165 strcat(string, "dllexport ");
7166 if(type->attrStdcall)
7167 strcat(string, "stdcall ");
7171 static struct Type * FindMember(struct Type * type, char * string)
7173 struct Type * memberType;
7175 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7177 if(!memberType->name)
7179 struct Type * subType = FindMember(memberType, string);
7184 else if(!strcmp(memberType->name, string))
7187 return (((void *)0));
7190 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7192 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7194 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7196 unsigned int result = 0;
7201 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7202 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7206 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7207 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7210 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)
7211 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7214 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)
7215 result = GetOpFloat(op, &op->__anon1.f);
7218 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)
7219 result = GetOpDouble(op, &op->__anon1.d);
7222 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)
7223 result = GetOpUInt64(op, &op->__anon1.ui64);
7226 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)
7227 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7230 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7231 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7234 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7235 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7241 struct OpTable floatOps =
7243 (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)
7246 struct OpTable doubleOps =
7248 (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)
7251 struct OpTable intOps =
7253 (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)
7256 struct OpTable uintOps =
7258 (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)
7261 struct OpTable int64Ops =
7263 (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)
7266 struct OpTable uint64Ops =
7268 (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)
7271 struct OpTable shortOps =
7273 (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)
7276 struct OpTable ushortOps =
7278 (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)
7281 struct OpTable charOps =
7283 (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)
7286 struct OpTable ucharOps =
7288 (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)
7291 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7293 struct Type * memberType;
7295 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7297 if(!memberType->name)
7299 struct Type * subType = FindMember(memberType, string);
7303 *offset += memberType->offset;
7307 else if(!strcmp(memberType->name, string))
7309 *offset += memberType->offset;
7313 return (((void *)0));
7316 struct __ecereNameSpace__ecere__com__Module;
7318 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);
7320 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7322 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);
7324 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);
7326 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7328 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7333 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7334 struct __ecereNameSpace__ecere__sys__BTNode * left;
7335 struct __ecereNameSpace__ecere__sys__BTNode * right;
7337 struct __ecereNameSpace__ecere__com__Instance * module;
7338 char * dataTypeString;
7339 struct Type * dataType;
7342 } __attribute__ ((gcc_struct));
7344 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);
7346 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7348 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);
7350 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7352 struct __ecereNameSpace__ecere__com__DefinedExpression;
7354 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7356 struct __ecereNameSpace__ecere__com__DefinedExpression
7358 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7359 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7362 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7363 } __attribute__ ((gcc_struct));
7365 struct __ecereNameSpace__ecere__sys__BinaryTree;
7367 struct __ecereNameSpace__ecere__sys__BinaryTree
7369 struct __ecereNameSpace__ecere__sys__BTNode * root;
7371 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7372 void (* FreeKey)(void * key);
7373 } __attribute__ ((gcc_struct));
7375 struct __ecereNameSpace__ecere__com__Class
7377 struct __ecereNameSpace__ecere__com__Class * prev;
7378 struct __ecereNameSpace__ecere__com__Class * next;
7384 unsigned int (* Constructor)(void * );
7385 void (* Destructor)(void * );
7388 struct __ecereNameSpace__ecere__com__Class * base;
7389 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7390 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7391 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7392 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7393 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7394 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7398 struct __ecereNameSpace__ecere__com__Instance * module;
7399 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7400 const char * dataTypeString;
7401 struct Type * dataType;
7403 int defaultAlignment;
7404 void (* Initialize)();
7406 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7407 const char * designerClass;
7408 unsigned int noExpansion;
7409 const char * defaultProperty;
7410 unsigned int comRedefinition;
7413 unsigned int internalDecl;
7415 unsigned int computeSize;
7416 short structAlignment;
7417 short pointerAlignment;
7418 int destructionWatchOffset;
7420 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7421 int inheritanceAccess;
7422 const char * fullName;
7424 struct __ecereNameSpace__ecere__sys__OldList conversions;
7425 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7426 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7427 struct __ecereNameSpace__ecere__com__Class * templateClass;
7428 struct __ecereNameSpace__ecere__sys__OldList templatized;
7430 unsigned int isInstanceClass;
7431 unsigned int byValueSystemClass;
7432 } __attribute__ ((gcc_struct));
7434 struct __ecereNameSpace__ecere__com__NameSpace
7437 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7438 struct __ecereNameSpace__ecere__com__NameSpace * left;
7439 struct __ecereNameSpace__ecere__com__NameSpace * right;
7441 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7442 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7443 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7444 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7445 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7446 } __attribute__ ((gcc_struct));
7448 struct __ecereNameSpace__ecere__com__DataMember
7450 struct __ecereNameSpace__ecere__com__DataMember * prev;
7451 struct __ecereNameSpace__ecere__com__DataMember * next;
7453 unsigned int isProperty;
7456 struct __ecereNameSpace__ecere__com__Class * _class;
7457 const char * dataTypeString;
7458 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7459 struct Type * dataType;
7463 struct __ecereNameSpace__ecere__sys__OldList members;
7464 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7466 short structAlignment;
7467 short pointerAlignment;
7468 } __attribute__ ((gcc_struct));
7470 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7472 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7474 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7476 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7478 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7480 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7482 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7486 if(type->kind == 11)
7488 struct Type * param;
7490 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7491 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7492 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7494 else if(type->kind == 13)
7495 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7496 else if(type->kind == 8)
7498 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7500 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7502 else if(type->kind == 9 || type->kind == 10)
7504 struct Type * member;
7506 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7507 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7509 else if(type->kind == 12)
7510 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7514 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7516 unsigned int status = 1;
7518 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))
7520 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7521 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7523 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7525 struct Type * sourceType = source, * destType = dest;
7527 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7528 sourceType = sourceType->__anon1.type;
7529 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7530 destType = destType->__anon1.type;
7531 if(!destType->constant && sourceType->constant)
7535 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7542 struct Operand GetOperand(struct Expression * exp)
7551 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
7554 struct Type * type = exp->expType;
7558 while(type->kind == 8 && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
7560 if(!type->__anon1._class->__anon1.registered->dataType)
7561 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7562 type = type->__anon1._class->__anon1.registered->dataType;
7564 if(exp->type == 3 && op.kind == 13)
7566 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7570 else if(exp->isConstant && exp->type == 2)
7572 op.kind = type->kind;
7579 if(exp->__anon1.__anon1.constant[0] == '\'')
7581 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7584 else if(type->isSigned)
7586 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7591 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7599 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7604 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7612 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7617 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7625 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7630 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7638 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7643 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7651 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7656 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7662 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7663 op.__anon1.f = __ecereMethod_float_inf();
7664 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7665 op.__anon1.f = -__ecereMethod_float_inf();
7666 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7667 op.__anon1.f = __ecereMethod_float_nan();
7668 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7669 op.__anon1.f = -__ecereMethod_float_nan();
7671 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7675 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7676 op.__anon1.d = __ecereMethod_double_inf();
7677 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7678 op.__anon1.d = -__ecereMethod_double_inf();
7679 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7680 op.__anon1.d = __ecereMethod_double_nan();
7681 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7682 op.__anon1.d = -__ecereMethod_double_nan();
7684 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7690 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7700 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7704 switch(_class->typeSize)
7707 if(!strcmp(_class->dataTypeString, "uint64"))
7708 v = (long long)*(uint64 *)ptr;
7710 v = *(long long *)ptr;
7713 if(!strcmp(_class->dataTypeString, "uint"))
7714 v = (long long)*(unsigned int *)ptr;
7716 v = (long long)*(int *)ptr;
7719 if(!strcmp(_class->dataTypeString, "uint16"))
7720 v = (long long)*(unsigned short *)ptr;
7722 v = (long long)*(short *)ptr;
7725 if(!strcmp(_class->dataTypeString, "byte"))
7726 v = (long long)*(unsigned char *)ptr;
7728 v = (long long)*(char *)ptr;
7734 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7736 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7737 ListAdd(specs, MkSpecifier(UNSIGNED));
7742 if(type->__anon1._class->__anon1.registered)
7744 if(!type->__anon1._class->__anon1.registered->dataType)
7745 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7746 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7751 ListAdd(specs, MkSpecifier(DOUBLE));
7754 ListAdd(specs, MkSpecifier(FLOAT));
7757 ListAdd(specs, MkSpecifier(CHAR));
7760 ListAdd(specs, MkSpecifier(_BOOL));
7763 ListAdd(specs, MkSpecifier(SHORT));
7766 ListAdd(specs, MkSpecifier(INT64));
7769 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7772 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7776 ListAdd(specs, MkSpecifier(INT));
7781 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7785 if(printConst && type->constant)
7786 strcat(string, "const ");
7791 struct Symbol * c = type->__anon1._class;
7792 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7794 if(type->classObjectType == 2 && isObjectBaseClass)
7795 strcat(string, "typed_object");
7796 else if(type->classObjectType == 3 && isObjectBaseClass)
7797 strcat(string, "any_object");
7801 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7803 if(type->byReference)
7804 strcat(string, " &");
7808 strcat(string, "void");
7811 strcat(string, type->isSigned ? "int" : "uint");
7814 strcat(string, type->isSigned ? "int64" : "uint64");
7817 strcat(string, type->isSigned ? "intptr" : "uintptr");
7820 strcat(string, type->isSigned ? "intsize" : "uintsize");
7823 strcat(string, type->isSigned ? "char" : "byte");
7826 strcat(string, "_Bool");
7829 strcat(string, type->isSigned ? "short" : "uint16");
7832 strcat(string, "float");
7835 strcat(string, "double");
7838 if(type->__anon1.__anon1.enumName)
7840 strcat(string, "struct ");
7841 strcat(string, type->__anon1.__anon1.enumName);
7843 else if(type->typeName)
7844 strcat(string, type->typeName);
7847 struct Type * member;
7849 strcat(string, "struct { ");
7850 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7852 PrintType(member, string, 1, fullName);
7853 strcat(string, "; ");
7855 strcat(string, "}");
7859 if(type->__anon1.__anon1.enumName)
7861 strcat(string, "union ");
7862 strcat(string, type->__anon1.__anon1.enumName);
7864 else if(type->typeName)
7865 strcat(string, type->typeName);
7868 strcat(string, "union ");
7869 strcat(string, "(unnamed)");
7873 if(type->__anon1.__anon1.enumName)
7875 strcat(string, "enum ");
7876 strcat(string, type->__anon1.__anon1.enumName);
7878 else if(type->typeName)
7879 strcat(string, type->typeName);
7881 strcat(string, "int");
7884 strcat(string, "...");
7887 strcat(string, "subclass(");
7888 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7889 strcat(string, ")");
7892 strcat(string, type->__anon1.templateParameter->identifier->string);
7895 strcat(string, "thisclass");
7898 strcat(string, "__builtin_va_list");
7904 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7906 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7908 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7910 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7912 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7914 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7916 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7918 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7920 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7922 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7924 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7926 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7928 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7930 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7932 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7934 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7936 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7938 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7940 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7942 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7944 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7946 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7948 struct __ecereNameSpace__ecere__com__Application
7951 const char * * argv;
7953 unsigned int isGUIApp;
7954 struct __ecereNameSpace__ecere__sys__OldList allModules;
7955 char * parsedCommand;
7956 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7957 } __attribute__ ((gcc_struct));
7959 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)
7963 *curMember = (*curMember)->next;
7964 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7966 *curMember = subMemberStack[--(*subMemberStackPos)];
7967 *curMember = (*curMember)->next;
7969 while((*curMember) && (*curMember)->isProperty)
7970 *curMember = (*curMember)->next;
7971 if(subMemberStackPos)
7973 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
7975 subMemberStack[(*subMemberStackPos)++] = *curMember;
7976 *curMember = (*curMember)->members.first;
7977 while(*curMember && (*curMember)->isProperty)
7978 *curMember = (*curMember)->next;
7986 if(subMemberStackPos && *subMemberStackPos)
7988 *curMember = subMemberStack[--(*subMemberStackPos)];
7989 *curMember = (*curMember)->next;
7993 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
7995 if(*curClass == _class)
7997 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
7999 *curMember = (*curClass)->membersAndProperties.first;
8001 while((*curMember) && (*curMember)->isProperty)
8002 *curMember = (*curMember)->next;
8003 if(subMemberStackPos)
8005 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8007 subMemberStack[(*subMemberStackPos)++] = *curMember;
8008 *curMember = (*curMember)->members.first;
8009 while(*curMember && (*curMember)->isProperty)
8010 *curMember = (*curMember)->next;
8017 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8019 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8020 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8021 struct __ecereNameSpace__ecere__com__NameSpace * child;
8025 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)))
8027 data = ScanGlobalData(child, name);
8035 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8037 int nsLen = strlen(nameSpace);
8038 struct Symbol * symbol;
8040 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)))
8042 char * s = symbol->string;
8044 if(!strncmp(s, nameSpace, nsLen))
8049 for(c = strlen(s) - 1; c >= 0; c--)
8052 namePart = s + c + 1;
8053 if(!strcmp(namePart, name))
8061 return (((void *)0));
8064 unsigned int GetInt(struct Expression * exp, int * value2)
8066 struct Operand op2 = GetOperand(exp);
8068 return GetOpInt(&op2, value2);
8071 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8073 struct Operand op2 = GetOperand(exp);
8075 return GetOpUInt(&op2, value2);
8078 unsigned int GetInt64(struct Expression * exp, long long * value2)
8080 struct Operand op2 = GetOperand(exp);
8082 return GetOpInt64(&op2, value2);
8085 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8087 struct Operand op2 = GetOperand(exp);
8089 return GetOpUInt64(&op2, value2);
8092 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8094 struct Operand op2 = GetOperand(exp);
8096 return GetOpIntPtr(&op2, value2);
8099 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8101 struct Operand op2 = GetOperand(exp);
8103 return GetOpUIntPtr(&op2, value2);
8106 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8108 struct Operand op2 = GetOperand(exp);
8110 return GetOpIntSize(&op2, value2);
8113 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8115 struct Operand op2 = GetOperand(exp);
8117 return GetOpUIntSize(&op2, value2);
8120 unsigned int GetShort(struct Expression * exp, short * value2)
8122 struct Operand op2 = GetOperand(exp);
8124 return GetOpShort(&op2, value2);
8127 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8129 struct Operand op2 = GetOperand(exp);
8131 return GetOpUShort(&op2, value2);
8134 unsigned int GetChar(struct Expression * exp, char * value2)
8136 struct Operand op2 = GetOperand(exp);
8138 return GetOpChar(&op2, value2);
8141 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8143 struct Operand op2 = GetOperand(exp);
8145 return GetOpUChar(&op2, value2);
8148 unsigned int GetFloat(struct Expression * exp, float * value2)
8150 struct Operand op2 = GetOperand(exp);
8152 return GetOpFloat(&op2, value2);
8155 unsigned int GetDouble(struct Expression * exp, double * value2)
8157 struct Operand op2 = GetOperand(exp);
8159 return GetOpDouble(&op2, value2);
8162 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8164 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8166 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8167 PrintAttribs(type, string);
8168 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8169 strcat(string, " const");
8170 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8171 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8172 strcat(string, " (");
8173 if(type->kind == 13)
8175 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8176 PrintAttribs(type->__anon1.type, string);
8178 if(type->kind == 13)
8180 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8181 strcat(string, "*");
8183 strcat(string, " *");
8185 if(printConst && type->constant && type->kind == 13)
8186 strcat(string, " const");
8189 PrintTypeSpecs(type, string, fullName, printConst);
8192 void PrintExpression(struct Expression * exp, char * string)
8195 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8197 unsigned int backOutputLineNumbers = outputLineNumbers;
8199 outputLineNumbers = 0;
8201 OutputExpression(exp, f);
8202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8203 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8205 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8206 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8207 count = strlen(string);
8208 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8209 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8211 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8212 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8213 string[count] = '\0';
8214 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8215 outputLineNumbers = backOutputLineNumbers;
8219 struct Type * Dereference(struct Type * source)
8221 struct Type * type = (((void *)0));
8225 if(source->kind == 13 || source->kind == 12)
8227 type = source->__anon1.type;
8228 source->__anon1.type->refCount++;
8230 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8232 type = __extension__ ({
8233 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8235 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8238 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8244 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8249 static struct Type * Reference(struct Type * source)
8251 struct Type * type = (((void *)0));
8255 type = __extension__ ({
8256 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8258 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8265 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8267 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8269 FreeExpContents(checkedExp);
8270 FreeType(checkedExp->expType);
8271 FreeType(checkedExp->destType);
8272 *checkedExp = *newExp;
8273 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8274 checkedExp->prev = prev;
8275 checkedExp->next = next;
8278 void FinishTemplatesContext(struct Context * context)
8280 PopContext(context);
8281 FreeContext(context);
8282 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8285 static __attribute__((unused)) void UnusedFunction()
8289 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass_int, (void *)&a, 0, 0, 0);
8292 struct Expression * ParseExpressionString(char * expression)
8295 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8296 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8297 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8299 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8300 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8302 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8304 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8305 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8307 parsedExpression = (((void *)0));
8309 expression_yyparse();
8310 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8311 return parsedExpression;
8314 struct __ecereNameSpace__ecere__com__Module
8316 struct __ecereNameSpace__ecere__com__Instance * application;
8317 struct __ecereNameSpace__ecere__sys__OldList classes;
8318 struct __ecereNameSpace__ecere__sys__OldList defines;
8319 struct __ecereNameSpace__ecere__sys__OldList functions;
8320 struct __ecereNameSpace__ecere__sys__OldList modules;
8321 struct __ecereNameSpace__ecere__com__Instance * prev;
8322 struct __ecereNameSpace__ecere__com__Instance * next;
8328 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8329 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8330 } __attribute__ ((gcc_struct));
8332 static struct GlobalData * FindGlobalData(char * name)
8335 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8337 nameSpace = globalData;
8338 for(c = 0; name[c]; c++)
8340 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8342 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8343 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8345 strncpy(spaceName, name + start, c - start);
8346 spaceName[c - start] = '\0';
8347 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8348 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8350 return (((void *)0));
8351 nameSpace = newSpace;
8359 return ScanGlobalData(nameSpace, name + start);
8361 return (((void *)0));
8364 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8367 char nameSpace[1024];
8368 const char * namePart;
8369 unsigned int gotColon = 0;
8371 nameSpace[0] = '\0';
8372 for(c = strlen(name) - 1; c >= 0; c--)
8378 namePart = name + c + 1;
8379 while(c >= 0 && name[c] == ':')
8383 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8387 memcpy(nameSpace, name, c + 1);
8388 nameSpace[c + 1] = (char)0;
8389 return ScanWithNameSpace(tree, nameSpace, namePart);
8393 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8399 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8403 return ScanWithNameSpace(tree, "", namePart);
8405 return (((void *)0));
8408 static void PrintArraySize(struct Type * arrayType, char * string)
8414 if(arrayType->__anon1.__anon4.enumClass)
8415 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8416 else if(arrayType->__anon1.__anon4.arraySizeExp)
8417 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8419 strcat(string, size);
8422 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8427 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8429 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8430 strcat(string, ")");
8431 if(type->kind == 12)
8432 PrintArraySize(type, string);
8433 else if(type->kind == 11)
8435 struct Type * param;
8437 strcat(string, "(");
8438 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8440 PrintType(param, string, 1, fullName);
8442 strcat(string, ", ");
8444 strcat(string, ")");
8446 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8447 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8450 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8452 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8453 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8454 strcat(string, " ");
8455 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8457 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8459 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8461 if(type->classObjectType == 1)
8462 strcat(string, "class");
8464 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8466 else if(_class && _class->string)
8468 char * s = _class->string;
8474 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8480 strcat(string, name);
8483 strcat(string, "::");
8485 if(printName && type->name)
8486 PrintName(type, string, fullName);
8487 PostPrintType(type, string, fullName);
8488 if(type->bitFieldCount)
8492 sprintf(count, ":%d", type->bitFieldCount);
8493 strcat(string, count);
8501 struct Conversion * prev, * next;
8502 struct __ecereNameSpace__ecere__com__Property * convert;
8504 struct Type * resultType;
8505 } __attribute__ ((gcc_struct));
8507 static void FreeConvert(struct Conversion * convert)
8509 if(convert->resultType)
8510 FreeType(convert->resultType);
8517 struct Enumerator * prev;
8518 struct Enumerator * next;
8519 struct Location loc;
8520 struct Identifier * id;
8521 struct Expression * exp;
8522 } __attribute__ ((gcc_struct));
8528 struct AsmField * prev;
8529 struct AsmField * next;
8530 struct Location loc;
8532 struct Expression * expression;
8533 struct Identifier * symbolic;
8534 } __attribute__ ((gcc_struct));
8536 struct ClassDefinition;
8540 struct Context * parent;
8541 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8542 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8543 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8544 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8547 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8548 struct ClassDefinition * classDef;
8549 unsigned int templateTypesOnly;
8550 unsigned int hasNameSpace;
8551 } __attribute__ ((gcc_struct));
8555 struct External * prev;
8556 struct External * next;
8557 struct Location loc;
8559 struct Symbol * symbol;
8562 struct FunctionDefinition * function;
8563 struct ClassDefinition * _class;
8564 struct Declaration * declaration;
8565 char * importString;
8566 struct Identifier * id;
8567 struct DBTableDef * table;
8568 } __attribute__ ((gcc_struct)) __anon1;
8570 struct External * fwdDecl;
8571 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8572 struct __ecereNameSpace__ecere__com__Instance * incoming;
8573 int nonBreakableIncoming;
8574 } __attribute__ ((gcc_struct));
8576 struct ClassDefinition
8578 struct ClassDefinition * prev;
8579 struct ClassDefinition * next;
8580 struct Location loc;
8581 struct Specifier * _class;
8582 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8583 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8584 struct Symbol * symbol;
8585 struct Location blockStart;
8586 struct Location nameLoc;
8588 unsigned int deleteWatchable;
8589 } __attribute__ ((gcc_struct));
8591 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8593 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8595 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8597 struct Symbol * symbol = data->symbol;
8599 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8604 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8607 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8610 struct Declaration * decl;
8611 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8612 struct Declarator * d;
8613 struct External * external;
8615 specifiers = MkList();
8616 declarators = MkList();
8617 ListAdd(specifiers, MkSpecifier(EXTERN));
8618 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8619 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8620 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8621 decl = MkDeclaration(specifiers, declarators);
8622 external = MkExternalDeclaration(decl);
8624 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8625 external->symbol = symbol;
8626 symbol->__anon2.__anon1.pointerExternal = external;
8627 DeclareType(external, data->dataType, 1, 1);
8630 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8631 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8634 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8636 struct Context * ctx;
8637 struct Symbol * symbol = (((void *)0));
8639 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8641 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8643 symbol = (((void *)0));
8648 strcpy(curName, thisNameSpace);
8649 strcat(curName, "::");
8650 strcat(curName, name);
8651 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8654 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8657 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8658 if(symbol || ctx == endContext)
8661 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8662 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8670 struct ClassDef * prev;
8671 struct ClassDef * next;
8672 struct Location loc;
8676 struct Declaration * decl;
8677 struct ClassFunction * function;
8678 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8679 struct PropertyDef * propertyDef;
8680 struct PropertyWatch * propertyWatch;
8682 struct Identifier * defaultProperty;
8685 struct Identifier * id;
8686 struct Initializer * initializer;
8687 } __attribute__ ((gcc_struct)) __anon1;
8688 } __attribute__ ((gcc_struct)) __anon1;
8691 } __attribute__ ((gcc_struct));
8695 struct PropertyDef * prev;
8696 struct PropertyDef * next;
8697 struct Location loc;
8698 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8699 struct Declarator * declarator;
8700 struct Identifier * id;
8701 struct Statement * getStmt;
8702 struct Statement * setStmt;
8703 struct Statement * issetStmt;
8704 struct Symbol * symbol;
8705 struct Expression * category;
8708 unsigned int conversion : 1;
8709 unsigned int isWatchable : 1;
8710 unsigned int isDBProp : 1;
8711 } __attribute__ ((gcc_struct)) __anon1;
8712 } __attribute__ ((gcc_struct));
8714 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8716 struct ClassDef * def;
8719 for(def = (*definitions).first; def; def = def->next)
8723 struct Declaration * decl = def->__anon1.decl;
8725 if(decl && decl->__anon1.__anon1.specifiers)
8727 struct Specifier * spec;
8728 unsigned int isStruct = 0;
8730 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8732 if(spec->type == 3 || spec->type == 4)
8734 if(spec->__anon1.__anon2.definitions)
8735 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8741 struct Declarator * d = (((void *)0));
8743 if(decl->__anon1.__anon1.declarators)
8745 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8747 struct Identifier * idDecl = GetDeclId(d);
8757 sprintf(id, "__anon%d", anonID++);
8758 if(!decl->__anon1.__anon1.declarators)
8759 decl->__anon1.__anon1.declarators = MkList();
8760 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8770 typedef union YYSTYPE
8775 struct Identifier * id;
8776 struct Expression * exp;
8777 struct Specifier * specifier;
8778 struct __ecereNameSpace__ecere__sys__OldList * list;
8779 struct Enumerator * enumerator;
8780 struct Declarator * declarator;
8781 struct Pointer * pointer;
8782 struct Initializer * initializer;
8783 struct InitDeclarator * initDeclarator;
8784 struct TypeName * typeName;
8785 struct Declaration * declaration;
8786 struct Statement * stmt;
8787 struct FunctionDefinition * function;
8788 struct External * external;
8789 struct Context * context;
8790 struct AsmField * asmField;
8791 struct Attrib * attrib;
8792 struct ExtDecl * extDecl;
8793 struct Attribute * attribute;
8794 struct Instantiation * instance;
8795 struct MembersInit * membersInit;
8796 struct MemberInit * memberInit;
8797 struct ClassFunction * classFunction;
8798 struct ClassDefinition * _class;
8799 struct ClassDef * classDef;
8800 struct PropertyDef * prop;
8802 struct Symbol * symbol;
8803 struct PropertyWatch * propertyWatch;
8804 struct TemplateParameter * templateParameter;
8805 struct TemplateArgument * templateArgument;
8806 struct TemplateDatatype * templateDatatype;
8807 struct DBTableEntry * dbtableEntry;
8808 struct DBIndexItem * dbindexItem;
8809 struct DBTableDef * dbtableDef;
8810 } __attribute__ ((gcc_struct)) YYSTYPE;
8812 extern YYSTYPE yylval;
8816 struct MemberInit * prev;
8817 struct MemberInit * next;
8818 struct Location loc;
8819 struct Location realLoc;
8820 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8821 struct Initializer * initializer;
8823 unsigned int variable;
8824 unsigned int takeOutExp;
8825 } __attribute__ ((gcc_struct));
8827 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8829 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8831 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8833 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8834 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8839 const char * dataTypeString;
8841 } __attribute__ ((gcc_struct)) __anon1;
8842 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8844 } __attribute__ ((gcc_struct));
8846 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8848 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8850 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8851 struct __ecereNameSpace__ecere__com__Class * sClass;
8853 for(sClass = _class; sClass; sClass = sClass->base)
8856 if(sClass->templateClass)
8857 sClass = sClass->templateClass;
8858 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8860 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8862 for(sClass = sClass->base; sClass; sClass = sClass->base)
8864 if(sClass->templateClass)
8865 sClass = sClass->templateClass;
8866 id += sClass->templateParams.count;
8877 arg = &_class->templateArgs[id];
8878 if(arg && param->type == 0)
8879 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8884 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8886 struct Context * context = PushContext();
8888 context->templateTypesOnly = 1;
8889 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8891 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8893 for(; param; param = param->next)
8895 if(param->type == 0 && param->identifier)
8897 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8899 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8905 struct __ecereNameSpace__ecere__com__Class * sClass;
8907 for(sClass = _class; sClass; sClass = sClass->base)
8909 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8911 for(p = sClass->templateParams.first; p; p = p->next)
8915 struct TemplateParameter * param = p->param;
8916 struct TemplatedType * type;
8920 p->param = param = __extension__ ({
8921 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8923 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8926 type = __extension__ ({
8927 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8929 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8931 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8939 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8941 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8943 unsigned int first = 1;
8945 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8947 char className[1024];
8949 strcpy(className, _class->fullName);
8950 for(param = _class->templateParams.first; param; param = param->next)
8954 strcat(className, "<");
8956 strcat(className, ", ");
8957 if(lastParam + 1 != p)
8959 strcat(className, param->name);
8960 strcat(className, " = ");
8962 strcat(className, param->name);
8970 int len = strlen(className);
8972 if(className[len - 1] == '>')
8973 className[len++] = ' ';
8974 className[len++] = '>';
8975 className[len++] = '\0';
8977 return __ecereNameSpace__ecere__sys__CopyString(className);
8980 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
8983 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
8987 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8989 unsigned int first = 1;
8991 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8993 char className[1024];
8995 strcpy(className, _class->fullName);
8996 for(param = _class->templateParams.first; param; param = param->next)
9000 strcat(className, "<");
9002 strcat(className, ", ");
9003 if(lastParam + 1 != p)
9005 strcat(className, param->name);
9006 strcat(className, " = ");
9008 strcat(className, param->name);
9016 int len = strlen(className);
9018 if(className[len - 1] == '>')
9019 className[len++] = ' ';
9020 className[len++] = '>';
9021 className[len++] = '\0';
9023 type = MkClassType(className);
9027 type = MkClassType(_class->fullName);
9032 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9034 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9035 struct __ecereNameSpace__ecere__com__DataMember * member;
9036 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9038 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9039 DeclareMembers(neededBy, _class->base, 0);
9040 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9042 if(!member->isProperty)
9044 switch(member->type)
9048 if(!member->dataType && member->dataTypeString)
9049 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9050 if(member->dataType)
9051 DeclareType(neededBy, member->dataType, 1, 0);
9057 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9064 FinishTemplatesContext(context);
9065 return topMember ? topMember->memberID : _class->memberID;
9068 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9070 if(!method->dataType)
9072 struct Context * context = SetupTemplatesContext(method->_class);
9074 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9075 FinishTemplatesContext(context);
9076 if(method->type != 1 && method->dataType)
9078 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9080 if(!method->_class->symbol)
9081 method->_class->symbol = FindClass(method->_class->fullName);
9082 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9088 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9092 struct Context * context = SetupTemplatesContext(prop->_class);
9094 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9095 FinishTemplatesContext(context);
9099 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9101 if(specs != (((void *)0)) && _class)
9103 struct Specifier * spec;
9105 for(spec = specs->first; spec; spec = spec->next)
9107 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9110 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9111 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9117 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9119 struct Identifier * id = exp->__anon1.__anon1.identifier;
9120 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9121 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9122 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9123 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9125 if(_class && _class->type == 4)
9127 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9128 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9132 struct __ecereNameSpace__ecere__com__Class * baseClass;
9134 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9136 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9138 for(value = e->values.first; value; value = value->next)
9140 if(!strcmp(value->name, id->string))
9145 exp->isConstant = 1;
9146 if(inCompiler || inPreCompiler || inDebugger)
9150 FreeExpContents(exp);
9152 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9153 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9155 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9156 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9158 exp->expType = MkClassType(baseClass->fullName);
9166 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9168 ProcessMethodType(method);
9169 exp->expType = __extension__ ({
9170 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9172 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9176 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9179 ProcessPropertyType(prop);
9180 exp->expType = prop->dataType;
9182 prop->dataType->refCount++;
9185 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9187 if(!member->dataType)
9188 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9189 exp->expType = member->dataType;
9190 if(member->dataType)
9191 member->dataType->refCount++;
9194 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9196 if(!classProp->dataType)
9197 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9198 if(classProp->constant)
9200 FreeExpContents(exp);
9201 exp->isConstant = 1;
9202 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9205 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9212 sprintf(constant, "%d", (int)classProp->Get(_class));
9213 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9219 exp->expType = classProp->dataType;
9220 if(classProp->dataType)
9221 classProp->dataType->refCount++;
9227 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9229 struct Symbol * symbol = prop->symbol;
9230 unsigned int imported = 0;
9231 unsigned int dllImport = 0;
9232 struct External * structExternal = (((void *)0));
9233 struct External * instExternal = (((void *)0));
9235 strcpy(setName, "__ecereProp_");
9236 FullClassNameCat(setName, prop->_class->fullName, 0);
9237 strcat(setName, "_Set_");
9238 FullClassNameCat(setName, prop->name, 1);
9239 strcpy(getName, "__ecereProp_");
9240 FullClassNameCat(getName, prop->_class->fullName, 0);
9241 strcat(getName, "_Get_");
9242 FullClassNameCat(getName, prop->name, 1);
9243 if(!symbol || symbol->_import)
9247 struct Symbol * classSym;
9249 if(!prop->_class->symbol)
9250 prop->_class->symbol = FindClass(prop->_class->fullName);
9251 classSym = prop->_class->symbol;
9252 if(classSym && !classSym->_import)
9254 struct ModuleImport * module;
9256 if(prop->_class->module)
9257 module = FindModule(prop->_class->module);
9259 module = mainModule;
9260 classSym->_import = __extension__ ({
9261 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9263 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9265 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9267 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9268 symbol->_import = (struct ClassImport *)__extension__ ({
9269 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9271 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9274 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9277 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)
9282 struct Context * context = SetupTemplatesContext(prop->_class);
9284 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9285 FinishTemplatesContext(context);
9287 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9289 if(prop->_class->type == 0 && prop->_class->structSize)
9290 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9291 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9293 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9295 struct Declaration * decl;
9296 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9297 struct Declarator * d;
9298 struct __ecereNameSpace__ecere__sys__OldList * params;
9299 struct Specifier * spec = (((void *)0));
9300 struct External * external;
9301 struct Declarator * typeDecl;
9302 unsigned int simple = 0;
9303 unsigned int needReference;
9305 specifiers = MkList();
9306 declarators = MkList();
9308 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9309 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9311 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9313 struct Context * context = SetupTemplatesContext(prop->_class);
9315 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9316 FinishTemplatesContext(context);
9318 needReference = !typeDecl || typeDecl->type == 1;
9319 for(spec = (*specifiers).first; spec; spec = spec->next)
9323 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9327 symbol->_class = classSym->__anon1.registered;
9328 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9335 d = PlugDeclarator(typeDecl, d);
9338 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9339 specifiers = MkList();
9341 d = MkDeclaratorFunction(d, params);
9343 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9344 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9345 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9347 ListAdd(specifiers, MkSpecifier(VOID));
9348 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9349 decl = MkDeclaration(specifiers, declarators);
9350 external = MkExternalDeclaration(decl);
9352 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9354 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9356 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9357 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9358 external->symbol = symbol;
9359 symbol->__anon2.__anon2.externalGet = external;
9360 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9362 FreeDeclarator(typeDecl);
9364 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9366 struct Declaration * decl;
9367 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9368 struct Declarator * d;
9369 struct __ecereNameSpace__ecere__sys__OldList * params;
9370 struct Specifier * spec = (((void *)0));
9371 struct External * external;
9372 struct Declarator * typeDecl;
9373 unsigned int needReference;
9375 declarators = MkList();
9377 if(!prop->conversion || prop->_class->type == 1)
9379 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9381 specifiers = MkList();
9383 struct Context * context = SetupTemplatesContext(prop->_class);
9385 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9386 FinishTemplatesContext(context);
9388 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9389 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9390 ListAdd(params, MkTypeName(specifiers, d));
9391 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9393 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9394 d = MkDeclaratorFunction(d, params);
9395 needReference = !typeDecl || typeDecl->type == 1;
9396 for(spec = (*specifiers).first; spec; spec = spec->next)
9400 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9403 symbol->_class = classSym->__anon1.registered;
9407 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9408 specifiers = MkList();
9410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9411 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9412 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9413 if(!prop->conversion || prop->_class->type == 1)
9414 ListAdd(specifiers, MkSpecifier(VOID));
9416 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9417 decl = MkDeclaration(specifiers, declarators);
9418 external = MkExternalDeclaration(decl);
9420 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9422 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9424 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9425 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9426 external->symbol = symbol;
9427 symbol->__anon2.__anon2.externalSet = external;
9428 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9430 if(!symbol->__anon2.__anon2.externalPtr)
9432 struct Declaration * decl;
9433 struct External * external;
9434 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9435 char propName[1024];
9438 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9441 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9442 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9444 ListAdd(specifiers, MkSpecifierName("Property"));
9445 strcpy(propName, "__ecereProp_");
9446 FullClassNameCat(propName, prop->_class->fullName, 0);
9447 strcat(propName, "_");
9448 FullClassNameCat(propName, prop->name, 1);
9450 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9452 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9455 strcpy(propName, "__ecerePropM_");
9456 FullClassNameCat(propName, prop->_class->fullName, 0);
9457 strcat(propName, "_");
9458 FullClassNameCat(propName, prop->name, 1);
9459 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9461 decl = MkDeclaration(specifiers, list);
9463 external = MkExternalDeclaration(decl);
9464 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9465 external->symbol = symbol;
9466 symbol->__anon2.__anon2.externalPtr = external;
9468 if(inCompiler && neededBy)
9470 if(symbol->__anon2.__anon2.externalPtr)
9471 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9472 if(symbol->__anon2.__anon2.externalGet)
9473 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9474 if(symbol->__anon2.__anon2.externalSet)
9475 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9479 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9481 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9483 struct Symbol * symbol = method->symbol;
9485 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9487 unsigned int dllImport = 0;
9489 if(!method->dataType)
9490 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9492 if(!symbol || method->type == 1)
9494 struct Symbol * classSym;
9496 if(!method->_class->symbol)
9497 method->_class->symbol = FindClass(method->_class->fullName);
9498 classSym = method->_class->symbol;
9499 if(!classSym->_import)
9501 struct ModuleImport * module;
9503 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9504 module = FindModule(method->_class->module);
9506 module = mainModule;
9507 classSym->_import = __extension__ ({
9508 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9510 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9512 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9516 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9518 if(!symbol->_import)
9520 symbol->_import = (struct ClassImport *)__extension__ ({
9521 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9523 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9525 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9529 symbol->type = method->dataType;
9531 symbol->type->refCount++;
9534 if(!method->dataType->dllExport)
9536 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)
9542 struct Declaration * decl;
9543 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9544 struct Declarator * d;
9545 struct Declarator * funcDecl;
9546 struct External * external;
9548 specifiers = MkList();
9549 declarators = MkList();
9551 ListAdd(specifiers, MkSpecifier(EXTERN));
9552 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9553 ListAdd(specifiers, MkSpecifier(STATIC));
9554 if(method->type == 1)
9556 ListAdd(specifiers, MkSpecifier(INT));
9557 d = MkDeclaratorIdentifier(MkIdentifier(name));
9561 d = MkDeclaratorIdentifier(MkIdentifier(name));
9563 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9565 struct Context * context = SetupTemplatesContext(method->_class);
9567 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9568 FinishTemplatesContext(context);
9570 funcDecl = GetFuncDecl(d);
9573 struct Specifier * spec, * next;
9575 for(spec = (*specifiers).first; spec; spec = next)
9580 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9581 FreeSpecifier(spec);
9585 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9587 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9589 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9590 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")));
9591 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9592 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9594 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9596 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9598 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9599 FreeTypeName(param);
9601 if(!funcDecl->__anon1.function.parameters)
9602 funcDecl->__anon1.function.parameters = MkList();
9603 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9607 ProcessDeclarator(d, 1);
9608 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9609 decl = MkDeclaration(specifiers, declarators);
9610 ReplaceThisClassSpecifiers(specifiers, method->_class);
9611 external = MkExternalDeclaration(decl);
9612 external->symbol = symbol;
9613 symbol->__anon2.__anon1.pointerExternal = external;
9614 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9615 DeclareStruct(external, method->_class->fullName, 1, 1);
9616 if(method->dataType)
9617 DeclareType(external, method->dataType, 1, 1);
9620 if(inCompiler && neededFor)
9622 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9624 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9628 struct __ecereNameSpace__ecere__com__GlobalFunction;
9630 struct __ecereNameSpace__ecere__com__GlobalFunction
9632 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9633 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9636 struct __ecereNameSpace__ecere__com__Instance * module;
9637 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9638 const char * dataTypeString;
9639 struct Type * dataType;
9641 } __attribute__ ((gcc_struct));
9643 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9645 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);
9647 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9649 struct Symbol * symbol = function->symbol;
9651 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9653 unsigned int imported = 0;
9654 unsigned int dllImport = 0;
9656 if(!function->dataType)
9658 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9659 if(!function->dataType->__anon1.__anon2.thisClass)
9660 function->dataType->__anon1.__anon2.staticMethod = 1;
9666 struct ModuleImport * module = FindModule(function->module);
9668 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9671 if(!function->dataType->dllExport)
9673 symbol->_import = (struct ClassImport *)__extension__ ({
9674 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9676 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9678 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9682 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9683 if(!symbol->type->__anon1.__anon2.thisClass)
9684 symbol->type->__anon1.__anon2.staticMethod = 1;
9687 imported = symbol->_import ? 1 : 0;
9688 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9694 struct Declaration * decl;
9695 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9696 struct Declarator * d;
9697 struct Declarator * funcDecl;
9698 struct External * external;
9700 specifiers = MkList();
9701 declarators = MkList();
9702 ListAdd(specifiers, MkSpecifier(EXTERN));
9703 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9705 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9706 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9707 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9709 struct Specifier * spec;
9711 for(spec = (*specifiers).first; spec; spec = spec->next)
9712 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9714 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9715 FreeSpecifier(spec);
9719 funcDecl = GetFuncDecl(d);
9720 if(funcDecl && !funcDecl->__anon1.function.parameters)
9722 funcDecl->__anon1.function.parameters = MkList();
9723 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9725 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9727 struct Context * oldCtx = curContext;
9729 curContext = globalContext;
9730 decl = MkDeclaration(specifiers, declarators);
9731 curContext = oldCtx;
9733 external = MkExternalDeclaration(decl);
9734 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9735 external->symbol = symbol;
9736 symbol->__anon2.__anon1.pointerExternal = external;
9737 DeclareType(external, function->dataType, 1, 1);
9741 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9742 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9743 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;
9746 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9748 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9755 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9756 strcpy(name, "__ecereFunction_");
9757 FullClassNameCat(name, s, 0);
9758 DeclareFunction(neededBy, function, name);
9761 FindSymbol(s, globalContext, globalContext, 0, 0);
9764 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9766 char propName[1024], propNameM[1024];
9767 char getName[1024], setName[1024];
9768 struct __ecereNameSpace__ecere__sys__OldList * args;
9770 DeclareProperty(curExternal, prop, setName, getName);
9771 strcpy(propName, "__ecereProp_");
9772 FullClassNameCat(propName, prop->_class->fullName, 0);
9773 strcat(propName, "_");
9774 FullClassNameCat(propName, prop->name, 1);
9775 strcpy(propNameM, "__ecerePropM_");
9776 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9777 strcat(propNameM, "_");
9778 FullClassNameCat(propNameM, prop->name, 1);
9779 if(prop->isWatchable)
9782 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9783 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9784 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9786 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9787 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9788 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9789 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9793 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9794 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9795 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9797 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9798 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9799 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9800 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9802 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9803 curFunction->propSet->fireWatchersDone = 1;
9806 struct __ecereNameSpace__ecere__com__SubModule;
9808 struct __ecereNameSpace__ecere__com__SubModule
9810 struct __ecereNameSpace__ecere__com__SubModule * prev;
9811 struct __ecereNameSpace__ecere__com__SubModule * next;
9812 struct __ecereNameSpace__ecere__com__Instance * module;
9814 } __attribute__ ((gcc_struct));
9816 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9818 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9820 if(searchFor == searchIn)
9822 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9824 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9826 if(ModuleVisibility(subModule->module, searchFor))
9833 void ProcessExpressionType(struct Expression * exp);
9835 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9837 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9839 struct Identifier * id = exp->__anon1.__anon1.identifier;
9840 struct Context * ctx;
9841 struct Symbol * symbol = (((void *)0));
9843 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9845 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9847 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9852 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))))
9854 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9855 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9856 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9857 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9861 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9863 if(!prop && !method)
9864 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9865 if(!prop && !method && !member)
9867 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9869 if(prop || method || member || classProp)
9872 exp->__anon1.member.member = id;
9873 exp->__anon1.member.memberType = 0;
9874 exp->__anon1.member.exp = QMkExpId("this");
9877 else if(_class && _class->templateParams.first)
9879 struct __ecereNameSpace__ecere__com__Class * sClass;
9881 for(sClass = _class; sClass; sClass = sClass->base)
9883 if(sClass->templateParams.first)
9885 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9887 for(param = sClass->templateParams.first; param; param = param->next)
9889 if(param->type == 2 && !strcmp(param->name, id->string))
9891 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9895 struct Declarator * decl;
9896 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9898 FreeIdentifier(exp->__anon1.member.member);
9899 ProcessExpressionType(argExp);
9900 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9901 exp->expType = ProcessType(specs, decl);
9903 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9914 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9916 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9918 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9920 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9921 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9924 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9925 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9927 void * ptr = inst->data + dataMember->offset + offset;
9928 char * result = (((void *)0));
9930 exp->loc = member->loc = inst->loc;
9931 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9932 if(!dataMember->dataType)
9933 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9934 type = dataMember->dataType;
9937 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9939 if(_class->type == 4)
9941 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9945 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9946 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9948 for(item = e->values.first; item; item = item->next)
9950 if(item->data == GetEnumValue(_class, ptr))
9952 result = item->name;
9958 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9960 exp->destType = MkClassType(_class->fullName);
9961 ProcessExpressionType(exp);
9965 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9967 if(!_class->dataType)
9968 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9969 type = _class->dataType;
9978 FreeExpContents(exp);
9979 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
9985 FreeExpContents(exp);
9986 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
9992 FreeExpContents(exp);
9993 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
9999 FreeExpContents(exp);
10000 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10006 FreeExpContents(exp);
10007 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10013 FreeExpContents(exp);
10014 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10019 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10022 ListAdd(memberList, member);
10024 if(parentDataMember->type == 1)
10029 void CheckTemplateTypes(struct Expression * exp)
10031 struct Expression * nbExp = GetNonBracketsExp(exp);
10033 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10035 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10036 struct Context * context;
10037 int kind = exp->expType->kind;
10041 exp->destType->refCount++;
10043 exp->expType->refCount++;
10044 newExp->prev = (((void *)0));
10045 newExp->next = (((void *)0));
10046 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10048 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10050 if(c->type == 2 || c->type == 4 || c->type == 3)
10053 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10054 kind = c->dataType->kind;
10060 if(exp->destType->classObjectType)
10063 exp->destType->refCount--;
10065 exp->expType->refCount--;
10066 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10070 struct __ecereNameSpace__ecere__sys__OldList * specs;
10071 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10072 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10074 context = PushContext();
10075 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10076 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10077 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10079 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10080 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10081 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10082 exp->__anon1.compound->__anon1.compound.context = context;
10083 PopContext(context);
10088 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10089 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))
10090 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10092 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10097 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10099 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10100 struct Context * context;
10101 int kind = exp->expType->kind;
10105 exp->destType->refCount++;
10107 exp->expType->refCount++;
10108 newExp->prev = (((void *)0));
10109 newExp->next = (((void *)0));
10110 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10112 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10114 if(c->type == 2 || c->type == 4 || c->type == 3)
10117 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10118 kind = c->dataType->kind;
10124 if(exp->destType->classObjectType)
10127 exp->destType->refCount--;
10129 exp->expType->refCount--;
10130 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10134 struct __ecereNameSpace__ecere__sys__OldList * specs;
10135 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10136 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10138 context = PushContext();
10139 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10140 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10141 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10143 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10144 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10145 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10146 exp->__anon1.compound->__anon1.compound.context = context;
10147 PopContext(context);
10152 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10155 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10156 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)));
10157 ProcessExpressionType((*exp->__anon1.list).first);
10163 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10165 exp->needTemplateCast = 2;
10166 newExp->needCast = 1;
10167 newExp->needTemplateCast = 2;
10168 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10170 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10171 exp->needTemplateCast = 2;
10172 newExp->needCast = 1;
10173 newExp->needTemplateCast = 2;
10174 ProcessExpressionType((*exp->__anon1.list).first);
10180 if(exp->expType->kind == 20)
10182 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10186 FreeType(exp->destType);
10187 FreeType(exp->expType);
10188 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10192 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
10195 exp->__anon1.op.op = '*';
10196 exp->__anon1.op.exp1 = (((void *)0));
10197 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
10201 char typeString[1024];
10202 struct Declarator * decl;
10203 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10205 typeString[0] = '\0';
10206 PrintType(exp->expType, typeString, 0, 0);
10207 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10209 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10210 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10211 exp->__anon1.cast.exp->needCast = 1;
10219 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10224 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10226 if(init->__anon1.exp && !init->__anon1.exp->destType)
10228 FreeType(init->__anon1.exp->destType);
10229 init->__anon1.exp->destType = type;
10233 if(init->__anon1.exp)
10235 ProcessExpressionType(init->__anon1.exp);
10236 init->isConstant = init->__anon1.exp->isConstant;
10242 struct Expression * exp = init->__anon1.exp;
10243 struct Instantiation * inst = exp->__anon1.instance;
10244 struct MembersInit * members;
10247 init->__anon1.list = MkList();
10250 for(members = (*inst->members).first; members; members = members->next)
10252 if(members->type == 0)
10254 struct MemberInit * member;
10256 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10258 ListAdd(init->__anon1.list, member->initializer);
10259 member->initializer = (((void *)0));
10264 FreeExpression(exp);
10268 struct Initializer * i;
10269 struct Type * initializerType = (((void *)0));
10270 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10271 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10272 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10273 int subMemberStackPos = 0;
10275 if(type && type->kind == 12)
10276 initializerType = Dereference(type);
10277 else if(type && (type->kind == 9 || type->kind == 10))
10278 initializerType = type->__anon1.__anon1.members.first;
10279 for(i = (*init->__anon1.list).first; i; i = i->next)
10281 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10283 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10286 if(!curMember->dataType)
10287 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10288 initializerType = curMember->dataType;
10291 ProcessInitializer(i, initializerType);
10292 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10293 initializerType = initializerType->next;
10295 init->isConstant = 0;
10297 if(type && type->kind == 12)
10298 FreeType(initializerType);
10299 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))
10301 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10308 void PopulateInstance(struct Instantiation * inst)
10310 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10311 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10312 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10313 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10316 inst->members = MkListOne(MkMembersInitList(memberList));
10318 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10319 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10321 if(!dataMember->isProperty)
10323 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10324 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10327 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10328 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10329 struct Type * type;
10330 void * ptr = inst->data + dataMember->offset;
10331 char * result = (((void *)0));
10333 exp->loc = member->loc = inst->loc;
10334 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10335 if(!dataMember->dataType)
10336 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10337 type = dataMember->dataType;
10338 if(type->kind == 8)
10340 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10342 if(_class->type == 4)
10344 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10348 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10349 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10351 for(item = e->values.first; item; item = item->next)
10353 if(item->data == GetEnumValue(_class, ptr))
10355 result = item->name;
10362 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10364 exp->destType = MkClassType(_class->fullName);
10365 ProcessExpressionType(exp);
10368 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10370 if(!_class->dataType)
10371 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10372 type = _class->dataType;
10381 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10387 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10393 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10399 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10405 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10410 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10413 ListAdd(memberList, member);
10419 int ComputeTypeSize(struct Type * type);
10421 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10423 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10424 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10426 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))
10428 int unionMemberOffset = 0;
10433 member->memberOffset = 0;
10434 if(targetBits < sizeof(void *) * 8)
10435 member->structAlignment = (short)0;
10437 else if(targetBits < sizeof(void *) * 8)
10438 _class->structAlignment = (short)0;
10439 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10440 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10441 if(!member && _class->destructionWatchOffset)
10442 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10444 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10446 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10448 if(!dataMember->isProperty)
10450 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10452 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10458 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10460 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10462 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10464 if(!isMember && _class->type == 2 && dataMember->dataType)
10466 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10470 ComputeTypeSize(dataMember->dataType);
10471 if(bitMember->pos == -1)
10472 bitMember->pos = _class->memberOffset;
10473 if(!bitMember->size)
10474 bitMember->size = dataMember->dataType->size * 8;
10475 _class->memberOffset = bitMember->pos + bitMember->size;
10476 for(d = 0; d < bitMember->size; d++)
10482 bitMember->mask = mask << bitMember->pos;
10484 else if(dataMember->type == 0 && dataMember->dataType)
10489 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)))
10490 ComputeTypeSize(dataMember->dataType);
10491 if(dataMember->dataType->bitFieldCount)
10493 bitFields += dataMember->dataType->bitFieldCount;
10500 int size = (bitFields + 7) / 8;
10504 int __simpleStruct0;
10508 short __simpleStruct0;
10510 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10511 if(member->memberOffset % alignment)
10512 member->memberOffset += alignment - (member->memberOffset % alignment);
10514 dataMember->offset = member->memberOffset;
10515 if(member->type == 1)
10516 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10519 member->memberOffset += size;
10526 short __simpleStruct0;
10528 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10529 if(_class->memberOffset % alignment)
10530 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10532 dataMember->offset = _class->memberOffset;
10533 _class->memberOffset += size;
10537 size = dataMember->dataType->size;
10538 alignment = dataMember->dataType->alignment;
10542 int __simpleStruct0;
10546 short __simpleStruct0;
10548 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10549 if(member->memberOffset % alignment)
10550 member->memberOffset += alignment - (member->memberOffset % alignment);
10552 dataMember->offset = member->memberOffset;
10553 if(member->type == 1)
10554 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10557 member->memberOffset += size;
10564 short __simpleStruct0;
10566 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10567 if(_class->memberOffset % alignment)
10568 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10570 dataMember->offset = _class->memberOffset;
10571 _class->memberOffset += size;
10578 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10579 alignment = dataMember->structAlignment;
10582 int __simpleStruct0;
10586 short __simpleStruct0;
10588 if(member->memberOffset % alignment)
10589 member->memberOffset += alignment - (member->memberOffset % alignment);
10590 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10592 dataMember->offset = member->memberOffset;
10593 if(member->type == 1)
10594 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10596 member->memberOffset += dataMember->memberOffset;
10602 short __simpleStruct0;
10604 if(_class->memberOffset % alignment)
10605 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10606 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10608 dataMember->offset = _class->memberOffset;
10609 _class->memberOffset += dataMember->memberOffset;
10617 int size = (bitFields + 7) / 8;
10621 int __simpleStruct0;
10625 short __simpleStruct0;
10627 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10628 if(member->memberOffset % alignment)
10629 member->memberOffset += alignment - (member->memberOffset % alignment);
10631 if(member->type == 1)
10632 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10635 member->memberOffset += size;
10642 short __simpleStruct0;
10644 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10645 if(_class->memberOffset % alignment)
10646 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10648 _class->memberOffset += size;
10653 if(member && member->type == 1)
10655 member->memberOffset = unionMemberOffset;
10659 if(_class->type != 2)
10663 if(_class->structAlignment)
10665 if(_class->memberOffset % _class->structAlignment)
10666 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10668 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10671 struct __ecereNameSpace__ecere__com__Property * prop;
10673 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10675 if(prop->isProperty && prop->isWatchable)
10677 prop->watcherOffset = _class->structSize;
10678 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10683 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10685 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10687 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10689 if(deriv->computeSize)
10691 deriv->offset = _class->structSize;
10692 deriv->memberOffset = 0;
10693 deriv->structSize = deriv->offset;
10694 ComputeClassMembers(deriv, 0);
10702 FinishTemplatesContext(context);
10705 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)
10707 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10708 unsigned int totalSize = 0;
10709 unsigned int maxSize = 0;
10712 struct __ecereNameSpace__ecere__com__DataMember * member;
10714 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10718 if(!isMember && _class->base)
10720 maxSize = _class->structSize;
10722 if(_class->type == 1 || _class->type == 5)
10723 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10726 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10728 if(maxSize > baseSize)
10729 maxSize -= baseSize;
10735 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10737 if(!member->isProperty)
10739 switch(member->type)
10743 if(member->dataTypeString)
10745 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10746 struct Declarator * decl;
10748 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10749 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10750 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10751 if(!member->dataType)
10752 member->dataType = ProcessType(specs, decl);
10753 ReplaceThisClassSpecifiers(specs, topClass);
10755 struct Type * type = ProcessType(specs, decl);
10757 DeclareType(neededBy, member->dataType, 1, 0);
10760 ComputeTypeSize(member->dataType);
10761 size = member->dataType->size;
10762 alignment = member->dataType->alignment;
10765 if(totalSize % alignment)
10766 totalSize += alignment - (totalSize % alignment);
10775 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10778 sprintf(id, "__anon%d", anonID++);
10780 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10781 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10782 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10783 alignment = member->structAlignment;
10786 if(totalSize % alignment)
10787 totalSize += alignment - (totalSize % alignment);
10797 unsigned int __simpleStruct0;
10799 if(topMember && topMember->type == 1)
10800 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10802 *retSize += totalSize;
10804 else if(totalSize < maxSize && _class->type != 1000)
10806 int autoPadding = 0;
10808 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10809 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10810 if(totalSize + autoPadding < maxSize)
10812 char sizeString[50];
10814 sprintf(sizeString, "%d", maxSize - totalSize);
10815 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10821 FinishTemplatesContext(context);
10822 return topMember ? topMember->memberID : _class->memberID;
10825 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)
10830 CheckConstCompatibility(source, dest, 1);
10831 if(source->kind == 20 && dest->kind != 20)
10833 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10838 if(dest->kind == 20 && source->kind != 20)
10840 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10845 if(dest->classObjectType == 2 && dest->kind != 11)
10847 if(source->classObjectType != 3)
10851 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10859 if(source->kind != 11 && source->classObjectType == 3)
10861 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10864 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10866 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))
10869 if(dest->kind == 14 && source->kind != 0)
10871 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))
10873 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))
10875 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10877 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10879 if(conversions != (((void *)0)))
10881 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10886 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10888 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10890 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10892 if(sourceBase == destBase)
10896 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))
10900 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4 && ((source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type != 4) || source->kind == 8))
10902 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10909 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10913 if(source->kind == 8)
10915 struct __ecereNameSpace__ecere__com__Class * _class;
10917 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10919 struct __ecereNameSpace__ecere__com__Property * convert;
10921 for(convert = _class->conversions.first; convert; convert = convert->next)
10923 if(convert->memberAccess == 1 || _class->module == privateModule)
10925 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10927 if(!convert->dataType)
10928 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10929 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))
10931 if(!conversions && !convert->Get)
10933 else if(conversions != (((void *)0)))
10935 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))
10939 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10941 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10950 if(dest->kind == 8)
10952 struct __ecereNameSpace__ecere__com__Class * _class;
10954 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10956 struct __ecereNameSpace__ecere__com__Property * convert;
10958 for(convert = _class->conversions.first; convert; convert = convert->next)
10960 if(convert->memberAccess == 1 || _class->module == privateModule)
10962 struct Type * constType = (((void *)0));
10963 unsigned int success = 0;
10965 if(!convert->dataType)
10966 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10967 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10969 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10971 constType = __extension__ ({
10972 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10974 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10976 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10977 ptrType->constant = 1;
10979 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10981 if(!conversions && !convert->Set)
10983 else if(conversions != (((void *)0)))
10985 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))
10989 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10991 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
10997 FreeType(constType);
11003 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11005 if(!dest->__anon1._class->__anon1.registered->dataType)
11006 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11007 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11009 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))
11016 if(source->kind == 8)
11018 struct __ecereNameSpace__ecere__com__Class * _class;
11020 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11022 struct __ecereNameSpace__ecere__com__Property * convert;
11024 for(convert = _class->conversions.first; convert; convert = convert->next)
11026 if(convert->memberAccess == 1 || _class->module == privateModule)
11028 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11030 if(!convert->dataType)
11031 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11032 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))
11034 if(!conversions && !convert->Get)
11036 else if(conversions != (((void *)0)))
11038 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))
11042 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11044 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11052 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11054 if(!source->__anon1._class->__anon1.registered->dataType)
11055 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11056 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11058 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))
11060 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11066 if(source->kind == 8 || source->kind == 19)
11068 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11070 else if(dest->kind == 7 && source->kind == 6)
11072 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11074 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11076 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11078 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11080 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11082 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))
11084 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))
11086 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)))
11088 struct Type * paramSource, * paramDest;
11090 if(dest->kind == 16)
11091 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11092 if(source->kind == 16)
11093 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11094 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11095 dest = dest->__anon1.type;
11096 if(source->kind == 13 && source->__anon1.type->kind == 11)
11097 source = source->__anon1.type;
11098 if(dest->kind == 16)
11099 dest = dest->__anon1.__anon3.method->dataType;
11100 if(source->kind == 16)
11101 source = source->__anon1.__anon3.method->dataType;
11102 paramSource = source->__anon1.__anon2.params.first;
11103 if(paramSource && paramSource->kind == 0)
11104 paramSource = (((void *)0));
11105 paramDest = dest->__anon1.__anon2.params.first;
11106 if(paramDest && paramDest->kind == 0)
11107 paramDest = (((void *)0));
11108 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11110 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))))
11112 if(paramDest && paramDest->kind == 8)
11113 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11115 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11118 paramDest = paramDest->next;
11120 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11122 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11124 if(dest->__anon1.__anon2.thisClass)
11126 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11128 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11134 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11136 if(owningClassDest)
11137 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11139 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11143 paramSource = paramSource->next;
11147 if(dest->__anon1.__anon2.thisClass)
11149 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11151 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11157 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11159 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11165 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11167 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11171 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11172 for(; paramDest; paramDest = paramDest->next)
11176 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11180 struct Type * paramDestType = paramDest;
11181 struct Type * paramSourceType = paramSource;
11182 struct Type * type = paramDestType;
11184 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11187 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11188 struct __ecereNameSpace__ecere__com__Class * sClass;
11190 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11193 if(sClass->templateClass)
11194 sClass = sClass->templateClass;
11195 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11197 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11199 for(sClass = sClass->base; sClass; sClass = sClass->base)
11201 if(sClass->templateClass)
11202 sClass = sClass->templateClass;
11203 id += sClass->templateParams.count;
11214 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11216 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11219 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)))
11224 PrintType(paramDest, type, 0, 1);
11225 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11226 if(paramDestType != paramDest)
11227 FreeType(paramDestType);
11230 if(paramDestType != paramDest)
11231 FreeType(paramDestType);
11233 paramSource = paramSource->next;
11237 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11242 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11246 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11248 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))
11250 ComputeTypeSize(source->__anon1.type);
11251 ComputeTypeSize(dest->__anon1.type);
11252 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))
11260 void ComputeInstantiation(struct Expression * exp)
11262 struct Instantiation * inst = exp->__anon1.instance;
11263 struct MembersInit * members;
11264 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11265 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11266 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11267 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11268 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11269 int subMemberStackPos = 0;
11272 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11276 if(_class->type == 0 || _class->type == 5)
11278 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11279 if(_class->type == 0)
11280 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11283 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11287 for(members = (*inst->members).first; members; members = members->next)
11289 switch(members->type)
11293 if(members->__anon1.dataMembers)
11295 struct MemberInit * member;
11297 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11299 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11300 unsigned int found = 0;
11301 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11302 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11303 unsigned int dataMemberOffset;
11307 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11310 if(curMember->isProperty)
11311 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11314 dataMember = curMember;
11315 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11316 if(_class->type == 0)
11317 dataMemberOffset += _class->base->structSize;
11324 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11328 if(prop->memberAccess == 1)
11330 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11331 curClass = prop->_class;
11336 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11337 int _subMemberStackPos = 0;
11339 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11343 if(dataMember->memberAccess == 1)
11345 curMember = dataMember;
11346 curClass = dataMember->_class;
11347 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11348 subMemberStackPos = _subMemberStackPos;
11353 if(found && member->initializer && member->initializer->type == 0)
11355 struct Expression * value = member->initializer->__anon1.exp;
11356 struct Type * type = (((void *)0));
11357 unsigned int deepMember = 0;
11361 type = prop->dataType;
11363 else if(dataMember)
11365 if(!dataMember->dataType)
11366 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11367 type = dataMember->dataType;
11369 if(ident && ident->next)
11372 for(ident = ident->next; ident && type; ident = ident->next)
11374 if(type->kind == 8)
11376 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11378 type = prop->dataType;
11381 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11383 type = dataMember->dataType;
11386 else if(type->kind == 9 || type->kind == 10)
11388 struct Type * memberType;
11390 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11392 if(!strcmp(memberType->name, ident->string))
11403 FreeType(value->destType);
11404 value->destType = type;
11407 ComputeExpression(value);
11409 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11411 if(type->kind == 8)
11413 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11415 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11417 if(!_class->dataType)
11418 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11419 type = _class->dataType;
11424 void * ptr = inst->data + dataMemberOffset;
11426 if(value->type == 2)
11432 GetInt(value, (int *)ptr);
11437 GetInt64(value, (long long *)ptr);
11442 GetIntPtr(value, (intptr_t *)ptr);
11447 GetIntSize(value, (ssize_t *)ptr);
11452 GetFloat(value, (float *)ptr);
11457 GetDouble(value, (double *)ptr);
11462 else if(value->type == 1)
11464 if(type->kind == 8)
11466 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11468 if(_class->type == 1)
11470 ComputeTypeSize(type);
11471 if(value->__anon1.instance->data)
11472 memcpy(ptr, value->__anon1.instance->data, type->size);
11477 else if(prop && prop->Set != (void *)(intptr_t)1)
11479 if(value->type == 1 && value->__anon1.instance->data)
11481 if(type->kind == 8)
11483 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11485 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)))
11487 void (* Set)(void *, void *) = (void *)prop->Set;
11489 Set(inst->data, value->__anon1.instance->data);
11490 PopulateInstance(inst);
11494 else if(value->type == 2)
11500 void (* Set)(void *, double) = (void *)prop->Set;
11502 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11507 void (* Set)(void *, float) = (void *)prop->Set;
11509 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11514 void (* Set)(void *, int) = (void *)prop->Set;
11516 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11521 void (* Set)(void *, long long) = (void *)prop->Set;
11523 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11528 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11530 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11535 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11537 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11542 else if(value->type == 3)
11546 ReadString(temp, value->__anon1.__anon2.string);
11547 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11551 else if(!deepMember && type && _class->type == 3)
11555 if(value->type == 2)
11557 if(type->kind == 8)
11559 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11561 if(_class->type == 3)
11563 if(!_class->dataType)
11564 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11565 type = _class->dataType;
11573 float (* Set)(float) = (void *)prop->Set;
11575 GetFloat(member->initializer->__anon1.exp, &fValue);
11576 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11583 double (* Set)(double) = (void *)prop->Set;
11585 GetDouble(member->initializer->__anon1.exp, &dValue);
11586 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11594 else if(!deepMember && type && _class->type == 2)
11598 if(value->type == 1 && value->__anon1.instance->data)
11600 unsigned int (* Set)(void *) = (void *)prop->Set;
11602 bits = Set(value->__anon1.instance->data);
11604 else if(value->type == 2)
11608 else if(dataMember)
11610 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11611 struct Type * type;
11614 bits = (bits & ~bitMember->mask);
11615 if(!bitMember->dataType)
11616 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11617 type = bitMember->dataType;
11618 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11620 if(!type->__anon1._class->__anon1.registered->dataType)
11621 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11622 type = type->__anon1._class->__anon1.registered->dataType;
11631 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11639 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11648 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11656 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11664 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11672 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11677 bits |= part << bitMember->pos;
11683 if(_class && _class->type == 3)
11685 ComputeExpression(member->initializer->__anon1.exp);
11686 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11688 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11698 if(_class && _class->type == 2)
11700 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11705 FreeInstance(inst);
11709 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11711 if(exp->__anon1.op.op == SIZEOF)
11713 FreeExpContents(exp);
11715 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11719 if(!exp->__anon1.op.exp1)
11721 switch(exp->__anon1.op.op)
11725 struct Expression * exp2 = exp->__anon1.op.exp2;
11727 exp->__anon1.op.exp2 = (((void *)0));
11728 FreeExpContents(exp);
11729 FreeType(exp->expType);
11730 FreeType(exp->destType);
11732 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11738 FreeExpContents(exp);
11739 op1->ops.Neg(exp, op1);
11743 if(op1->ops.BitNot)
11745 FreeExpContents(exp);
11746 op1->ops.BitNot(exp, op1);
11752 FreeExpContents(exp);
11753 op1->ops.Not(exp, op1);
11760 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11762 if(Promote(op2, op1->kind, op1->type->isSigned))
11763 op2->kind = op1->kind, op2->ops = op1->ops;
11764 else if(Promote(op1, op2->kind, op2->type->isSigned))
11765 op1->kind = op2->kind, op1->ops = op2->ops;
11767 switch(exp->__anon1.op.op)
11772 FreeExpContents(exp);
11773 op1->ops.Add(exp, op1, op2);
11779 FreeExpContents(exp);
11780 op1->ops.Sub(exp, op1, op2);
11786 FreeExpContents(exp);
11787 op1->ops.Mul(exp, op1, op2);
11793 FreeExpContents(exp);
11794 op1->ops.Div(exp, op1, op2);
11800 FreeExpContents(exp);
11801 op1->ops.Mod(exp, op1, op2);
11805 if(exp->__anon1.op.exp2)
11807 if(op1->ops.BitAnd)
11809 FreeExpContents(exp);
11810 op1->ops.BitAnd(exp, op1, op2);
11817 FreeExpContents(exp);
11818 op1->ops.BitOr(exp, op1, op2);
11822 if(op1->ops.BitXor)
11824 FreeExpContents(exp);
11825 op1->ops.BitXor(exp, op1, op2);
11829 if(op1->ops.LShift)
11831 FreeExpContents(exp);
11832 op1->ops.LShift(exp, op1, op2);
11836 if(op1->ops.RShift)
11838 FreeExpContents(exp);
11839 op1->ops.RShift(exp, op1, op2);
11845 FreeExpContents(exp);
11846 op1->ops.Equ(exp, op1, op2);
11852 FreeExpContents(exp);
11853 op1->ops.Nqu(exp, op1, op2);
11859 FreeExpContents(exp);
11860 op1->ops.And(exp, op1, op2);
11866 FreeExpContents(exp);
11867 op1->ops.Or(exp, op1, op2);
11873 FreeExpContents(exp);
11874 op1->ops.Grt(exp, op1, op2);
11880 FreeExpContents(exp);
11881 op1->ops.Sma(exp, op1, op2);
11885 if(op1->ops.GrtEqu)
11887 FreeExpContents(exp);
11888 op1->ops.GrtEqu(exp, op1, op2);
11892 if(op1->ops.SmaEqu)
11894 FreeExpContents(exp);
11895 op1->ops.SmaEqu(exp, op1, op2);
11903 void ApplyAnyObjectLogic(struct Expression * e)
11905 struct Type * destType = e->destType;
11907 if(destType && (destType->classObjectType == 3))
11909 if(e && e->expType)
11911 struct Type * type = e->expType;
11912 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11914 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11916 _class = type->__anon1._class->__anon1.registered;
11918 else if(type->kind == 19)
11920 _class = FindClass("ecere::com::Class")->__anon1.registered;
11924 char string[1024] = "";
11925 struct Symbol * classSym;
11927 PrintTypeNoConst(type, string, 0, 1);
11928 classSym = FindClass(string);
11930 _class = classSym->__anon1.registered;
11932 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)))
11934 if(!_class || strcmp(_class->fullName, "char *"))
11936 struct Expression * checkedExp = e, * newExp;
11938 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11940 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11942 if(checkedExp->type == 23)
11944 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11947 checkedExp = (*checkedExp->__anon1.list).last;
11949 else if(checkedExp->type == 11)
11950 checkedExp = checkedExp->__anon1.cast.exp;
11952 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11954 newExp = checkedExp->__anon1.op.exp2;
11955 checkedExp->__anon1.op.exp2 = (((void *)0));
11956 FreeExpContents(checkedExp);
11957 if(e->expType && e->expType->passAsTemplate)
11961 ComputeTypeSize(e->expType);
11962 sprintf(size, "%d", e->expType->size);
11963 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))))));
11965 ReplaceExpContents(checkedExp, newExp);
11966 e->byReference = 1;
11968 else if(!e->byReference || (_class && _class->type == 5))
11970 struct Expression * checkedExp;
11973 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;
11975 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11977 struct Context * context = PushContext();
11978 struct Declarator * decl;
11979 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11980 char typeString[1024];
11981 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11983 typeString[0] = '\0';
11985 newExp->prev = (((void *)0));
11986 newExp->next = (((void *)0));
11987 newExp->expType = (((void *)0));
11988 PrintTypeNoConst(e->expType, typeString, 0, 1);
11989 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11990 newExp->destType = ProcessType(specs, decl);
11991 curContext = context;
11995 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
11998 sprintf(name, "__internalValue%03X", internalValueCounter++);
11999 if(!curCompound->__anon1.compound.declarations)
12000 curCompound->__anon1.compound.declarations = MkList();
12001 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12002 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12003 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12004 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12007 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12009 struct Type * type = e->destType;
12011 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12012 CopyTypeInto(e->destType, type);
12013 e->destType->refCount = 1;
12014 e->destType->classObjectType = 0;
12017 e->__anon1.compound->__anon1.compound.context = context;
12018 PopContext(context);
12019 curContext = context->parent;
12023 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12025 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12027 if(checkedExp->type == 23)
12029 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12032 checkedExp = (*checkedExp->__anon1.list).last;
12034 else if(checkedExp->type == 11)
12035 checkedExp = checkedExp->__anon1.cast.exp;
12038 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12040 *operand = *checkedExp;
12041 __ecereMethod_Expression_Clear(checkedExp);
12042 checkedExp->destType = ProcessTypeString("void *", 0);
12043 checkedExp->expType = checkedExp->destType;
12044 checkedExp->destType->refCount++;
12045 checkedExp->type = 4;
12046 checkedExp->__anon1.op.op = '&';
12047 checkedExp->__anon1.op.exp1 = (((void *)0));
12048 checkedExp->__anon1.op.exp2 = operand;
12057 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))))
12059 if(e->expType->classObjectType && destType && destType->classObjectType)
12065 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12068 thisExp->prev = (((void *)0));
12069 thisExp->next = (((void *)0));
12070 __ecereMethod_Expression_Clear(e);
12072 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12073 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12074 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12076 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12077 CopyTypeInto(e->expType, thisExp->expType);
12078 e->expType->byReference = 0;
12079 e->expType->refCount = 1;
12080 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))
12082 e->expType->classObjectType = 0;
12087 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12089 if(destType->kind == 14)
12091 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12093 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))
12095 unsigned int byReference = e->expType->byReference;
12096 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12097 struct Declarator * decl;
12098 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12099 char typeString[1024];
12100 struct Type * type;
12101 int backupClassObjectType;
12102 unsigned int backupByReference;
12104 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12108 backupClassObjectType = type->classObjectType;
12109 backupByReference = type->byReference;
12110 type->classObjectType = 0;
12111 type->byReference = 0;
12112 typeString[0] = '\0';
12113 PrintType(type, typeString, 0, 1);
12114 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12115 type->classObjectType = backupClassObjectType;
12116 type->byReference = backupByReference;
12118 thisExp->prev = (((void *)0));
12119 thisExp->next = (((void *)0));
12120 __ecereMethod_Expression_Clear(e);
12121 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)))
12123 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12126 destType->refCount++;
12128 e->__anon1.op.op = '*';
12129 e->__anon1.op.exp1 = (((void *)0));
12130 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12131 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12132 CopyTypeInto(t, thisExp->destType);
12133 t->passAsTemplate = 0;
12134 FreeType(thisExp->destType);
12135 thisExp->destType = t;
12136 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12137 CopyTypeInto(t, destType);
12138 t->passAsTemplate = passAsTemplate;
12139 FreeType(destType);
12141 destType->refCount = 0;
12142 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12143 CopyTypeInto(e->expType, type);
12144 if(type->passAsTemplate)
12146 e->expType->classObjectType = 0;
12147 e->expType->passAsTemplate = 0;
12149 e->expType->byReference = 0;
12150 e->expType->refCount = 1;
12155 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12156 e->__anon1.cast.exp = thisExp;
12157 e->byReference = 1;
12162 FreeType(e->destType);
12163 e->destType = destType;
12164 destType->refCount++;
12169 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12171 struct __ecereNameSpace__ecere__com__Class * _class;
12172 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12174 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12175 ComputeModuleClasses(subModule->data);
12176 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12177 ComputeClassMembers(_class, 0);
12180 int ComputeTypeSize(struct Type * type)
12182 unsigned int size = type ? type->size : 0;
12184 if(!size && type && !type->computing)
12186 type->computing = 1;
12190 type->alignment = size = sizeof(char);
12193 type->alignment = size = sizeof(char);
12196 type->alignment = size = sizeof(int);
12199 type->alignment = size = sizeof(long long);
12202 type->alignment = size = targetBits / 8;
12203 type->pointerAlignment = 1;
12206 type->alignment = size = targetBits / 8;
12207 type->pointerAlignment = 1;
12210 type->alignment = size = sizeof(long);
12213 type->alignment = size = sizeof(short);
12216 type->alignment = size = sizeof(float);
12219 type->alignment = size = sizeof(double);
12223 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12225 if(_class && _class->type == 1)
12227 ComputeClassMembers(_class, 0);
12228 type->alignment = _class->structAlignment;
12229 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12230 size = _class->structSize;
12231 if(type->alignment && size % type->alignment)
12232 size += type->alignment - (size % type->alignment);
12234 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12236 if(!_class->dataType)
12237 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12238 size = type->alignment = ComputeTypeSize(_class->dataType);
12242 size = type->alignment = targetBits / 8;
12243 type->pointerAlignment = 1;
12249 size = type->alignment = targetBits / 8;
12250 type->pointerAlignment = 1;
12253 if(type->__anon1.__anon4.arraySizeExp)
12255 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12256 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12257 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)))
12259 struct Location oldLoc = yylloc;
12260 char expression[10240];
12262 expression[0] = '\0';
12263 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12264 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12266 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12267 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12270 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12272 else if(type->__anon1.__anon4.enumClass)
12274 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12276 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12279 type->__anon1.__anon4.arraySize = 0;
12283 type->__anon1.__anon4.arraySize = 0;
12285 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12286 if(type->__anon1.type)
12288 type->alignment = type->__anon1.type->alignment;
12289 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12294 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12296 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12298 if(symbol && symbol->type)
12300 ComputeTypeSize(symbol->type);
12301 size = symbol->type->size;
12306 struct Type * member;
12308 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12310 int __simpleStruct0, __simpleStruct1;
12311 unsigned int addSize = ComputeTypeSize(member);
12313 member->offset = size;
12314 if(member->alignment && size % member->alignment)
12315 member->offset += member->alignment - (size % member->alignment);
12316 size = member->offset;
12317 if(member->pointerAlignment && type->size <= 4)
12318 type->pointerAlignment = 1;
12319 else if(!member->pointerAlignment && member->alignment >= 8)
12320 type->pointerAlignment = 0;
12321 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12324 if(type->alignment && size % type->alignment)
12325 size += type->alignment - (size % type->alignment);
12331 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12333 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12335 if(symbol && symbol->type)
12337 ComputeTypeSize(symbol->type);
12338 size = symbol->type->size;
12339 type->alignment = symbol->type->alignment;
12344 struct Type * member;
12346 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12348 int __simpleStruct0, __simpleStruct1;
12349 unsigned int addSize = ComputeTypeSize(member);
12351 member->offset = size;
12352 if(member->alignment && size % member->alignment)
12353 member->offset += member->alignment - (size % member->alignment);
12354 size = member->offset;
12355 if(member->pointerAlignment && type->size <= 4)
12356 type->pointerAlignment = 1;
12357 else if(!member->pointerAlignment && member->alignment >= 8)
12358 type->pointerAlignment = 0;
12359 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12360 size = ((size > addSize) ? size : addSize);
12362 if(type->alignment && size % type->alignment)
12363 size += type->alignment - (size % type->alignment);
12369 struct TemplateParameter * param = type->__anon1.templateParameter;
12370 struct Type * baseType = ProcessTemplateParameterType(param);
12374 size = ComputeTypeSize(baseType);
12375 type->alignment = baseType->alignment;
12376 type->pointerAlignment = baseType->pointerAlignment;
12379 type->alignment = size = sizeof(uint64);
12384 type->alignment = size = sizeof(enum
12392 type->alignment = size = targetBits / 8;
12393 type->pointerAlignment = 1;
12398 type->computing = 0;
12403 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12405 struct External * external = (((void *)0));
12406 struct Symbol * classSym = FindClass(name);
12407 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12408 struct Specifier * curSpec = (((void *)0));
12410 if(!inCompiler || !classSym)
12411 return (((void *)0));
12412 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12413 return (((void *)0));
12414 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12415 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12416 external = classSym->__anon2.__anon1.structExternal;
12417 if(external && external->__anon1.declaration)
12419 struct Specifier * spec;
12421 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12422 if(spec->type == 3 || spec->type == 4)
12425 curDeclarations = spec->__anon1.__anon2.definitions;
12429 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12431 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12432 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12433 char structName[1024];
12434 unsigned int addedPadding = 0;
12436 classSym->declaring++;
12437 if(strchr(classSym->string, '<'))
12439 if(classSym->__anon1.registered->templateClass)
12441 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12442 classSym->declaring--;
12446 structName[0] = (char)0;
12447 FullClassNameCat(structName, name, 0);
12448 classSym->declaredStructSym = 1;
12449 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12451 unsigned int add = 0;
12455 external = MkExternalDeclaration((((void *)0)));
12456 classSym->__anon2.__anon1.structExternal = external;
12457 external->symbol = classSym;
12462 declarations = MkList();
12463 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12465 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12467 FreeList(declarations, (void *)(FreeClassDef));
12468 declarations = (((void *)0));
12470 if(classSym->__anon1.registered->type != 5 && !declarations)
12472 FreeExternal(external);
12473 external = (((void *)0));
12474 classSym->__anon2.__anon1.structExternal = (((void *)0));
12479 curSpec->__anon1.__anon2.definitions = declarations;
12482 char className[1024];
12484 strcpy(className, "__ecereClass_");
12485 FullClassNameCat(className, classSym->string, 1);
12486 specifiers = MkList();
12487 declarators = MkList();
12488 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12489 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12495 classSym->declaring--;
12497 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12499 classSym->declaredStructSym = 1;
12500 if(classSym->__anon1.registered)
12501 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12502 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12504 struct Specifier * spec;
12506 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12508 if(spec->__anon1.__anon2.definitions)
12509 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12513 if(inCompiler && neededBy && (external || !classSym->imported))
12517 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12518 external->symbol = classSym;
12519 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12523 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12525 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12526 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12529 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12534 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)
12536 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12537 unsigned int found = 0;
12538 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12539 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12540 unsigned int freeType = 0;
12542 yylloc = member->loc;
12547 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12551 dataMember = *curMember;
12557 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12558 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12559 int _subMemberStackPos = 0;
12562 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12565 dataMember = thisMember;
12566 if(curMember && thisMember->memberAccess == 1)
12568 *curMember = thisMember;
12569 *curClass = thisMember->_class;
12570 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12571 *subMemberStackPos = _subMemberStackPos;
12577 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12578 if(method && method->type == 1)
12581 method = (((void *)0));
12586 struct Type * type = (((void *)0));
12590 if(!dataMember->dataType && dataMember->dataTypeString)
12592 struct Context * context = SetupTemplatesContext(_class);
12594 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12595 FinishTemplatesContext(context);
12597 type = dataMember->dataType;
12601 if(!method->dataType)
12602 ProcessMethodType(method);
12603 type = method->dataType;
12605 if(ident && ident->next)
12607 for(ident = ident->next; ident && type; ident = ident->next)
12609 if(type->kind == 8)
12611 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12613 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12615 type = dataMember->dataType;
12617 else if(type->kind == 9 || type->kind == 10)
12619 struct Type * memberType;
12621 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12623 if(!strcmp(memberType->name, ident->string))
12632 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12635 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12636 struct __ecereNameSpace__ecere__com__Class * sClass;
12638 for(sClass = _class; sClass; sClass = sClass->base)
12641 if(sClass->templateClass)
12642 sClass = sClass->templateClass;
12643 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12645 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12647 for(sClass = sClass->base; sClass; sClass = sClass->base)
12649 if(sClass->templateClass)
12650 sClass = sClass->templateClass;
12651 id += sClass->templateParams.count;
12662 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12664 if(arg.__anon1.__anon1.dataTypeString)
12666 unsigned int constant = type->constant;
12668 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12669 if(type->kind == 8 && constant)
12670 type->constant = 1;
12671 else if(type->kind == 13)
12673 struct Type * t = type->__anon1.type;
12675 while(t->kind == 13)
12676 t = t->__anon1.type;
12678 t->constant = constant;
12681 if(type && _class->templateClass)
12682 type->passAsTemplate = 1;
12689 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12691 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12692 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12693 int paramCount = 0;
12694 int lastParam = -1;
12695 char templateString[1024];
12696 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12698 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12699 for(cClass = expClass; cClass; cClass = cClass->base)
12703 if(cClass->templateClass)
12704 cClass = cClass->templateClass;
12705 for(param = cClass->templateParams.first; param; param = param->next)
12708 struct __ecereNameSpace__ecere__com__Class * sClass;
12709 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12711 for(sClass = cClass->base; sClass; sClass = sClass->base)
12713 if(sClass->templateClass)
12714 sClass = sClass->templateClass;
12715 id += sClass->templateParams.count;
12717 arg = expClass->templateArgs[id];
12718 for(sClass = _class; sClass; sClass = sClass->base)
12720 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12722 struct __ecereNameSpace__ecere__com__Class * nextClass;
12724 if(sClass->templateClass)
12725 sClass = sClass->templateClass;
12726 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12728 if(nextClass->templateClass)
12729 nextClass = nextClass->templateClass;
12730 p += nextClass->templateParams.count;
12732 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12734 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12736 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12738 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12739 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12746 char argument[256];
12748 argument[0] = '\0';
12749 switch(param->type)
12753 char expString[1024];
12754 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12755 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12756 struct Expression * exp;
12757 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12759 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12760 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12761 ProcessExpressionType(exp);
12762 ComputeExpression(exp);
12763 expString[0] = '\0';
12764 PrintExpression(exp, expString);
12765 strcat(argument, expString);
12766 FreeExpression(exp);
12771 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12776 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12777 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12784 strcat(templateString, ", ");
12785 if(lastParam != p - 1)
12787 strcat(templateString, param->name);
12788 strcat(templateString, " = ");
12790 strcat(templateString, argument);
12799 int len = strlen(templateString);
12801 if(templateString[len - 1] == '<')
12805 if(templateString[len - 1] == '>')
12806 templateString[len++] = ' ';
12807 templateString[len++] = '>';
12809 templateString[len++] = '\0';
12812 struct Context * context = SetupTemplatesContext(_class);
12816 type = ProcessTypeString(templateString, 0);
12818 FinishTemplatesContext(context);
12821 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12823 ProcessExpressionType(member->initializer->__anon1.exp);
12824 if(!member->initializer->__anon1.exp->expType)
12828 char expString[10240];
12830 expString[0] = '\0';
12831 PrintExpression(member->initializer->__anon1.exp, expString);
12832 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12833 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12836 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12838 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12841 else if(member->initializer)
12843 ProcessInitializer(member->initializer, type);
12850 if(_class && _class->type == 3)
12852 if(member->initializer)
12854 struct Type * type = MkClassType(_class->fullName);
12856 ProcessInitializer(member->initializer, type);
12862 if(member->initializer)
12864 ProcessInitializer(member->initializer, (((void *)0)));
12870 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12874 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12876 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12880 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12885 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12887 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12889 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)))
12891 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12893 if(_class->type == 4)
12895 struct __ecereNameSpace__ecere__sys__OldList converts =
12899 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12902 if(!_class->symbol)
12903 _class->symbol = FindClass(_class->fullName);
12904 type->__anon1._class = _class->symbol;
12905 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))
12907 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12908 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12912 struct __ecereNameSpace__ecere__com__Class * baseClass;
12914 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12916 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12918 for(value = e->values.first; value; value = value->next)
12920 if(!strcmp(value->name, string))
12925 FreeType(sourceExp->expType);
12926 sourceExp->isConstant = 1;
12927 sourceExp->expType = MkClassType(baseClass->fullName);
12928 if(inCompiler || inPreCompiler || inDebugger)
12930 char constant[256];
12932 FreeExpContents(sourceExp);
12933 sourceExp->type = 2;
12934 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12935 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12937 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12938 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12940 while(converts.first)
12942 struct Conversion * convert = converts.first;
12944 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12945 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12947 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12954 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12955 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12958 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)))
12959 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12964 void ComputeExpression(struct Expression * exp)
12970 struct Identifier * id = exp->__anon1.__anon1.identifier;
12972 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12974 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12976 if(c && c->type == 4)
12978 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12982 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12983 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
12985 for(value = e->values.first; value; value = value->next)
12987 if(!strcmp(value->name, id->string))
12992 const char * dts = c->dataTypeString;
12994 FreeExpContents(exp);
12996 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13005 ComputeInstantiation(exp);
13010 struct Expression * exp1, * exp2 = (((void *)0));
13011 struct Operand op1 =
13018 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
13021 struct Operand op2 =
13028 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
13032 if(exp->__anon1.op.exp2)
13034 struct Expression * e = exp->__anon1.op.exp2;
13036 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13038 if(e->type == 5 || e->type == 32 || e->type == 23)
13041 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13043 e = (*e->__anon1.list).last;
13046 if(exp->__anon1.op.op == 261 && e && e->expType)
13048 if(e->type == 3 && e->__anon1.__anon2.string)
13050 char * string = e->__anon1.__anon2.string;
13051 int len = strlen(string);
13052 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13054 len = UnescapeString(tmp, string + 1, len - 2);
13055 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13056 FreeExpContents(exp);
13058 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13062 struct Type * type = e->expType;
13065 FreeExpContents(exp);
13067 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13073 ComputeExpression(exp->__anon1.op.exp2);
13075 if(exp->__anon1.op.exp1)
13077 ComputeExpression(exp->__anon1.op.exp1);
13078 exp1 = exp->__anon1.op.exp1;
13079 exp2 = exp->__anon1.op.exp2;
13080 op1 = GetOperand(exp1);
13082 op1.type->refCount++;
13085 op2 = GetOperand(exp2);
13087 op2.type->refCount++;
13092 exp1 = exp->__anon1.op.exp2;
13093 op1 = GetOperand(exp1);
13095 op1.type->refCount++;
13097 CallOperator(exp, exp1, exp2, &op1, &op2);
13099 FreeType(op1.type);
13101 FreeType(op2.type);
13107 struct Expression * e, * n;
13109 for(e = (*exp->__anon1.list).first; e; e = n)
13114 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13115 struct Expression * prev = exp->prev;
13116 struct Expression * next = exp->next;
13118 ComputeExpression(e);
13119 FreeType(exp->expType);
13120 FreeType(exp->destType);
13124 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13125 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13136 struct Expression * memberExp = exp->__anon1.member.exp;
13137 struct Identifier * memberID = exp->__anon1.member.member;
13138 struct Type * type;
13140 ComputeExpression(exp->__anon1.member.exp);
13141 type = exp->__anon1.member.exp->expType;
13144 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)));
13145 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13146 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13147 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13149 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13150 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13154 struct Symbol * classSym;
13157 PrintTypeNoConst(type, string, 0, 1);
13158 classSym = FindClass(string);
13159 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13161 if(exp->__anon1.member.member)
13163 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13165 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13167 if(!prop && !member && _class && exp->__anon1.member.member)
13169 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13171 convertTo = _class;
13172 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13173 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13179 struct Type * type = prop->dataType;
13181 if(_class->type == 3)
13183 if(type->kind == 8)
13185 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13187 if(_class->type == 3)
13189 if(!_class->dataType)
13190 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13191 type = _class->dataType;
13199 float (* Get)(float) = (void *)prop->Get;
13201 GetFloat(exp->__anon1.member.exp, &value);
13202 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13209 double (* Get)(double);
13211 GetDouble(exp->__anon1.member.exp, &value);
13213 Get = (void *)prop->Set;
13215 Get = (void *)prop->Get;
13216 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13226 struct Expression * value = exp->__anon1.member.exp;
13227 struct Type * type;
13229 if(!prop->dataType)
13230 ProcessPropertyType(prop);
13231 type = prop->dataType;
13235 else if(_class->type == 1)
13241 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13243 if(propertyClass->type == 1 && value->type == 1)
13245 void (* Set)(void *, void *) = (void *)prop->Set;
13247 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13248 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13249 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13250 exp->__anon1.instance->loc = exp->loc;
13252 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13253 PopulateInstance(exp->__anon1.instance);
13260 void (* Set)(void *, int) = (void *)prop->Set;
13262 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13263 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13264 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13265 exp->__anon1.instance->loc = exp->loc;
13267 GetInt(value, &intValue);
13268 Set(exp->__anon1.instance->data, intValue);
13269 PopulateInstance(exp->__anon1.instance);
13274 long long intValue;
13275 void (* Set)(void *, long long) = (void *)prop->Set;
13277 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13278 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13279 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13280 exp->__anon1.instance->loc = exp->loc;
13282 GetInt64(value, &intValue);
13283 Set(exp->__anon1.instance->data, intValue);
13284 PopulateInstance(exp->__anon1.instance);
13290 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13292 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13293 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13294 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13295 exp->__anon1.instance->loc = exp->loc;
13297 GetIntPtr(value, &intValue);
13298 Set(exp->__anon1.instance->data, intValue);
13299 PopulateInstance(exp->__anon1.instance);
13305 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13307 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13308 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13309 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13310 exp->__anon1.instance->loc = exp->loc;
13312 GetIntSize(value, &intValue);
13313 Set(exp->__anon1.instance->data, intValue);
13314 PopulateInstance(exp->__anon1.instance);
13320 void (* Set)(void *, float) = (void *)prop->Set;
13322 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13323 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13324 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13325 exp->__anon1.instance->loc = exp->loc;
13327 GetFloat(value, &floatValue);
13328 Set(exp->__anon1.instance->data, floatValue);
13329 PopulateInstance(exp->__anon1.instance);
13334 double doubleValue;
13335 void (* Set)(void *, double) = (void *)prop->Set;
13337 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13338 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13339 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13340 exp->__anon1.instance->loc = exp->loc;
13342 GetDouble(value, &doubleValue);
13343 Set(exp->__anon1.instance->data, doubleValue);
13344 PopulateInstance(exp->__anon1.instance);
13349 else if(_class->type == 2)
13355 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13357 if(propertyClass->type == 1 && value->__anon1.instance->data)
13359 unsigned int (* Set)(void *) = (void *)prop->Set;
13360 unsigned int bits = Set(value->__anon1.instance->data);
13362 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13366 else if(_class->type == 2)
13368 unsigned int value;
13369 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13372 GetUInt(exp->__anon1.member.exp, &value);
13374 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13383 if(_class->type == 2)
13385 unsigned int value;
13387 GetUInt(exp->__anon1.member.exp, &value);
13392 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13394 if(_class->type == 1)
13396 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13398 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13399 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13400 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13401 exp->__anon1.instance->loc = exp->loc;
13403 Get(value, exp->__anon1.instance->data);
13404 PopulateInstance(exp->__anon1.instance);
13406 else if(_class->type == 2)
13408 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13409 uint64 bits = Get(value);
13411 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13418 else if(_class->type == 1)
13420 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13426 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13428 if(_class->type == 1 && value)
13430 void (* Get)(void *, void *) = (void *)prop->Get;
13432 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13433 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13434 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13435 exp->__anon1.instance->loc = exp->loc;
13437 Get(value, exp->__anon1.instance->data);
13438 PopulateInstance(exp->__anon1.instance);
13449 exp->isConstant = 0;
13458 FreeExpression(memberExp);
13459 FreeIdentifier(memberID);
13465 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13467 FreeExpContents(exp);
13468 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13475 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13477 if(classSym && classSym->__anon1.registered)
13479 if(classSym->__anon1.registered->fixed)
13481 FreeSpecifier(exp->__anon1._class);
13482 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13487 char className[1024];
13489 strcpy(className, "__ecereClass_");
13490 FullClassNameCat(className, classSym->string, 1);
13491 DeclareClass(curExternal, classSym, className);
13492 FreeExpContents(exp);
13494 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13495 exp->__anon1.member.member = MkIdentifier("structSize");
13502 struct Type * type;
13503 struct Expression * e = exp;
13505 if(exp->type == 11)
13507 if(exp->__anon1.cast.exp)
13508 ComputeExpression(exp->__anon1.cast.exp);
13509 e = exp->__anon1.cast.exp;
13511 if(e && exp->expType)
13513 type = exp->expType;
13514 if(type->kind == 8)
13516 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13518 if(_class && (_class->type == 3 || _class->type == 2))
13520 if(!_class->dataType)
13521 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13522 type = _class->dataType;
13531 char value = (char)0;
13533 if(GetChar(e, &value))
13535 FreeExpContents(exp);
13536 exp->__anon1.__anon1.constant = PrintChar(value);
13542 unsigned char value = (unsigned char)0;
13544 if(GetUChar(e, &value))
13546 FreeExpContents(exp);
13547 exp->__anon1.__anon1.constant = PrintUChar(value);
13555 short value = (short)0;
13557 if(GetShort(e, &value))
13559 FreeExpContents(exp);
13560 exp->__anon1.__anon1.constant = PrintShort(value);
13566 unsigned short value = (unsigned short)0;
13568 if(GetUShort(e, &value))
13570 FreeExpContents(exp);
13571 exp->__anon1.__anon1.constant = PrintUShort(value);
13581 if(GetInt(e, &value))
13583 FreeExpContents(exp);
13584 exp->__anon1.__anon1.constant = PrintInt(value);
13590 unsigned int value = 0;
13592 if(GetUInt(e, &value))
13594 FreeExpContents(exp);
13595 exp->__anon1.__anon1.constant = PrintUInt(value);
13603 long long value = 0;
13605 if(GetInt64(e, &value))
13607 FreeExpContents(exp);
13608 exp->__anon1.__anon1.constant = PrintInt64(value);
13616 if(GetUInt64(e, &value))
13618 FreeExpContents(exp);
13619 exp->__anon1.__anon1.constant = PrintUInt64(value);
13627 intptr_t value = 0;
13629 if(GetIntPtr(e, &value))
13631 FreeExpContents(exp);
13632 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13638 uintptr_t value = 0;
13640 if(GetUIntPtr(e, &value))
13642 FreeExpContents(exp);
13643 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13653 if(GetIntSize(e, &value))
13655 FreeExpContents(exp);
13656 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13664 if(GetUIntSize(e, &value))
13666 FreeExpContents(exp);
13667 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13676 if(GetFloat(e, &value))
13678 FreeExpContents(exp);
13679 exp->__anon1.__anon1.constant = PrintFloat(value);
13688 if(GetDouble(e, &value))
13690 FreeExpContents(exp);
13691 exp->__anon1.__anon1.constant = PrintDouble(value);
13702 struct Operand op1 =
13709 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
13712 struct Operand op2 =
13719 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
13722 struct Operand op3 =
13729 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
13733 if(exp->__anon1.cond.exp)
13734 ComputeExpression((*exp->__anon1.cond.exp).last);
13735 if(exp->__anon1.cond.elseExp)
13736 ComputeExpression(exp->__anon1.cond.elseExp);
13737 if(exp->__anon1.cond.cond)
13738 ComputeExpression(exp->__anon1.cond.cond);
13739 op1 = GetOperand(exp->__anon1.cond.cond);
13741 op1.type->refCount++;
13742 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13744 op2.type->refCount++;
13745 op3 = GetOperand(exp->__anon1.cond.elseExp);
13747 op3.type->refCount++;
13750 FreeExpContents(exp);
13751 op1.ops.Cond(exp, &op1, &op2, &op3);
13754 FreeType(op1.type);
13756 FreeType(op2.type);
13758 FreeType(op3.type);
13764 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13766 struct __ecereNameSpace__ecere__com__Instance * module;
13768 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))
13770 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))
13772 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))
13774 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)
13776 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13782 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13784 struct Type * source;
13785 struct Type * realDest = dest;
13786 struct Type * backupSourceExpType = (((void *)0));
13787 struct Expression * computedExp = sourceExp;
13790 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)
13792 computedExp = CopyExpression(sourceExp);
13793 ComputeExpression(computedExp);
13795 source = sourceExp->expType;
13796 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13798 if(computedExp != sourceExp)
13800 FreeExpression(computedExp);
13801 computedExp = sourceExp;
13806 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13808 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13810 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13812 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13814 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13816 if(sourceBase == destBase)
13818 if(computedExp != sourceExp)
13820 FreeExpression(computedExp);
13821 computedExp = sourceExp;
13830 struct __ecereNameSpace__ecere__sys__OldList * specs;
13831 unsigned int flag = 0;
13832 long long value = (((int)0x7fffffff));
13834 source->refCount++;
13835 if(computedExp->type == 2)
13837 if(source->isSigned)
13838 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13840 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13842 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13844 if(source->isSigned)
13845 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13847 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13849 if(computedExp != sourceExp)
13851 FreeExpression(computedExp);
13852 computedExp = sourceExp;
13854 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
13857 source = __extension__ ({
13858 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13860 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13863 if(dest->kind == 8)
13865 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13867 if(_class && _class->type == 3)
13869 if(source->kind != 8)
13871 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13872 struct Type * tempDest, * tempSource;
13874 for(; _class->base->type != 1000; _class = _class->base)
13877 tempDest = tempType;
13878 tempType->kind = 8;
13879 if(!_class->symbol)
13880 _class->symbol = FindClass(_class->fullName);
13881 tempType->__anon1._class = _class->symbol;
13882 tempType->truth = dest->truth;
13883 if(tempType->__anon1._class)
13884 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13885 backupSourceExpType = sourceExp->expType;
13886 if(dest->passAsTemplate)
13888 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13889 CopyTypeInto(sourceExp->expType, dest);
13890 sourceExp->expType->passAsTemplate = 0;
13894 sourceExp->expType = dest;
13898 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13901 if(_class && _class->type == 2 && source->kind != 8)
13903 if(!dest->__anon1._class->__anon1.registered->dataType)
13904 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13905 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13908 FreeType(sourceExp->expType);
13909 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13910 source->refCount++;
13913 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13915 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13916 struct Declarator * decl;
13919 ReadString(string, sourceExp->__anon1.__anon2.string);
13920 decl = SpecDeclFromString(string, specs, (((void *)0)));
13921 FreeExpContents(sourceExp);
13922 FreeType(sourceExp->expType);
13923 sourceExp->type = 24;
13924 sourceExp->__anon1._classExp.specifiers = specs;
13925 sourceExp->__anon1._classExp.decl = decl;
13926 sourceExp->expType = dest;
13930 if(backupSourceExpType)
13931 FreeType(backupSourceExpType);
13935 else if(source->kind == 8)
13937 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13939 if(_class && (_class->type == 3 || _class->type == 2))
13941 if(dest->kind != 8)
13943 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13944 struct Type * tempDest, * tempSource;
13946 if(!source->__anon1._class->__anon1.registered->dataType)
13947 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13948 for(; _class->base->type != 1000; _class = _class->base)
13951 tempSource = tempType;
13952 tempType->kind = 8;
13953 tempType->__anon1._class = FindClass(_class->fullName);
13954 tempType->truth = source->truth;
13955 tempType->classObjectType = source->classObjectType;
13956 if(tempType->__anon1._class)
13957 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13958 if(conversions && conversions->last)
13960 ((struct Conversion *)conversions->last)->resultType = dest;
13963 FreeType(sourceExp->expType);
13964 sourceExp->expType = MkClassType(_class->fullName);
13965 sourceExp->expType->truth = source->truth;
13966 sourceExp->expType->classObjectType = source->classObjectType;
13967 if(!sourceExp->destType)
13969 FreeType(sourceExp->destType);
13970 sourceExp->destType = sourceExp->expType;
13971 if(sourceExp->expType)
13972 sourceExp->expType->refCount++;
13974 if(!_class->dataType)
13975 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13977 dest = MkClassType(source->__anon1._class->string);
13978 dest->truth = source->truth;
13979 dest->classObjectType = source->classObjectType;
13981 source = _class->dataType;
13982 source->refCount++;
13983 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13989 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13996 if(dest->kind == 8)
13998 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13999 unsigned int fittingValue = 0;
14001 if(_class && _class->type == 4)
14003 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14004 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14006 if(c && value >= 0 && value <= c->largest)
14009 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14011 if(_class->type == 0 || _class->type == 5)
14013 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14015 *newExp = *sourceExp;
14016 if(sourceExp->destType)
14017 sourceExp->destType->refCount++;
14018 if(sourceExp->expType)
14019 sourceExp->expType->refCount++;
14020 sourceExp->type = 11;
14021 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14022 sourceExp->__anon1.cast.exp = newExp;
14023 FreeType(sourceExp->expType);
14024 sourceExp->expType = (((void *)0));
14025 ProcessExpressionType(sourceExp);
14028 FreeType(sourceExp->expType);
14029 sourceExp->expType = dest;
14034 if(backupSourceExpType)
14035 FreeType(backupSourceExpType);
14038 if(!_class->dataType)
14039 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14041 dest = _class->dataType;
14044 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))
14046 specs = MkListOne(MkSpecifier(DOUBLE));
14048 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))
14050 specs = MkListOne(MkSpecifier(FLOAT));
14052 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))
14055 if(!dest->isSigned)
14056 ListAdd(specs, MkSpecifier(UNSIGNED));
14057 ListAdd(specs, MkSpecifier(INT64));
14059 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14062 if(!dest->isSigned)
14063 ListAdd(specs, MkSpecifier(UNSIGNED));
14064 ListAdd(specs, MkSpecifier(INT));
14066 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14069 if(!dest->isSigned)
14070 ListAdd(specs, MkSpecifier(UNSIGNED));
14071 ListAdd(specs, MkSpecifier(SHORT));
14073 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14076 if(!dest->isSigned)
14077 ListAdd(specs, MkSpecifier(UNSIGNED));
14078 ListAdd(specs, MkSpecifier(CHAR));
14084 if(backupSourceExpType)
14086 if(sourceExp->expType)
14087 FreeType(sourceExp->expType);
14088 sourceExp->expType = backupSourceExpType;
14093 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))
14095 specs = MkListOne(MkSpecifier(DOUBLE));
14097 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))
14099 specs = MkListOne(MkSpecifier(FLOAT));
14101 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14104 ListAdd(specs, MkSpecifier(BOOL));
14106 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)))
14109 if(!dest->isSigned)
14110 ListAdd(specs, MkSpecifier(UNSIGNED));
14111 ListAdd(specs, MkSpecifier(CHAR));
14113 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)))))
14116 if(!dest->isSigned)
14117 ListAdd(specs, MkSpecifier(UNSIGNED));
14118 ListAdd(specs, MkSpecifier(SHORT));
14120 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14123 if(!dest->isSigned)
14124 ListAdd(specs, MkSpecifier(UNSIGNED));
14125 ListAdd(specs, MkSpecifier(INT));
14127 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14130 if(!dest->isSigned)
14131 ListAdd(specs, MkSpecifier(UNSIGNED));
14132 ListAdd(specs, MkSpecifier(INT64));
14134 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14136 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14142 if(backupSourceExpType)
14144 if(sourceExp->expType)
14145 FreeType(sourceExp->expType);
14146 sourceExp->expType = backupSourceExpType;
14150 if(!flag && !sourceExp->opDestType)
14152 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14154 *newExp = *sourceExp;
14155 newExp->prev = (((void *)0));
14156 newExp->next = (((void *)0));
14157 if(sourceExp->destType)
14158 sourceExp->destType->refCount++;
14159 if(sourceExp->expType)
14160 sourceExp->expType->refCount++;
14161 sourceExp->type = 11;
14162 if(realDest->kind == 8)
14164 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14165 FreeList(specs, (void *)(FreeSpecifier));
14168 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14169 if(newExp->type == 4)
14171 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14174 sourceExp->__anon1.cast.exp = newExp;
14175 FreeType(sourceExp->expType);
14176 sourceExp->expType = (((void *)0));
14177 ProcessExpressionType(sourceExp);
14180 FreeList(specs, (void *)(FreeSpecifier));
14183 if(backupSourceExpType)
14184 FreeType(backupSourceExpType);
14189 if(computedExp != sourceExp)
14191 FreeExpression(computedExp);
14192 computedExp = sourceExp;
14194 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14195 sourceExp = (*sourceExp->__anon1.list).last;
14196 if(sourceExp->type == 0)
14198 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14200 if(dest->kind == 8)
14202 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14204 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14205 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14209 for(; _class && _class->type == 4; _class = _class->base)
14211 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14212 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14214 for(value = e->values.first; value; value = value->next)
14216 if(!strcmp(value->name, id->string))
14221 FreeType(sourceExp->expType);
14222 sourceExp->isConstant = 1;
14223 sourceExp->expType = MkClassType(_class->fullName);
14224 if(inCompiler || inPreCompiler || inDebugger)
14226 FreeExpContents(sourceExp);
14227 sourceExp->type = 2;
14228 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14229 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14231 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14240 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14251 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14253 unsigned int result = 1;
14257 struct __ecereNameSpace__ecere__sys__OldList converts =
14261 struct Conversion * convert;
14263 if(destType->kind == 0)
14265 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14269 for(convert = converts.first; convert; convert = convert->next)
14271 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14275 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14276 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14279 newExp->prev = (((void *)0));
14280 newExp->next = (((void *)0));
14281 newExp->destType = (((void *)0));
14285 exp->addedThis = 1;
14286 exp->__anon1.member.exp = newExp;
14287 FreeType(exp->__anon1.member.exp->expType);
14288 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14289 exp->__anon1.member.exp->expType->classObjectType = objectType;
14290 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14291 exp->__anon1.member.memberType = 1;
14292 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14295 exp->expType->refCount++;
14296 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14302 exp->addedThis = 1;
14303 exp->__anon1.member.exp = newExp;
14304 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)
14306 newExp->byReference = 1;
14308 FreeType(exp->__anon1.member.exp->expType);
14309 exp->__anon1.member.exp->expType = (((void *)0));
14310 if(convert->convert->dataType)
14312 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14313 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14314 exp->__anon1.member.exp->expType->refCount = 1;
14315 exp->__anon1.member.exp->expType->classObjectType = objectType;
14316 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14318 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14319 exp->__anon1.member.memberType = 4;
14320 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14322 if(convert->resultType)
14323 convert->resultType->refCount++;
14329 FreeType(exp->expType);
14332 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14333 if(exp->destType->casted)
14336 exp->expType->refCount++;
14340 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14341 if(exp->destType->casted)
14343 if(convert->resultType)
14344 convert->resultType->refCount++;
14348 if(exp->isConstant && inCompiler)
14349 ComputeExpression(exp);
14350 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14352 if(!result && exp->expType && converts.count)
14354 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14356 if(!result && exp->expType && exp->destType)
14358 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))
14365 static void ProcessFunction(struct FunctionDefinition * function);
14367 void ProcessInstantiationType(struct Instantiation * inst)
14369 yylloc = inst->loc;
14372 struct MembersInit * members;
14373 struct Symbol * classSym;
14374 struct __ecereNameSpace__ecere__com__Class * _class;
14376 classSym = inst->_class->__anon1.__anon1.symbol;
14377 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14378 if(!_class || _class->type != 5)
14379 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14380 afterExternal = afterExternal ? afterExternal : curExternal;
14382 ProcessExpressionType(inst->exp);
14383 inst->isConstant = 1;
14386 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14387 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14388 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14389 int subMemberStackPos = 0;
14391 for(members = (*inst->members).first; members; members = members->next)
14393 switch(members->type)
14398 static unsigned int instMethodID = 0;
14399 struct External * external = curExternal;
14400 struct Context * context = curContext;
14401 struct Declarator * declarator = members->__anon1.function->declarator;
14402 struct Identifier * nameID = GetDeclId(declarator);
14403 char * unmangled = nameID ? nameID->string : (((void *)0));
14404 struct Expression * exp;
14405 struct External * createdExternal = (((void *)0));
14411 strcpy(name, "__ecereInstMeth_");
14412 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14414 strcat(name, nameID->string);
14416 sprintf(number, "_%08d", instMethodID++);
14417 strcat(name, number);
14418 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14422 struct Symbol * symbol = declarator->symbol;
14423 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14425 if(method && method->type == 1)
14427 symbol->__anon1.method = method;
14428 ProcessMethodType(method);
14429 if(!symbol->type->__anon1.__anon2.thisClass)
14431 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14433 if(!currentClass->symbol)
14434 currentClass->symbol = FindClass(currentClass->fullName);
14435 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14439 if(!_class->symbol)
14440 _class->symbol = FindClass(_class->fullName);
14441 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14444 DeclareType(curExternal, symbol->type, 1, 1);
14448 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14451 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14454 FreeSpecifier(nameID->_class);
14455 nameID->_class = (((void *)0));
14457 curExternal = createdExternal;
14460 if(createdExternal->__anon1.function)
14461 ProcessFunction(createdExternal->__anon1.function);
14463 else if(declarator)
14465 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14466 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14468 curExternal = external;
14469 curContext = context;
14472 FreeClassFunction(members->__anon1.function);
14473 exp = QMkExpId(name);
14475 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14476 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14482 if(members->__anon1.dataMembers && classSym)
14484 struct MemberInit * member;
14485 struct Location oldyyloc = yylloc;
14487 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14489 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14490 if(member->initializer && !member->initializer->isConstant)
14491 inst->isConstant = 0;
14503 static void ProcessStatement(struct Statement * stmt)
14505 yylloc = stmt->loc;
14509 ProcessStatement(stmt->__anon1.labeled.stmt);
14512 if(stmt->__anon1.caseStmt.exp)
14514 FreeType(stmt->__anon1.caseStmt.exp->destType);
14515 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14517 curSwitchType->refCount++;
14518 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14519 ComputeExpression(stmt->__anon1.caseStmt.exp);
14521 if(stmt->__anon1.caseStmt.stmt)
14522 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14526 if(stmt->__anon1.compound.context)
14528 struct Declaration * decl;
14529 struct Statement * s;
14530 struct Statement * prevCompound = curCompound;
14531 struct Context * prevContext = curContext;
14533 if(!stmt->__anon1.compound.isSwitch)
14534 curCompound = stmt;
14535 curContext = stmt->__anon1.compound.context;
14536 if(stmt->__anon1.compound.declarations)
14538 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14539 ProcessDeclaration(decl);
14541 if(stmt->__anon1.compound.statements)
14543 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14544 ProcessStatement(s);
14546 curContext = prevContext;
14547 curCompound = prevCompound;
14553 struct Expression * exp;
14555 if(stmt->__anon1.expressions)
14557 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14558 ProcessExpressionType(exp);
14564 struct Expression * exp;
14566 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14567 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14568 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14569 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14571 ProcessExpressionType(exp);
14573 if(stmt->__anon1.ifStmt.stmt)
14574 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14575 if(stmt->__anon1.ifStmt.elseStmt)
14576 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14581 struct Type * oldSwitchType = curSwitchType;
14583 if(stmt->__anon1.switchStmt.exp)
14585 struct Expression * exp;
14587 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14591 ProcessExpressionType(exp);
14594 curSwitchType = exp->expType;
14597 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14598 curSwitchType = oldSwitchType;
14603 if(stmt->__anon1.whileStmt.exp)
14605 struct Expression * exp;
14607 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14608 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14609 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14610 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14612 ProcessExpressionType(exp);
14615 if(stmt->__anon1.whileStmt.stmt)
14616 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14621 if(stmt->__anon1.doWhile.exp)
14623 struct Expression * exp;
14625 if((*stmt->__anon1.doWhile.exp).last)
14627 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14628 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14629 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14631 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14633 ProcessExpressionType(exp);
14636 if(stmt->__anon1.doWhile.stmt)
14637 ProcessStatement(stmt->__anon1.doWhile.stmt);
14642 struct Expression * exp;
14644 if(stmt->__anon1.forStmt.init)
14645 ProcessStatement(stmt->__anon1.forStmt.init);
14646 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14648 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14649 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14650 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14652 if(stmt->__anon1.forStmt.check)
14653 ProcessStatement(stmt->__anon1.forStmt.check);
14654 if(stmt->__anon1.forStmt.increment)
14656 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14657 ProcessExpressionType(exp);
14659 if(stmt->__anon1.forStmt.stmt)
14660 ProcessStatement(stmt->__anon1.forStmt.stmt);
14665 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14666 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14667 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14668 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14669 char iteratorType[1024];
14670 struct Type * source;
14671 struct Expression * e;
14672 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));
14673 struct Expression * arrayExp;
14674 const char * typeString = (((void *)0));
14675 int builtinCount = 0;
14677 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14681 FreeType(e->destType);
14682 e->destType = ProcessTypeString("Container", 0);
14684 if(!isBuiltin || e->next)
14685 ProcessExpressionType(e);
14687 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
14688 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)))
14690 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
14691 struct Symbol * symbol;
14692 struct Expression * expIt = (((void *)0));
14693 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
14694 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
14695 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
14696 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
14701 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
14702 stmt->__anon1.compound.context->parent = curContext;
14703 curContext = stmt->__anon1.compound.context;
14705 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
14707 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
14709 isCustomAVLTree = 1;
14710 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
14713 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
14715 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
14717 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
14720 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
14722 if(inCompiler && isArray)
14724 struct Declarator * decl;
14725 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14727 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
14728 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
14729 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
14733 struct Type * type = (((void *)0));
14734 char typeStringBuf[1024];
14736 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
14737 if(((struct Expression *)(*exp).last)->type == 11)
14739 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
14742 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
14744 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)
14746 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
14748 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
14750 else if(arrayExp->__anon1.list)
14752 struct Expression * e;
14754 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
14756 ProcessExpressionType(e);
14766 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
14770 e->expType = (((void *)0));
14771 e = (*arrayExp->__anon1.list).first;
14772 ProcessExpressionType(e);
14775 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
14777 FreeType(e->expType);
14778 e->expType = (((void *)0));
14780 type = (((void *)0));
14788 FreeType(e->expType);
14789 e->expType = (((void *)0));
14795 typeStringBuf[0] = '\0';
14796 PrintType(type, typeStringBuf, 0, 1);
14797 typeString = typeStringBuf;
14805 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
14806 struct Declarator * decl;
14807 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14809 if(arrayExp->__anon1.list)
14811 struct Expression * e;
14813 builtinCount = (*arrayExp->__anon1.list).count;
14814 type = ProcessTypeString(typeString, 0);
14815 while((e = (*arrayExp->__anon1.list).first))
14817 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
14818 e->destType = type;
14820 ProcessExpressionType(e);
14822 ListAdd(initializers, MkInitializerAssignment(e));
14825 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
14827 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
14828 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
14829 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
14830 FreeList(exp, (void *)(FreeExpression));
14832 else if(arrayExp->__anon1.list)
14834 struct Expression * e;
14836 type = ProcessTypeString(typeString, 0);
14837 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
14839 e->destType = type;
14841 ProcessExpressionType(e);
14848 arrayExp->expType = ProcessTypeString("Container", 0);
14849 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
14852 else if(inCompiler && isLinkList && !isList)
14854 struct Declarator * decl;
14855 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14857 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
14858 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
14859 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
14861 else if(inCompiler && _class->templateArgs)
14864 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
14866 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
14867 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)))))))));
14871 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
14874 switch(block->type)
14877 if(block->__anon1.compound.context)
14878 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14881 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
14882 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14883 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
14884 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14887 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
14888 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14891 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
14892 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14895 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
14896 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14899 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
14900 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14903 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
14904 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14910 block = MkIfStmt(filter, block, (((void *)0)));
14914 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));
14915 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14916 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14917 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14923 sprintf(count, "%d", builtinCount);
14924 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));
14925 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14926 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14927 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14929 else if(isLinkList && !isList)
14931 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
14932 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
14934 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
14936 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));
14940 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14941 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
14943 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));
14945 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14946 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14947 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14951 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
14953 ProcessExpressionType(expIt);
14954 if((*stmt->__anon1.compound.declarations).first)
14955 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
14957 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
14958 ProcessStatement(stmt);
14961 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
14963 curContext = stmt->__anon1.compound.context->parent;
14968 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
14980 struct Expression * exp;
14982 if(stmt->__anon1.expressions)
14984 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14988 if(curFunction && !curFunction->type)
14989 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
14990 FreeType(exp->destType);
14991 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
14993 exp->destType->refCount++;
14995 ProcessExpressionType(exp);
15002 ProcessDeclaration(stmt->__anon1.decl);
15007 struct AsmField * field;
15009 if(stmt->__anon1.asmStmt.inputFields)
15011 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15012 if(field->expression)
15013 ProcessExpressionType(field->expression);
15015 if(stmt->__anon1.asmStmt.outputFields)
15017 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15018 if(field->expression)
15019 ProcessExpressionType(field->expression);
15021 if(stmt->__anon1.asmStmt.clobberedFields)
15023 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15025 if(field->expression)
15026 ProcessExpressionType(field->expression);
15033 struct PropertyWatch * propWatch;
15034 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15035 struct Expression * object = stmt->__anon1._watch.object;
15036 struct Expression * watcher = stmt->__anon1._watch.watcher;
15039 ProcessExpressionType(watcher);
15041 ProcessExpressionType(object);
15044 if(watcher || thisClass)
15046 struct External * external = curExternal;
15047 struct Context * context = curContext;
15050 stmt->__anon1.expressions = MkList();
15051 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15053 struct ClassFunction * func;
15054 char watcherName[1024];
15055 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;
15056 struct External * createdExternal;
15058 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15059 if(propWatch->deleteWatch)
15060 strcat(watcherName, "_delete");
15063 struct Identifier * propID;
15065 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15067 strcat(watcherName, "_");
15068 strcat(watcherName, propID->string);
15071 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15073 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)));
15074 ProcessClassFunctionBody(func, propWatch->compound);
15075 propWatch->compound = (((void *)0));
15076 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15077 curExternal = createdExternal;
15078 ProcessFunction(createdExternal->__anon1.function);
15079 if(propWatch->deleteWatch)
15081 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15083 ListAdd(args, CopyExpression(object));
15084 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15085 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15086 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15090 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15091 struct Identifier * propID;
15093 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15095 char propName[1024];
15096 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15100 char getName[1024], setName[1024];
15101 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15103 DeclareProperty(createdExternal, prop, setName, getName);
15104 strcpy(propName, "__ecereProp_");
15105 FullClassNameCat(propName, prop->_class->fullName, 0);
15106 strcat(propName, "_");
15107 FullClassNameCat(propName, prop->name, 1);
15108 ListAdd(args, CopyExpression(object));
15109 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15110 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15111 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15112 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15113 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15116 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15121 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15123 curExternal = external;
15124 curContext = context;
15126 FreeExpression(watcher);
15128 FreeExpression(object);
15129 FreeList(watches, (void *)(FreePropertyWatch));
15132 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15136 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15138 ProcessStatement(propWatch->compound);
15145 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15146 struct Expression * object = stmt->__anon1._watch.object;
15147 struct __ecereNameSpace__ecere__com__Class * _class;
15150 ProcessExpressionType(object);
15153 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15156 struct Identifier * propID;
15159 stmt->__anon1.expressions = MkList();
15160 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15162 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15169 for(propID = (*watches).first; propID; propID = propID->next)
15171 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15175 CreateFireWatcher(prop, object, stmt);
15178 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15183 struct __ecereNameSpace__ecere__com__Property * prop;
15184 struct __ecereNameSpace__ecere__com__Class * base;
15186 for(base = _class; base; base = base->base)
15188 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15190 if(prop->isProperty && prop->isWatchable)
15192 CreateFireWatcher(prop, object, stmt);
15198 FreeExpression(object);
15199 FreeList(watches, (void *)(FreeIdentifier));
15202 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15208 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15209 struct Expression * object = stmt->__anon1._watch.object;
15210 struct Expression * watcher = stmt->__anon1._watch.watcher;
15211 struct __ecereNameSpace__ecere__com__Class * _class;
15214 ProcessExpressionType(object);
15216 ProcessExpressionType(watcher);
15219 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15220 if(watcher || thisClass)
15224 struct Identifier * propID;
15227 stmt->__anon1.expressions = MkList();
15230 struct __ecereNameSpace__ecere__sys__OldList * args;
15233 ListAdd(args, CopyExpression(object));
15234 ListAdd(args, MkExpConstant("0"));
15235 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15236 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15240 for(propID = (*watches).first; propID; propID = propID->next)
15242 char propName[1024];
15243 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15247 char getName[1024], setName[1024];
15248 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15250 DeclareProperty(curExternal, prop, setName, getName);
15251 strcpy(propName, "__ecereProp_");
15252 FullClassNameCat(propName, prop->_class->fullName, 0);
15253 strcat(propName, "_");
15254 FullClassNameCat(propName, prop->name, 1);
15255 ListAdd(args, CopyExpression(object));
15256 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15257 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15258 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15261 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15265 FreeExpression(object);
15267 FreeExpression(watcher);
15268 FreeList(watches, (void *)(FreeIdentifier));
15271 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15274 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15281 void ProcessExpressionType(struct Expression * exp)
15283 unsigned int unresolved = 0;
15284 struct Location oldyylloc = yylloc;
15285 unsigned int notByReference = 0;
15287 if(!exp || exp->expType)
15294 struct Identifier * id = exp->__anon1.__anon1.identifier;
15296 if(!id || !topContext)
15298 if(id->_class && id->_class->__anon1.__anon1.name)
15300 id->classSym = id->_class->__anon1.__anon1.symbol;
15302 if(!strcmp(id->string, "__runtimePlatform"))
15304 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15307 else if(strstr(id->string, "__ecereClass") == id->string)
15309 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15312 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15314 ReplaceClassMembers(exp, thisClass);
15317 ProcessExpressionType(exp);
15320 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15325 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15329 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15335 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15338 ProcessExpressionType(exp);
15342 else if(currentClass && !id->_class)
15344 if(ResolveIdWithClass(exp, currentClass, 1))
15347 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15352 struct Type * type = symbol->type;
15353 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15355 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15357 struct Context * context = SetupTemplatesContext(_class);
15359 type = ReplaceThisClassType(_class);
15360 FinishTemplatesContext(context);
15362 type->refCount = 0;
15364 FreeSpecifier(id->_class);
15365 id->_class = (((void *)0));
15366 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15367 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15368 id->classSym = (((void *)0));
15369 exp->expType = type;
15372 if(type && (type->kind == 15))
15373 exp->isConstant = 1;
15374 if(symbol->isParam || !strcmp(id->string, "this"))
15376 if(_class && _class->type == 1 && !type->declaredWithStruct)
15377 exp->byReference = 1;
15379 if(symbol->isIterator)
15381 if(symbol->isIterator == 3)
15384 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15385 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15386 exp->expType = (((void *)0));
15387 ProcessExpressionType(exp);
15389 else if(symbol->isIterator != 4)
15392 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15393 exp->__anon1.member.exp->expType = exp->expType;
15394 exp->__anon1.member.member = MkIdentifier("data");
15395 exp->expType = (((void *)0));
15396 ProcessExpressionType(exp);
15403 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15405 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15409 strcpy(name, thisNameSpace);
15410 strcat(name, "::");
15411 strcat(name, id->string);
15412 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15415 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15420 for(c = 0; c < definedExpStackPos; c++)
15421 if(definedExpStack[c] == definedExp)
15423 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15425 struct Location backupYylloc = yylloc;
15426 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15428 definedExpStack[definedExpStackPos++] = definedExp;
15429 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15430 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15431 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15433 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15434 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15435 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15436 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15438 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15439 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15441 parsedExpression = (((void *)0));
15443 expression_yyparse();
15444 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15446 fileInput = backInput;
15447 yylloc = backupYylloc;
15448 if(parsedExpression)
15450 FreeIdentifier(id);
15452 exp->__anon1.list = MkListOne(parsedExpression);
15453 ApplyLocation(parsedExpression, &yylloc);
15454 ProcessExpressionType(exp);
15455 definedExpStackPos--;
15458 definedExpStackPos--;
15464 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15470 struct GlobalData * data = (((void *)0));
15472 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15476 strcpy(name, thisNameSpace);
15477 strcat(name, "::");
15478 strcat(name, id->string);
15479 data = FindGlobalData(name);
15482 data = FindGlobalData(id->string);
15485 DeclareGlobalData(curExternal, data);
15486 exp->expType = data->dataType;
15488 data->dataType->refCount++;
15489 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15490 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15491 FreeSpecifier(id->_class);
15492 id->_class = (((void *)0));
15497 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15499 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15503 strcpy(name, thisNameSpace);
15504 strcat(name, "::");
15505 strcat(name, id->string);
15506 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15509 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15514 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15515 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15517 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15518 strcpy(name, "__ecereFunction_");
15519 FullClassNameCat(name, id->string, 0);
15520 if(DeclareFunction(curExternal, function, name))
15522 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15523 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15525 exp->expType = function->dataType;
15526 if(function->dataType)
15527 function->dataType->refCount++;
15528 FreeSpecifier(id->_class);
15529 id->_class = (((void *)0));
15541 if(!exp->__anon1.instance->_class)
15543 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15545 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15548 ProcessInstantiationType(exp->__anon1.instance);
15549 exp->isConstant = exp->__anon1.instance->isConstant;
15550 if(exp->__anon1.instance->_class)
15552 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15560 char * constant = exp->__anon1.__anon1.constant;
15561 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15563 exp->expType = type;
15564 if(constant[0] == '\'')
15566 if((int)((unsigned char *)constant)[1] > 127)
15569 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15573 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15574 exp->__anon1.__anon1.constant = PrintUInt(ch);
15576 type->__anon1._class = FindClass("unichar");
15577 type->isSigned = 0;
15582 type->isSigned = 1;
15587 char * dot = strchr(constant, '.');
15588 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15593 exponent = strchr(constant, 'p');
15595 exponent = strchr(constant, 'P');
15599 exponent = strchr(constant, 'e');
15601 exponent = strchr(constant, 'E');
15603 if(dot || exponent)
15605 if(strchr(constant, 'f') || strchr(constant, 'F'))
15609 type->isSigned = 1;
15613 unsigned int isSigned = constant[0] == '-';
15614 char * endP = (((void *)0));
15615 long long i64 = strtoll(constant, &endP, 0);
15616 uint64 ui64 = strtoull(constant, &endP, 0);
15617 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
15621 if(i64 < (((int)0x80000000)))
15626 if(ui64 > (((int)0x7fffffff)))
15628 if(ui64 > (0xffffffff))
15631 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
15635 else if(constant[0] != '0' || !constant[1])
15638 type->kind = is64Bit ? 4 : 3;
15639 type->isSigned = isSigned;
15642 exp->isConstant = 1;
15643 if(exp->destType && exp->destType->kind == 7)
15645 else if(exp->destType && exp->destType->kind == 6)
15647 else if(exp->destType && exp->destType->kind == 4)
15654 exp->isConstant = 1;
15655 exp->expType = __extension__ ({
15656 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15658 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
15659 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15661 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
15662 }), __ecereInstance2;
15668 ProcessExpressionType(exp->__anon1._new.size);
15669 exp->expType = __extension__ ({
15670 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15672 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
15674 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
15678 ProcessExpressionType(exp->__anon1._renew.size);
15679 ProcessExpressionType(exp->__anon1._renew.exp);
15680 exp->expType = __extension__ ({
15681 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15683 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
15685 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
15689 unsigned int assign = 0, boolResult = 0, boolOps = 0;
15690 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
15691 unsigned int useDestType = 0, useSideType = 0;
15692 struct Location oldyylloc = yylloc;
15693 unsigned int useSideUnit = 0;
15694 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
15695 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15697 switch(exp->__anon1.op.op)
15751 if(exp->__anon1.op.exp1)
15758 if(exp->__anon1.op.op == '&')
15760 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
15762 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
15763 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15765 if(symbol && symbol->isIterator == 2)
15768 exp->__anon1.member.exp = exp->__anon1.op.exp2;
15769 exp->__anon1.member.member = MkIdentifier("key");
15770 exp->expType = (((void *)0));
15771 exp->__anon1.op.exp2->expType = symbol->type;
15772 symbol->type->refCount++;
15773 ProcessExpressionType(exp);
15779 if(exp->__anon1.op.exp1)
15781 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
15783 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
15785 if(exp->__anon1.op.exp1->destType)
15786 FreeType(exp->__anon1.op.exp1->destType);
15787 exp->__anon1.op.exp1->destType = exp->destType;
15788 exp->__anon1.op.exp1->opDestType = 1;
15790 exp->destType->refCount++;
15794 if(exp->__anon1.op.exp1->destType)
15795 FreeType(exp->__anon1.op.exp1->destType);
15796 exp->__anon1.op.exp1->destType = dummy;
15799 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
15800 exp->__anon1.op.exp1->destType->count++;
15801 ProcessExpressionType(exp->__anon1.op.exp1);
15802 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
15803 exp->__anon1.op.exp1->destType->count--;
15804 exp->__anon1.op.exp1->opDestType = 0;
15805 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)
15807 exp->__anon1.op.exp2 = MkExpConstant("1");
15808 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
15811 if(exp->__anon1.op.exp1->destType == dummy)
15814 exp->__anon1.op.exp1->destType = (((void *)0));
15816 type1 = exp->__anon1.op.exp1->expType;
15818 if(exp->__anon1.op.exp2)
15820 char expString[10240];
15822 expString[0] = '\0';
15823 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
15825 if(exp->__anon1.op.exp1)
15827 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
15828 if(exp->__anon1.op.exp1->expType)
15829 exp->__anon1.op.exp1->expType->refCount++;
15833 exp->__anon1.op.exp2->destType = exp->destType;
15834 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
15835 exp->__anon1.op.exp2->opDestType = 1;
15837 exp->destType->refCount++;
15841 exp->expType = type1;
15846 PrintExpression(exp->__anon1.op.exp2, expString);
15847 if(type1 && type1->kind == 13)
15849 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)
15850 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
15851 else if(exp->__anon1.op.op == '=')
15853 if(exp->__anon1.op.exp2->destType)
15854 FreeType(exp->__anon1.op.exp2->destType);
15855 exp->__anon1.op.exp2->destType = type1;
15862 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)
15866 if(exp->__anon1.op.exp2->destType)
15867 FreeType(exp->__anon1.op.exp2->destType);
15868 exp->__anon1.op.exp2->destType = type1;
15875 exp->expType = type1;
15877 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
15879 if(exp->__anon1.op.exp2->destType)
15880 FreeType(exp->__anon1.op.exp2->destType);
15881 exp->__anon1.op.exp2->destType = exp->destType;
15882 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
15883 exp->__anon1.op.exp2->opDestType = 1;
15885 exp->destType->refCount++;
15889 if(exp->__anon1.op.exp2->destType)
15890 FreeType(exp->__anon1.op.exp2->destType);
15891 exp->__anon1.op.exp2->destType = dummy;
15894 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))
15896 FreeType(exp->__anon1.op.exp2->destType);
15897 exp->__anon1.op.exp2->destType = type1;
15900 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
15901 exp->__anon1.op.exp2->destType->count++;
15902 if(exp->__anon1.op.op == SIZEOF)
15904 struct Expression * e = exp->__anon1.op.exp2;
15906 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
15908 if(e->type == 5 || e->type == 32 || e->type == 23)
15911 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
15913 e = (*e->__anon1.list).last;
15916 if(e->type == 11 && e->__anon1.cast.exp)
15917 e->__anon1.cast.exp->needCast = 1;
15919 ProcessExpressionType(exp->__anon1.op.exp2);
15920 exp->__anon1.op.exp2->opDestType = 0;
15921 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
15922 exp->__anon1.op.exp2->destType->count--;
15923 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
15925 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)
15927 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
15928 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
15930 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)))
15932 if(exp->__anon1.op.op == ADD_ASSIGN)
15933 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
15935 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))
15937 if(exp->__anon1.op.op == ADD_ASSIGN)
15938 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
15940 else if(inCompiler)
15942 char type1String[1024];
15943 char type2String[1024];
15945 type1String[0] = '\0';
15946 type2String[0] = '\0';
15947 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
15948 PrintType(type1, type2String, 0, 1);
15949 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15950 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
15953 if(exp->__anon1.op.exp2->destType == dummy)
15956 exp->__anon1.op.exp2->destType = (((void *)0));
15958 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
15960 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15961 type2->refCount = 1;
15962 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
15963 type2->isSigned = 1;
15965 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))
15967 type2 = __extension__ ({
15968 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15970 __ecereInstance1->kind = 3, __ecereInstance1;
15972 type2->refCount = 1;
15973 type2->isSigned = 1;
15977 type2 = exp->__anon1.op.exp2->expType;
15983 if(exp->__anon1.op.op == SIZEOF)
15985 exp->expType = __extension__ ({
15986 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15988 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
15990 exp->isConstant = 1;
15992 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
15994 exp->expType = Dereference(type2);
15995 if(type2 && type2->kind == 8)
15996 notByReference = 1;
15998 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
15999 exp->expType = Reference(type2);
16004 if(exp->__anon1.op.exp1)
16006 if(exp->__anon1.op.exp1->destType)
16007 FreeType(exp->__anon1.op.exp1->destType);
16008 exp->__anon1.op.exp1->destType = MkClassType("bool");
16009 exp->__anon1.op.exp1->destType->truth = 1;
16010 if(!exp->__anon1.op.exp1->expType)
16011 ProcessExpressionType(exp->__anon1.op.exp1);
16013 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16014 FreeType(exp->__anon1.op.exp1->expType);
16015 exp->__anon1.op.exp1->expType = MkClassType("bool");
16016 exp->__anon1.op.exp1->expType->truth = 1;
16018 if(exp->__anon1.op.exp2)
16020 if(exp->__anon1.op.exp2->destType)
16021 FreeType(exp->__anon1.op.exp2->destType);
16022 exp->__anon1.op.exp2->destType = MkClassType("bool");
16023 exp->__anon1.op.exp2->destType->truth = 1;
16024 if(!exp->__anon1.op.exp2->expType)
16025 ProcessExpressionType(exp->__anon1.op.exp2);
16027 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16028 FreeType(exp->__anon1.op.exp2->expType);
16029 exp->__anon1.op.exp2->expType = MkClassType("bool");
16030 exp->__anon1.op.exp2->expType->truth = 1;
16033 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")))))
16035 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"))))
16037 if(exp->__anon1.op.op == '-' && ((type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4) || (type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)))
16039 struct Type * intType;
16041 if(!type1->__anon1._class->__anon1.registered->dataType)
16042 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16043 if(!type2->__anon1._class->__anon1.registered->dataType)
16044 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16045 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16046 if(exp->__anon1.op.exp1->destType)
16047 FreeType(exp->__anon1.op.exp1->destType);
16048 if(exp->__anon1.op.exp2->destType)
16049 FreeType(exp->__anon1.op.exp2->destType);
16050 exp->__anon1.op.exp1->destType = intType;
16051 exp->__anon1.op.exp2->destType = intType;
16052 intType->refCount++;
16056 if(exp->__anon1.op.exp2->destType)
16057 FreeType(exp->__anon1.op.exp2->destType);
16058 exp->__anon1.op.exp2->destType = type1;
16060 if(exp->__anon1.op.exp1->destType)
16061 FreeType(exp->__anon1.op.exp1->destType);
16062 exp->__anon1.op.exp1->destType = type2;
16065 if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1->__anon1._class->__anon1.registered != type2->__anon1._class->__anon1.registered)
16066 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);
16067 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16069 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16073 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16075 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16076 ProcessExpressionType(exp->__anon1.op.exp1);
16077 if(type2->kind != 13)
16079 ProcessExpressionType(classExp);
16080 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16081 if(!exp->__anon1.op.exp2->expType)
16085 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16088 ProcessExpressionType(exp->__anon1.op.exp2);
16092 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)))
16094 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16095 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16096 exp->expType = type1;
16100 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)))
16102 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16103 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16104 exp->expType = type2;
16108 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))
16110 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16114 unsigned int success = 0;
16116 if(type1->kind == 13 && type2->kind == 13)
16118 if(exp->__anon1.op.op == '+')
16119 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16120 else if(exp->__anon1.op.op == '-')
16122 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16124 exp->expType = __extension__ ({
16125 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16127 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16130 if(type1->__anon1.type->kind == 20)
16132 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16136 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16138 ProcessExpressionType(classExp);
16140 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"))));
16141 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16149 if(!success && exp->__anon1.op.exp1->type == 2)
16151 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16154 FreeType(exp->expType);
16155 exp->expType = exp->__anon1.op.exp1->destType;
16156 if(exp->__anon1.op.exp1->destType)
16157 exp->__anon1.op.exp1->destType->refCount++;
16160 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16163 FreeType(exp->expType);
16164 exp->expType = exp->__anon1.op.exp2->destType;
16165 if(exp->__anon1.op.exp2->destType)
16166 exp->__anon1.op.exp2->destType->refCount++;
16172 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16175 FreeType(exp->expType);
16176 exp->expType = exp->__anon1.op.exp2->destType;
16177 if(exp->__anon1.op.exp2->destType)
16178 exp->__anon1.op.exp2->destType->refCount++;
16181 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16184 FreeType(exp->expType);
16185 exp->expType = exp->__anon1.op.exp1->destType;
16186 if(exp->__anon1.op.exp1->destType)
16187 exp->__anon1.op.exp1->destType->refCount++;
16193 char expString1[10240];
16194 char expString2[10240];
16198 expString1[0] = '\0';
16199 expString2[0] = '\0';
16204 PrintExpression(exp->__anon1.op.exp1, expString1);
16205 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16206 PrintExpression(exp->__anon1.op.exp2, expString2);
16207 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16208 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16209 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16211 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16215 else if(!boolResult && (!useSideUnit) && type2 && type1 && type2->kind == 8 && type1->kind != 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16217 if(exp->__anon1.op.exp1->destType)
16218 FreeType(exp->__anon1.op.exp1->destType);
16219 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16220 if(type2->__anon1._class->__anon1.registered->dataType)
16221 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16222 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16223 exp->expType = type2;
16227 else if(!boolResult && (!useSideUnit) && type1 && type2 && type1->kind == 8 && type2->kind != 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16229 if(exp->__anon1.op.exp2->destType)
16230 FreeType(exp->__anon1.op.exp2->destType);
16231 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16232 if(type1->__anon1._class->__anon1.registered->dataType)
16233 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16234 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16235 exp->expType = type1;
16241 unsigned int valid = 0;
16243 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16245 if(exp->__anon1.op.exp2->destType)
16246 FreeType(exp->__anon1.op.exp2->destType);
16247 if(!type1->__anon1._class->__anon1.registered->dataType)
16248 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16249 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16250 exp->__anon1.op.exp2->destType->refCount++;
16251 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16254 type2 = exp->__anon1.op.exp2->destType;
16257 exp->expType = type2;
16260 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16262 if(exp->__anon1.op.exp1->destType)
16263 FreeType(exp->__anon1.op.exp1->destType);
16264 if(!type2->__anon1._class->__anon1.registered->dataType)
16265 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16266 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16267 exp->__anon1.op.exp1->destType->refCount++;
16268 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16269 type1 = exp->__anon1.op.exp1->destType;
16270 exp->expType = type1;
16273 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16275 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16276 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16278 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16280 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16282 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16285 FreeType(exp->expType);
16286 exp->expType = exp->__anon1.op.exp2->expType;
16287 if(exp->__anon1.op.exp2->expType)
16288 exp->__anon1.op.exp2->expType->refCount++;
16292 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16294 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16297 FreeType(exp->expType);
16298 exp->expType = exp->__anon1.op.exp1->expType;
16299 if(exp->__anon1.op.exp1->expType)
16300 exp->__anon1.op.exp1->expType->refCount++;
16307 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16309 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16312 FreeType(exp->expType);
16313 exp->expType = exp->__anon1.op.exp1->expType;
16314 if(exp->__anon1.op.exp1->expType)
16315 exp->__anon1.op.exp1->expType->refCount++;
16319 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16321 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16324 FreeType(exp->expType);
16325 exp->expType = exp->__anon1.op.exp2->expType;
16326 if(exp->__anon1.op.exp2->expType)
16327 exp->__anon1.op.exp2->expType->refCount++;
16335 if(type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && (type1->kind != 8 || !type1->__anon1._class || !type1->__anon1._class->__anon1.registered || type1->__anon1._class->__anon1.registered->type != 3))
16337 if(exp->__anon1.op.exp1->destType)
16338 FreeType(exp->__anon1.op.exp1->destType);
16339 exp->__anon1.op.exp1->destType = type2;
16341 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16344 FreeType(exp->expType);
16345 exp->expType = exp->__anon1.op.exp1->destType;
16346 if(exp->__anon1.op.exp1->destType)
16347 exp->__anon1.op.exp1->destType->refCount++;
16352 if(exp->__anon1.op.exp2->destType)
16353 FreeType(exp->__anon1.op.exp2->destType);
16354 exp->__anon1.op.exp2->destType = type1;
16356 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16359 FreeType(exp->expType);
16360 exp->expType = exp->__anon1.op.exp2->destType;
16361 if(exp->__anon1.op.exp2->destType)
16362 exp->__anon1.op.exp2->destType->refCount++;
16364 else if(type1 && type2)
16366 char expString1[10240];
16367 char expString2[10240];
16368 char type1String[1024];
16369 char type2String[1024];
16371 expString1[0] = '\0';
16372 expString2[0] = '\0';
16373 type1String[0] = '\0';
16374 type2String[0] = '\0';
16377 PrintExpression(exp->__anon1.op.exp1, expString1);
16378 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16379 PrintExpression(exp->__anon1.op.exp2, expString2);
16380 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16381 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16382 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16384 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16385 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16387 exp->expType = exp->__anon1.op.exp1->expType;
16388 if(exp->__anon1.op.exp1->expType)
16389 exp->__anon1.op.exp1->expType->refCount++;
16391 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16393 exp->expType = exp->__anon1.op.exp2->expType;
16394 if(exp->__anon1.op.exp2->expType)
16395 exp->__anon1.op.exp2->expType->refCount++;
16403 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16405 struct Type * oldType = exp->__anon1.op.exp1->expType;
16407 exp->__anon1.op.exp1->expType = (((void *)0));
16408 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16411 exp->__anon1.op.exp1->expType = oldType;
16413 if(exp->__anon1.op.exp1->destType)
16414 FreeType(exp->__anon1.op.exp1->destType);
16415 exp->__anon1.op.exp1->destType = type2;
16417 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16420 FreeType(exp->expType);
16421 exp->expType = exp->__anon1.op.exp1->destType;
16422 if(exp->__anon1.op.exp1->destType)
16423 exp->__anon1.op.exp1->destType->refCount++;
16427 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16429 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16431 if(exp->__anon1.op.exp1->destType)
16432 FreeType(exp->__anon1.op.exp1->destType);
16433 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16434 if(type2->__anon1._class->__anon1.registered->dataType)
16435 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16436 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16438 if(exp->__anon1.op.op == '!')
16440 exp->expType = MkClassType("bool");
16441 exp->expType->truth = 1;
16445 exp->expType = type2;
16450 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16452 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16454 if(exp->__anon1.op.exp2->destType)
16455 FreeType(exp->__anon1.op.exp2->destType);
16456 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16457 if(type1->__anon1._class->__anon1.registered->dataType)
16458 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16459 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16461 exp->expType = type1;
16467 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16469 char expString[10000];
16471 expString[0] = '\0';
16474 PrintExpression(exp->__anon1.op.exp1, expString);
16475 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16478 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16480 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16482 char expString[10240];
16484 expString[0] = '\0';
16487 PrintExpression(exp->__anon1.op.exp2, expString);
16488 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16491 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16495 FreeType(exp->expType);
16496 exp->expType = MkClassType("bool");
16497 exp->expType->truth = 1;
16499 if(exp->__anon1.op.op != SIZEOF)
16500 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16501 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16503 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16505 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16506 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16507 yylloc = oldyylloc;
16516 struct Expression * e;
16518 exp->isConstant = 1;
16519 for(e = (*exp->__anon1.list).first; e; e = e->next)
16523 FreeType(e->destType);
16524 e->opDestType = exp->opDestType;
16525 e->destType = exp->destType;
16528 exp->destType->refCount++;
16531 ProcessExpressionType(e);
16532 if(!exp->expType && !e->next)
16534 exp->expType = e->expType;
16536 e->expType->refCount++;
16539 exp->isConstant = 0;
16541 e = (*exp->__anon1.list).first;
16542 if(!e->next && e->type == 8)
16544 struct Expression * next = exp->next, * prev = exp->prev;
16546 FreeType(exp->expType);
16547 FreeType(exp->destType);
16548 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16552 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16553 ProcessExpressionType(exp);
16559 struct Expression * e;
16561 exp->isConstant = 1;
16562 ProcessExpressionType(exp->__anon1.index.exp);
16563 if(!exp->__anon1.index.exp->isConstant)
16564 exp->isConstant = 0;
16565 if(exp->__anon1.index.exp->expType)
16567 struct Type * source = exp->__anon1.index.exp->expType;
16569 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16571 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16572 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16574 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
16576 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
16577 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
16579 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
16581 if(type->kind == 8)
16582 type->constant = 1;
16583 else if(type->kind == 13)
16585 struct Type * t = type;
16587 while(t->kind == 13)
16588 t = t->__anon1.type;
16591 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
16596 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
16598 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
16601 FreeType(e->destType);
16602 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
16604 ProcessExpressionType(e);
16609 exp->isConstant = 0;
16612 exp->expType = Dereference(exp->__anon1.index.exp->expType);
16614 DeclareType(curExternal, exp->expType, 1, 0);
16619 struct Expression * e;
16620 struct Type * functionType;
16621 struct Type * methodType = (((void *)0));
16627 PrintExpression(exp->__anon1.call.exp, name);
16628 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
16630 PrintExpression(exp->__anon1.call.exp, name);
16633 if(exp->__anon1.call.exp->type == 0)
16635 struct Expression * idExp = exp->__anon1.call.exp;
16636 struct Identifier * id = idExp->__anon1.__anon1.identifier;
16638 if(!strcmp(id->string, "__builtin_frame_address"))
16640 exp->expType = ProcessTypeString("void *", 1);
16641 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
16642 ProcessExpressionType((*exp->__anon1.call.arguments).first);
16645 else if(!strcmp(id->string, "__ENDIAN_PAD"))
16647 exp->expType = ProcessTypeString("int", 1);
16648 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
16649 ProcessExpressionType((*exp->__anon1.call.arguments).first);
16652 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
16654 struct Expression * a = (((void *)0));
16655 struct Expression * b = (((void *)0));
16656 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
16658 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
16660 a = (*exp->__anon1.call.arguments).first;
16661 b = (*exp->__anon1.call.arguments).last;
16665 else if((*exp->__anon1.call.arguments).count == 1)
16667 a = (*exp->__anon1.call.arguments).first;
16672 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
16673 idExp->__anon1.__anon1.identifier = (((void *)0));
16674 FreeExpContents(exp);
16675 ProcessExpressionType(a);
16677 ProcessExpressionType(b);
16679 exp->__anon1.list = MkList();
16680 if(a->expType && (!b || b->expType))
16682 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
16686 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16687 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
16688 struct Declaration * decl;
16689 char temp1[1024], temp2[1024];
16691 GetTypeSpecs(a->expType, specs);
16692 if(a && !a->isConstant && a->type != 0)
16694 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
16695 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
16696 tempExp1 = QMkExpId(temp1);
16697 tempExp1->expType = a->expType;
16699 a->expType->refCount++;
16700 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
16702 if(b && !b->isConstant && b->type != 0)
16704 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
16705 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
16706 tempExp2 = QMkExpId(temp2);
16707 tempExp2->expType = b->expType;
16709 b->expType->refCount++;
16710 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
16712 decl = MkDeclaration(specs, decls);
16713 if(!curCompound->__anon1.compound.declarations)
16714 curCompound->__anon1.compound.declarations = MkList();
16715 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
16719 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
16721 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
16723 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
16724 exp->expType = a->expType;
16726 a->expType->refCount++;
16728 else if(!strcmp(id->string, "Abs"))
16730 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
16731 exp->expType = a->expType;
16733 a->expType->refCount++;
16735 else if(!strcmp(id->string, "Sgn"))
16737 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"))))));
16738 exp->expType = ProcessTypeString("int", 0);
16740 FreeExpression(tempExp1);
16742 FreeExpression(tempExp2);
16743 FreeIdentifier(id);
16749 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16751 if(!exp->__anon1.call.exp->destType)
16753 exp->__anon1.call.exp->destType = dummy;
16756 ProcessExpressionType(exp->__anon1.call.exp);
16757 if(exp->__anon1.call.exp->destType == dummy)
16760 exp->__anon1.call.exp->destType = (((void *)0));
16764 functionType = exp->__anon1.call.exp->expType;
16765 if(functionType && functionType->kind == 16)
16767 methodType = functionType;
16768 functionType = methodType->__anon1.__anon3.method->dataType;
16769 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
16771 char typeString[1024];
16773 typeString[0] = '\0';
16775 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
16777 functionType->__anon1.__anon2.thisClass = (((void *)0));
16778 PrintType(functionType, typeString, 1, 1);
16779 functionType->__anon1.__anon2.thisClass = back;
16781 if(strstr(typeString, "thisclass"))
16783 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16784 struct Declarator * decl;
16787 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
16789 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16790 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))
16791 thisClassParams = 0;
16792 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
16794 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
16796 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
16797 ProcessDeclarator(decl, 1);
16798 thisClass = backupThisClass;
16800 thisClassParams = 1;
16801 functionType = ProcessType(specs, decl);
16802 functionType->refCount = 0;
16803 FinishTemplatesContext(context);
16805 FreeList(specs, (void *)(FreeSpecifier));
16806 FreeDeclarator(decl);
16810 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
16812 struct Type * type = functionType->__anon1.type;
16814 if(!functionType->refCount)
16816 functionType->__anon1.type = (((void *)0));
16817 FreeType(functionType);
16819 functionType = type;
16821 if(functionType && functionType->kind != 11)
16823 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
16825 else if(functionType)
16827 unsigned int emptyParams = 0, noParams = 0;
16828 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
16829 struct Type * type = functionType->__anon1.__anon2.params.first;
16830 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
16832 struct Location oldyylloc = yylloc;
16836 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
16838 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
16841 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
16843 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)
16845 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
16848 e->destType = type;
16850 type = functionType->__anon1.__anon2.params.first;
16853 type->refCount = 0;
16855 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
16857 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
16858 type->byReference = functionType->byReference;
16859 type->typedByReference = functionType->typedByReference;
16862 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
16864 e->destType = type;
16866 type = functionType->__anon1.__anon2.params.first;
16869 type->refCount = 0;
16872 if(type && type->kind == 0)
16875 if(!type->refCount)
16877 type = (((void *)0));
16879 for(; e; e = e->next)
16881 if(!type && !emptyParams)
16884 if(methodType && methodType->__anon1.__anon3.methodClass)
16885 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);
16887 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);
16890 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
16892 struct Type * templatedType = (((void *)0));
16893 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
16894 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16897 if(_class && _class->templateArgs)
16899 struct __ecereNameSpace__ecere__com__Class * sClass;
16901 for(sClass = _class; sClass; sClass = sClass->base)
16903 if(sClass->templateClass)
16904 sClass = sClass->templateClass;
16906 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16908 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
16910 struct __ecereNameSpace__ecere__com__Class * nextClass;
16912 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16914 if(nextClass->templateClass)
16915 nextClass = nextClass->templateClass;
16916 id += nextClass->templateParams.count;
16926 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
16928 unsigned int constant = type->constant;
16929 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
16932 struct Context * context = SetupTemplatesContext(_class);
16934 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16935 FinishTemplatesContext(context);
16937 if(templatedType->kind == 8 && constant)
16938 templatedType->constant = 1;
16939 else if(templatedType->kind == 13)
16941 struct Type * t = templatedType->__anon1.type;
16943 while(t->kind == 13)
16944 t = t->__anon1.type;
16946 t->constant = constant;
16948 e->destType = templatedType;
16951 templatedType->passAsTemplate = 1;
16956 e->destType = type;
16963 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
16965 e->destType = type->prev;
16966 e->destType->refCount++;
16970 e->destType = type;
16975 if(type && type->kind != 14)
16977 struct Type * next = type->next;
16979 if(!type->refCount)
16984 if(type && type->kind != 14)
16986 if(methodType && methodType->__anon1.__anon3.methodClass)
16987 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);
16989 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);
16991 yylloc = oldyylloc;
16992 if(type && !type->refCount)
16997 functionType = __extension__ ({
16998 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17000 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17002 if(exp->__anon1.call.exp->type == 0)
17004 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17008 struct Symbol * symbol;
17009 struct Location oldyylloc = yylloc;
17011 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17012 if(strstr(string, "__builtin_") == string)
17016 functionType->__anon1.__anon2.returnType = exp->destType;
17017 exp->destType->refCount++;
17021 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17022 symbol = __extension__ ({
17023 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17025 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17027 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17028 if(strstr(symbol->string, "::"))
17029 globalContext->hasNameSpace = 1;
17030 yylloc = oldyylloc;
17033 else if(exp->__anon1.call.exp->type == 8)
17037 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17038 if(!functionType->__anon1.__anon2.returnType)
17040 functionType->__anon1.__anon2.returnType = __extension__ ({
17041 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17043 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17047 if(functionType && functionType->kind == 11)
17049 exp->expType = functionType->__anon1.__anon2.returnType;
17050 if(functionType->__anon1.__anon2.returnType)
17051 functionType->__anon1.__anon2.returnType->refCount++;
17052 if(!functionType->refCount)
17053 FreeType(functionType);
17055 if(exp->__anon1.call.arguments)
17057 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17058 ProcessExpressionType(e);
17064 struct Type * type;
17065 struct Location oldyylloc = yylloc;
17066 unsigned int thisPtr;
17067 struct Expression * checkExp = exp->__anon1.member.exp;
17071 if(checkExp->type == 11)
17072 checkExp = checkExp->__anon1.cast.exp;
17073 else if(checkExp->type == 5)
17074 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17078 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17079 exp->thisPtr = thisPtr;
17080 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17082 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17084 ProcessExpressionType(exp->__anon1.member.exp);
17085 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)
17087 exp->isConstant = 0;
17090 exp->isConstant = exp->__anon1.member.exp->isConstant;
17091 type = exp->__anon1.member.exp->expType;
17093 if(type && (type->kind == 20))
17095 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17096 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17100 for(param = _class->templateParams.first; param; param = param->next)
17102 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17106 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17108 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17112 struct Expression * expMember = exp->__anon1.member.exp;
17113 struct Declarator * decl;
17114 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17115 char thisClassTypeString[1024];
17117 FreeIdentifier(exp->__anon1.member.member);
17118 ProcessExpressionType(argExp);
17120 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17124 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17125 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17128 strcpy(thisClassTypeString, _class->fullName);
17130 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17131 exp->expType = ProcessType(specs, decl);
17132 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17134 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17135 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17136 int paramCount = 0;
17137 int lastParam = -1;
17138 char templateString[1024];
17139 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17141 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17142 for(cClass = expClass; cClass; cClass = cClass->base)
17146 for(param = cClass->templateParams.first; param; param = param->next)
17149 struct __ecereNameSpace__ecere__com__Class * sClass;
17150 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17152 for(sClass = cClass->base; sClass; sClass = sClass->base)
17153 id += sClass->templateParams.count;
17154 arg = expClass->templateArgs[id];
17155 for(sClass = _class; sClass; sClass = sClass->base)
17157 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17159 struct __ecereNameSpace__ecere__com__Class * nextClass;
17161 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17162 p += nextClass->templateParams.count;
17163 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17165 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17167 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17169 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17170 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17177 char argument[256];
17179 argument[0] = '\0';
17180 switch(param->type)
17184 char expString[1024];
17185 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17186 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17187 struct Expression * exp;
17188 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17190 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17191 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17192 ProcessExpressionType(exp);
17193 ComputeExpression(exp);
17194 expString[0] = '\0';
17195 PrintExpression(exp, expString);
17196 strcat(argument, expString);
17197 FreeExpression(exp);
17202 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17207 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17209 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17210 strcat(argument, thisClassTypeString);
17212 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17220 strcat(templateString, ", ");
17221 if(lastParam != p - 1)
17223 strcat(templateString, param->name);
17224 strcat(templateString, " = ");
17226 strcat(templateString, argument);
17235 int len = strlen(templateString);
17237 if(templateString[len - 1] == '>')
17238 templateString[len++] = ' ';
17239 templateString[len++] = '>';
17240 templateString[len++] = '\0';
17243 struct Context * context = SetupTemplatesContext(_class);
17245 FreeType(exp->expType);
17246 exp->expType = ProcessTypeString(templateString, 0);
17247 FinishTemplatesContext(context);
17250 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17251 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17253 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")))))))));
17256 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17258 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17261 if(type && (type->kind == 20))
17263 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)))
17265 struct Identifier * id = exp->__anon1.member.member;
17266 int typeKind = type->kind;
17267 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));
17269 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17271 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17276 if(typeKind == 3 || typeKind == 15)
17277 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17280 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17282 _class = type->__anon1._class->__anon1.registered;
17284 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17286 _class = FindClass("char *")->__anon1.registered;
17288 else if(type->kind == 13)
17290 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17291 FreeType(exp->expType);
17292 exp->expType = ProcessTypeString("uintptr", 0);
17293 exp->byReference = 1;
17297 char string[1024] = "";
17298 struct Symbol * classSym;
17300 PrintTypeNoConst(type, string, 0, 1);
17301 classSym = FindClass(string);
17303 _class = classSym->__anon1.registered;
17309 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17310 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17311 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17312 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17313 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17315 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17316 exp->__anon1.member.memberType = 1;
17317 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17318 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17321 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17323 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17324 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17326 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17328 member = (((void *)0));
17330 if(!member && !prop)
17331 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17332 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17333 exp->__anon1.member.thisPtr = 1;
17337 unsigned int useMemberForNonConst = 0;
17341 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17342 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);
17343 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17344 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17346 if((!prop || useMemberForNonConst) && !member)
17348 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17351 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17352 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);
17353 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17354 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17359 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17360 prop = (((void *)0));
17362 member = (((void *)0));
17366 if(!prop && !member && !method)
17367 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17368 if(!prop && !member && !method)
17372 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17375 exp->__anon1.member.memberType = 5;
17376 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17380 char structName[1024];
17381 struct Identifier * id = exp->__anon1.member.member;
17382 struct Expression * classExp = exp->__anon1.member.exp;
17385 FreeType(classExp->expType);
17386 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17387 strcpy(structName, "__ecereClassData_");
17388 FullClassNameCat(structName, type->__anon1._class->string, 0);
17390 exp->__anon1.member.member = id;
17391 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"))))))));
17393 ProcessExpressionType(exp);
17399 struct Symbol * classSym = FindClass(id->string);
17403 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17406 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17410 if(exp->__anon1.member.exp->destType)
17411 FreeType(exp->__anon1.member.exp->destType);
17413 if(method && !method->_class->symbol)
17414 method->_class->symbol = FindClass(method->_class->fullName);
17415 if(prop && !prop->_class->symbol)
17416 prop->_class->symbol = FindClass(prop->_class->fullName);
17417 exp->__anon1.member.exp->destType = __extension__ ({
17418 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17420 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
17425 exp->__anon1.member.memberType = 1;
17426 if(!prop->dataType)
17427 ProcessPropertyType(prop);
17428 exp->expType = prop->dataType;
17429 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17431 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17433 CopyTypeInto(type, exp->expType);
17434 type->refCount = 1;
17435 type->constant = 1;
17436 exp->expType = type;
17438 else if(prop->dataType)
17439 prop->dataType->refCount++;
17443 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17445 FreeExpContents(exp);
17447 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17448 ProcessExpressionType(exp);
17451 exp->__anon1.member.memberType = 3;
17452 DeclareStruct(curExternal, _class->fullName, 0, 1);
17453 if(member->_class != _class)
17454 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17455 if(!member->dataType)
17457 struct Context * context = SetupTemplatesContext(_class);
17459 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17460 FinishTemplatesContext(context);
17462 exp->expType = member->dataType;
17463 if(member->dataType)
17464 member->dataType->refCount++;
17466 else if(revConvert)
17468 exp->__anon1.member.memberType = 4;
17469 exp->expType = MkClassType(revConvert->_class->fullName);
17474 exp->__anon1.member.memberType = 2;
17476 if(!method->dataType)
17477 ProcessMethodType(method);
17478 exp->expType = __extension__ ({
17479 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17481 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17483 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17484 exp->expType->__anon1.__anon3.usedClass = _class;
17486 else if(!classProp)
17488 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17490 FreeExpContents(exp);
17492 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17493 FreeType(exp->expType);
17494 exp->expType = MkClassType("ecere::com::Class");
17497 yylloc = exp->__anon1.member.member->loc;
17498 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17500 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17502 if(_class && exp->expType)
17504 struct __ecereNameSpace__ecere__com__Class * tClass;
17506 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17507 while(tClass && !tClass->templateClass)
17508 tClass = tClass->base;
17509 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17512 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17513 struct __ecereNameSpace__ecere__com__Class * sClass;
17515 for(sClass = tClass; sClass; sClass = sClass->base)
17518 if(sClass->templateClass)
17519 sClass = sClass->templateClass;
17520 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17522 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17524 for(sClass = sClass->base; sClass; sClass = sClass->base)
17525 id += sClass->templateParams.count;
17533 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17535 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17536 struct Context * context = SetupTemplatesContext(tClass);
17537 unsigned int constant = exp->expType->constant;
17539 FreeType(exp->expType);
17540 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17541 if(exp->expType->kind == 8 && constant)
17542 exp->expType->constant = 1;
17543 else if(exp->expType->kind == 13)
17545 struct Type * t = exp->expType->__anon1.type;
17547 while(t->kind == 13)
17548 t = t->__anon1.type;
17550 t->constant = constant;
17554 if(exp->expType->kind == 21)
17556 FreeType(exp->expType);
17557 exp->expType = ReplaceThisClassType(_class);
17559 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
17560 exp->expType->passAsTemplate = 1;
17563 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17564 if(exp->destType->kind == 8 && constant)
17565 exp->destType->constant = 1;
17566 else if(exp->destType->kind == 13)
17568 struct Type * t = exp->destType->__anon1.type;
17570 while(t->kind == 13)
17571 t = t->__anon1.type;
17573 t->constant = constant;
17575 if(exp->destType->kind == 21)
17577 FreeType(exp->destType);
17578 exp->destType = ReplaceThisClassType(_class);
17582 FinishTemplatesContext(context);
17585 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)
17588 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17589 struct __ecereNameSpace__ecere__com__Class * sClass;
17591 for(sClass = tClass; sClass; sClass = sClass->base)
17594 if(sClass->templateClass)
17595 sClass = sClass->templateClass;
17596 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17598 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
17600 for(sClass = sClass->base; sClass; sClass = sClass->base)
17601 id += sClass->templateParams.count;
17611 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17612 struct Context * context = SetupTemplatesContext(tClass);
17613 struct Type * basicType;
17615 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17618 if(basicType->kind == 21)
17620 FreeType(basicType);
17621 basicType = ReplaceThisClassType(_class);
17623 FreeType(exp->expType);
17624 exp->expType = __extension__ ({
17625 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17627 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
17631 exp->destType = exp->expType;
17632 exp->destType->refCount++;
17635 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17636 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17637 struct Declarator * decl;
17639 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
17642 exp->destType->refCount++;
17644 exp->expType->refCount++;
17646 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
17647 exp->__anon1.cast.exp = newExp;
17650 FinishTemplatesContext(context);
17653 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
17655 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17659 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17661 int paramCount = 0;
17662 int lastParam = -1;
17663 char templateString[1024];
17664 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17666 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17667 while(cClass != expClass)
17669 struct __ecereNameSpace__ecere__com__Class * sClass;
17671 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
17674 for(param = cClass->templateParams.first; param; param = param->next)
17676 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
17678 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
17679 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17681 while(cClassCur != tClass && !paramCur)
17683 struct __ecereNameSpace__ecere__com__Class * sClassCur;
17685 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
17687 cClassCur = sClassCur;
17688 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
17690 if(!strcmp(paramCur->name, param->name))
17697 if(paramCur && paramCur->type == 0)
17698 arg = tClass->templateArgs[cp];
17700 arg = expClass->templateArgs[p];
17702 char argument[256];
17704 argument[0] = '\0';
17705 switch(param->type)
17709 char expString[1024];
17710 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17711 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17712 struct Expression * exp;
17713 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17715 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17716 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17717 ProcessExpressionType(exp);
17718 ComputeExpression(exp);
17719 expString[0] = '\0';
17720 PrintExpression(exp, expString);
17721 strcat(argument, expString);
17722 FreeExpression(exp);
17727 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17732 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17733 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17740 strcat(templateString, ", ");
17741 if(lastParam != p - 1)
17743 strcat(templateString, param->name);
17744 strcat(templateString, " = ");
17746 strcat(templateString, argument);
17755 int len = strlen(templateString);
17757 if(templateString[len - 1] == '>')
17758 templateString[len++] = ' ';
17759 templateString[len++] = '>';
17760 templateString[len++] = '\0';
17762 FreeType(exp->expType);
17764 struct Context * context = SetupTemplatesContext(tClass);
17766 exp->expType = ProcessTypeString(templateString, 0);
17767 FinishTemplatesContext(context);
17774 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)");
17776 else if(type && (type->kind == 9 || type->kind == 10))
17778 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
17782 exp->expType = memberType;
17784 memberType->refCount++;
17789 char expString[10240];
17791 expString[0] = '\0';
17794 PrintExpression(exp, expString);
17795 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17797 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
17799 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
17801 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
17803 struct Identifier * id = exp->__anon1.member.member;
17804 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));
17808 FreeType(exp->expType);
17809 exp->expType = ReplaceThisClassType(_class);
17813 yylloc = oldyylloc;
17818 struct Type * destType = exp->destType;
17820 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17822 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17824 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
17828 ProcessExpressionType(exp);
17835 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
17837 if(classSym && classSym->__anon1.registered)
17839 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
17842 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
17845 DeclareStruct(curExternal, classSym->string, 0, 1);
17846 FreeSpecifier(exp->__anon1._class);
17847 FullClassNameCat(name, classSym->string, 0);
17851 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
17855 struct Expression * e;
17858 if(b->structSize == b->offset)
17859 exp->__anon1.op.exp1 = MkExpConstant("0");
17861 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
17862 exp->__anon1.op.op = '+';
17864 while(b->offset != 0)
17866 struct Symbol * sym;
17867 struct Expression * typeSize;
17870 sym = FindClass(b->fullName);
17872 DeclareStruct(curExternal, sym->string, 0, 1);
17873 FullClassNameCat(name, sym->string, 0);
17874 if(b->structSize == b->offset)
17875 typeSize = MkExpConstant("0");
17877 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
17878 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
17879 e = e->__anon1.op.exp2;
17885 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
17887 FreeSpecifier(exp->__anon1._class);
17888 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
17893 char className[1024];
17895 strcpy(className, "__ecereClass_");
17896 FullClassNameCat(className, classSym->string, 1);
17897 DeclareClass(curExternal, classSym, className);
17898 FreeExpContents(exp);
17900 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
17901 exp->__anon1.member.member = MkIdentifier("structSize");
17905 exp->expType = __extension__ ({
17906 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17908 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
17914 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
17916 exp->expType = __extension__ ({
17917 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17919 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
17921 exp->isConstant = 1;
17922 DeclareType(curExternal, type, 1, 0);
17928 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
17931 FreeType(exp->__anon1.cast.exp->destType);
17932 exp->__anon1.cast.exp->destType = type;
17935 ProcessExpressionType(exp->__anon1.cast.exp);
17938 exp->expType = type;
17939 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
17941 void * prev = exp->prev, * next = exp->next;
17942 struct Type * expType = exp->__anon1.cast.exp->destType;
17943 struct Expression * castExp = exp->__anon1.cast.exp;
17944 struct Type * destType = exp->destType;
17947 expType->refCount++;
17948 FreeType(exp->expType);
17949 FreeTypeName(exp->__anon1.cast.typeName);
17951 FreeType(exp->expType);
17952 FreeType(exp->destType);
17953 exp->expType = expType;
17954 exp->destType = destType;
17955 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
17961 exp->isConstant = exp->__anon1.cast.exp->isConstant;
17967 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
17969 exp->expType = type;
17974 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
17976 ProcessExpressionType(exp->__anon1.vaArg.exp);
17977 exp->expType = type;
17982 struct Expression * e;
17983 struct Type * t = exp->destType;
17985 if(t && !exp->destType->casted)
17987 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17988 CopyTypeInto(t, exp->destType);
17993 exp->isConstant = 1;
17994 FreeType(exp->__anon1.cond.cond->destType);
17995 exp->__anon1.cond.cond->destType = MkClassType("bool");
17996 exp->__anon1.cond.cond->destType->truth = 1;
17997 ProcessExpressionType(exp->__anon1.cond.cond);
17998 if(!exp->__anon1.cond.cond->isConstant)
17999 exp->isConstant = 0;
18000 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18004 FreeType(e->destType);
18007 e->destType->refCount++;
18009 ProcessExpressionType(e);
18012 exp->expType = e->expType;
18014 e->expType->refCount++;
18017 exp->isConstant = 0;
18019 FreeType(exp->__anon1.cond.elseExp->destType);
18020 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18021 if(exp->__anon1.cond.elseExp->destType)
18022 exp->__anon1.cond.elseExp->destType->refCount++;
18023 ProcessExpressionType(exp->__anon1.cond.elseExp);
18024 if(!exp->__anon1.cond.elseExp->isConstant)
18025 exp->isConstant = 0;
18031 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18033 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18035 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18037 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18039 exp->destType->refCount++;
18041 ProcessStatement(exp->__anon1.compound);
18042 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18044 exp->expType->refCount++;
18050 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18052 if(spec && spec->type == 1)
18054 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18055 exp->expType->kind = 19;
18056 exp->byReference = 1;
18060 exp->expType = MkClassType("ecere::com::Class");
18061 exp->byReference = 1;
18067 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18071 struct Identifier * id = exp->__anon1.classData.id;
18072 char structName[1024];
18073 struct Expression * classExp;
18075 strcpy(structName, "__ecereClassData_");
18076 FullClassNameCat(structName, _class->fullName, 0);
18078 exp->__anon1.member.member = id;
18079 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18080 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18082 classExp = MkExpIdentifier(MkIdentifier("class"));
18083 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"))))))));
18084 ProcessExpressionType(exp);
18091 struct Type * type = (((void *)0));
18092 const char * typeString = (((void *)0));
18093 char typeStringBuf[1024];
18095 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))
18097 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18099 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18101 else if(exp->__anon1.list)
18103 struct Expression * e;
18105 for(e = (*exp->__anon1.list).first; e; e = e->next)
18107 ProcessExpressionType(e);
18117 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18121 e->expType = (((void *)0));
18122 e = (*exp->__anon1.list).first;
18123 ProcessExpressionType(e);
18126 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18128 FreeType(e->expType);
18129 e->expType = (((void *)0));
18131 type = (((void *)0));
18139 FreeType(e->expType);
18140 e->expType = (((void *)0));
18146 typeStringBuf[0] = '\0';
18147 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18148 typeString = typeStringBuf;
18150 type = (((void *)0));
18155 char templateString[1024];
18156 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18157 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18158 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18159 struct Expression * expExt;
18160 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18162 sprintf(templateString, "Container<%s>", typeString);
18163 if(exp->__anon1.list)
18165 struct Expression * e;
18167 type = ProcessTypeString(typeString, 0);
18168 while((e = (*exp->__anon1.list).first))
18170 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18171 e->destType = type;
18173 ProcessExpressionType(e);
18174 ListAdd(initializers, MkInitializerAssignment(e));
18177 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18179 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18180 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18181 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18182 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18183 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18184 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18185 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18186 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18187 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18188 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18189 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18191 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18193 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18194 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18195 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18196 exp->expType = ProcessTypeString(templateString, 0);
18198 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18199 ProcessExpressionType(expExt);
18203 exp->expType = ProcessTypeString("Container", 0);
18204 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18209 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18211 FreeType(exp->expType);
18212 exp->expType = ReplaceThisClassType(thisClass);
18214 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)
18216 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18220 if(exp->expType->kind != 15)
18222 struct Type * member;
18223 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18225 FreeType(exp->expType);
18226 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18227 exp->expType->kind = symbol->type->kind;
18228 exp->expType->refCount++;
18229 exp->expType->__anon1.__anon1.enumName = enumName;
18230 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18231 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18232 member->refCount++;
18236 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18238 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18240 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);
18242 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18248 if(exp->destType && (exp->destType->kind == 18))
18250 else if(exp->destType && !exp->destType->keepCast)
18252 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18253 exp->needTemplateCast = 1;
18254 if(exp->destType->kind == 0)
18256 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18258 unsigned int invalidCast = 0;
18260 if(inCompiler && exp->destType->count && exp->expType)
18262 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18263 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18265 if(c1 && c1->type != 1)
18266 c1 = (((void *)0));
18267 if(c2 && c2->type != 1)
18268 c2 = (((void *)0));
18269 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18272 if(!exp->destType->count || unresolved || invalidCast)
18277 if(exp->destType->kind != 14)
18284 char expString[10240];
18286 expString[0] = '\0';
18287 PrintType(exp->destType, type2, 0, 1);
18290 PrintExpression(exp, expString);
18291 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18294 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18295 else if(exp->type != 16)
18296 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18301 char expString[10240];
18303 expString[0] = '\0';
18306 PrintExpression(exp, expString);
18307 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18310 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18311 else if(exp->type != 16)
18312 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18324 PrintType(exp->expType, type1, 0, 1);
18325 PrintType(exp->destType, type2, 0, 1);
18327 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)))
18331 char expString[10240];
18333 expString[0] = '\0';
18336 PrintExpression(exp, expString);
18337 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18339 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")))
18342 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18344 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18348 FreeType(exp->expType);
18349 exp->destType->refCount++;
18350 exp->expType = exp->destType;
18356 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))
18358 struct Expression * nbExp = GetNonBracketsExp(exp);
18360 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18362 struct Expression * e = MoveExpContents(exp);
18364 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18366 exp->__anon1.cast.exp->destType = exp->destType;
18368 exp->destType->refCount++;
18369 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18373 else if(unresolved)
18375 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18376 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);
18377 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18378 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18380 else if(!exp->expType && exp->type != 16)
18382 char expString[10240];
18384 expString[0] = '\0';
18387 PrintExpression(exp, expString);
18388 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18390 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18393 ApplyAnyObjectLogic(exp);
18394 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)))
18396 exp->byReference = 1;
18398 yylloc = oldyylloc;
18401 static void ProcessFunction(struct FunctionDefinition * function)
18403 struct Identifier * id = GetDeclId(function->declarator);
18404 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18405 struct Type * type = symbol ? symbol->type : (((void *)0));
18406 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18407 struct Context * oldTopContext = topContext;
18409 yylloc = function->loc;
18410 if(type && type->__anon1.__anon2.thisClass)
18412 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18413 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18414 char className[1024];
18415 char structName[1024];
18416 struct Declarator * funcDecl;
18417 struct Symbol * thisSymbol;
18418 unsigned int typedObject = 0;
18420 if(_class && !_class->base)
18422 _class = currentClass;
18423 if(_class && !_class->symbol)
18424 _class->symbol = FindClass(_class->fullName);
18425 classSym = _class ? _class->symbol : (((void *)0));
18428 thisClass = _class;
18429 if(inCompiler && _class)
18431 if(type->kind == 11)
18433 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18435 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18437 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18440 if(type->classObjectType != 1)
18442 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18443 symbol->type->__anon1.__anon2.staticMethod = 1;
18444 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18445 symbol->type->extraParam = 0;
18448 strcpy(className, "__ecereClass_");
18449 FullClassNameCat(className, _class->fullName, 1);
18450 structName[0] = (char)0;
18451 FullClassNameCat(structName, _class->fullName, 0);
18452 funcDecl = GetFuncDecl(function->declarator);
18455 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18457 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18459 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18461 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18462 FreeTypeName(param);
18465 if(!function->propertyNoThis)
18467 struct TypeName * thisParam = (((void *)0));
18469 if(type->classObjectType != 1)
18471 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18472 if(!funcDecl->__anon1.function.parameters)
18473 funcDecl->__anon1.function.parameters = MkList();
18474 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18478 if(type->classObjectType != 1)
18480 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18481 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18483 thisParam = __extension__ ({
18484 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18486 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18488 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18489 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18493 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18495 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18497 funcDecl = GetFuncDecl(initDecl->declarator);
18500 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18502 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18504 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18507 FreeTypeName(param);
18510 if(type->classObjectType != 1)
18512 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18514 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18516 if(!funcDecl->__anon1.function.parameters)
18517 funcDecl->__anon1.function.parameters = MkList();
18518 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18526 if(type->classObjectType != 1)
18528 thisSymbol = __extension__ ({
18529 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18531 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18533 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18534 if(typedObject && thisSymbol->type)
18536 thisSymbol->type->classObjectType = 2;
18537 thisSymbol->type->byReference = type->byReference;
18538 thisSymbol->type->typedByReference = type->byReference;
18542 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
18544 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18547 struct __ecereNameSpace__ecere__com__Class * base;
18549 for(base = _class; base && base->type != 1000; base = base->next)
18551 for(member = base->membersAndProperties.first; member; member = member->next)
18552 if(!member->isProperty)
18558 for(member = _class->membersAndProperties.first; member; member = member->next)
18559 if(!member->isProperty)
18563 char pointerName[1024];
18564 struct Declaration * decl;
18565 struct Initializer * initializer;
18566 struct Expression * exp, * bytePtr;
18568 strcpy(pointerName, "__ecerePointer_");
18569 FullClassNameCat(pointerName, _class->fullName, 0);
18571 char className[1024];
18573 strcpy(className, "__ecereClass_");
18574 FullClassNameCat(className, classSym->string, 1);
18575 DeclareClass(curExternal, classSym, className);
18577 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18580 struct Expression * e;
18582 if(_class->offset && _class->offset == _class->base->structSize)
18584 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
18585 ProcessExpressionType(e);
18591 sprintf(string, "%d", _class->offset);
18592 e = MkExpConstant(string);
18594 exp = QBrackets(MkExpOp(bytePtr, '+', e));
18598 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18600 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18601 exp->expType = __extension__ ({
18602 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18604 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18605 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18607 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18608 }), __ecereInstance2;
18612 yylloc = function->body->loc;
18613 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18615 struct Context * prevContext = curContext;
18616 struct __ecereNameSpace__ecere__sys__OldList * list;
18618 curContext = function->body->__anon1.compound.context;
18619 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18620 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
18621 curContext = prevContext;
18623 decl->symbol = (((void *)0));
18624 if(!function->body->__anon1.compound.declarations)
18625 function->body->__anon1.compound.declarations = MkList();
18626 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18632 thisClass = (((void *)0));
18635 FreeSpecifier(id->_class);
18636 id->_class = (((void *)0));
18637 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18639 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18641 id = GetDeclId(initDecl->declarator);
18642 FreeSpecifier(id->_class);
18643 id->_class = (((void *)0));
18647 topContext = function->body->__anon1.compound.context;
18649 struct FunctionDefinition * oldFunction = curFunction;
18651 curFunction = function;
18653 ProcessStatement(function->body);
18654 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18656 struct Statement * prevCompound = curCompound;
18657 struct Context * prevContext = curContext;
18658 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18660 if(!function->body->__anon1.compound.statements)
18661 function->body->__anon1.compound.statements = MkList();
18662 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18663 curCompound = function->body;
18664 curContext = function->body->__anon1.compound.context;
18665 ProcessStatement(fireWatchers);
18666 curContext = prevContext;
18667 curCompound = prevCompound;
18669 curFunction = oldFunction;
18671 if(function->declarator)
18673 ProcessDeclarator(function->declarator, 1);
18675 topContext = oldTopContext;
18676 thisClass = oldThisClass;
18679 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18681 struct ClassDef * def;
18682 struct External * external = curExternal;
18683 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18685 for(def = definitions->first; def; def = def->next)
18689 if(def->__anon1.function->declarator)
18690 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18692 curExternal = external;
18693 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18695 else if(def->type == 2)
18697 if(def->__anon1.decl->type == 2)
18699 thisClass = regClass;
18700 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18701 thisClass = (((void *)0));
18705 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18708 thisClass = regClass;
18709 ProcessDeclaration(def->__anon1.decl);
18710 thisClass = backThisClass;
18713 else if(def->type == 1 && def->__anon1.defProperties)
18715 struct MemberInit * defProperty;
18716 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);
18718 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18719 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18721 thisClass = regClass;
18722 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18723 thisClass = (((void *)0));
18725 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18726 FreeSymbol(thisSymbol);
18728 else if(def->type == 3 && def->__anon1.propertyDef)
18730 struct PropertyDef * prop = def->__anon1.propertyDef;
18732 thisClass = regClass;
18737 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18739 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18741 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18742 ProcessStatement(prop->setStmt);
18748 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18750 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18752 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18753 ProcessStatement(prop->getStmt);
18755 if(prop->issetStmt)
18759 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18761 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18763 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18764 ProcessStatement(prop->issetStmt);
18766 thisClass = (((void *)0));
18768 else if(def->type == 4 && def->__anon1.propertyWatch)
18770 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18772 thisClass = regClass;
18773 if(propertyWatch->compound)
18775 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);
18777 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18778 curExternal = (((void *)0));
18779 ProcessStatement(propertyWatch->compound);
18781 thisClass = (((void *)0));
18786 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
18792 if(spec->__anon1.specifier == THISCLASS)
18797 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
18798 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
18799 ProcessSpecifier(spec, declareStruct);
18806 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
18809 DeclareType(curExternal, symbol->type, 1, 1);
18810 else if(spec->__anon1.__anon1.symbol)
18812 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
18814 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
18820 struct Enumerator * e;
18822 if(spec->__anon1.__anon2.list)
18824 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
18827 ProcessExpressionType(e->exp);
18836 if(spec->__anon1.__anon2.definitions)
18838 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
18840 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
18847 void ComputeDataTypes()
18849 struct External * external;
18851 currentClass = (((void *)0));
18852 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18853 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
18854 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
18855 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
18856 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
18857 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
18858 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
18859 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
18860 DeclareFunctionUtil((((void *)0)), "eSystem_New");
18861 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
18862 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
18863 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
18864 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
18865 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
18866 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
18867 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
18868 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
18869 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
18870 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
18871 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
18872 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
18873 for(external = (*ast).first; external; external = external->next)
18875 afterExternal = curExternal = external;
18876 if(external->type == 0)
18880 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18881 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18883 currentClass = external->__anon1.function->_class;
18884 ProcessFunction(external->__anon1.function);
18886 else if(external->type == 1)
18888 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
18890 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18891 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18893 currentClass = (((void *)0));
18894 if(external->__anon1.declaration)
18895 ProcessDeclaration(external->__anon1.declaration);
18897 else if(external->type == 2)
18899 struct ClassDefinition * _class = external->__anon1._class;
18901 currentClass = external->symbol->__anon1.registered;
18904 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18905 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18907 if(_class->definitions)
18909 ProcessClass(_class->definitions, _class->symbol);
18913 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18914 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18917 else if(external->type == 4)
18919 thisNameSpace = external->__anon1.id->string;
18922 currentClass = (((void *)0));
18923 thisNameSpace = (((void *)0));
18924 curExternal = (((void *)0));
18927 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
18932 if(decl->__anon1.identifier->classSym)
18934 FreeSpecifier(decl->__anon1.identifier->_class);
18935 decl->__anon1.identifier->_class = (((void *)0));
18939 if(decl->__anon1.array.exp)
18940 ProcessExpressionType(decl->__anon1.array.exp);
18948 struct Identifier * id = (((void *)0));
18949 struct Specifier * classSpec = (((void *)0));
18951 if(decl->type == 4)
18953 id = GetDeclId(decl);
18954 if(id && id->_class)
18956 classSpec = id->_class;
18957 id->_class = (((void *)0));
18960 if(decl->declarator)
18961 ProcessDeclarator(decl->declarator, isFunction);
18962 if(decl->type == 4)
18966 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
18968 if(!decl->__anon1.function.parameters)
18969 decl->__anon1.function.parameters = MkList();
18970 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
18972 if(decl->__anon1.function.parameters)
18974 struct TypeName * param;
18976 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
18978 if(param->qualifiers)
18980 struct Specifier * spec;
18982 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
18984 if(spec->type == 0)
18986 if(spec->__anon1.specifier == TYPED_OBJECT)
18988 struct Declarator * d = param->declarator;
18989 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);
18992 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
18993 FreeList(param->qualifiers, (void *)(FreeSpecifier));
18994 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
18995 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
18996 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18997 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
19001 else if(spec->__anon1.specifier == ANY_OBJECT)
19003 struct Declarator * d = param->declarator;
19005 FreeList(param->qualifiers, (void *)(FreeSpecifier));
19006 param->qualifiers = MkListOne(MkSpecifier(VOID));
19008 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
19009 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
19012 else if(spec->__anon1.specifier == THISCLASS)
19017 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
19018 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
19019 ProcessSpecifier(spec, 0);
19024 else if(spec->type == 1)
19026 ProcessSpecifier(spec, isFunction);
19030 if(param->declarator)
19031 ProcessDeclarator(param->declarator, 0);
19040 static void ProcessDeclaration(struct Declaration * decl)
19042 yylloc = decl->loc;
19047 unsigned int declareStruct = 0;
19049 if(decl->__anon1.__anon1.declarators)
19051 struct InitDeclarator * d;
19053 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
19055 struct Type * type, * subType;
19057 ProcessDeclarator(d->declarator, 0);
19058 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
19061 ProcessInitializer(d->initializer, type);
19062 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
19064 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
19066 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
19068 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
19069 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
19070 if(decl->__anon1.__anon1.specifiers)
19071 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
19072 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
19075 decl->__anon1.inst = inst;
19079 for(subType = type; subType; )
19081 if(subType->kind == 8)
19086 else if(subType->kind == 13)
19088 else if(subType->kind == 12)
19089 subType = subType->__anon1.__anon4.arrayType;
19098 if(decl->__anon1.__anon1.specifiers)
19100 struct Specifier * s;
19102 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
19104 ProcessSpecifier(s, declareStruct);
19111 ProcessInstantiationType(decl->__anon1.inst);
19116 struct Specifier * spec;
19117 struct Declarator * d;
19118 unsigned int declareStruct = 0;
19120 if(decl->__anon1.__anon1.declarators)
19122 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
19124 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
19125 struct Type * subType;
19127 ProcessDeclarator(d, 0);
19128 for(subType = type; subType; )
19130 if(subType->kind == 8)
19135 else if(subType->kind == 13)
19137 else if(subType->kind == 12)
19138 subType = subType->__anon1.__anon4.arrayType;
19145 if(decl->__anon1.__anon1.specifiers)
19147 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
19148 ProcessSpecifier(spec, declareStruct);
19155 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19157 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19159 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19160 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19161 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19162 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19163 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19164 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19165 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19166 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19167 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19168 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19169 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19170 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19171 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19172 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19173 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19174 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19175 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19176 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19177 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19178 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19179 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19180 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19181 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19182 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19183 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19184 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19185 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19186 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19187 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19188 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19189 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19190 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19191 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19192 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19193 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19194 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19195 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19196 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19197 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19198 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19199 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19200 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19201 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19202 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19203 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19204 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19205 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19206 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19207 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19208 __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);
19209 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19210 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19211 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19212 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19213 __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);
19214 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19215 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19216 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19217 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19218 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19219 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19220 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19221 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19222 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19223 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19228 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19229 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)
19230 __ecereClass_Conversion = class;
19231 __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);
19232 __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);
19233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19234 __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);
19235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19240 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19244 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19246 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19247 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19248 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19249 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19250 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19251 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19252 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19253 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19254 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19255 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19256 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);