1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
41 # define ecere_gcc_struct __attribute__((gcc_struct))
43 # define ecere_stdcall __stdcall
44 # define ecere_gcc_struct
47 # define ecere_stdcall
48 # define ecere_gcc_struct
51 #include <sys/types.h>
54 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
57 extern int returnCode;
59 extern unsigned int yydebug;
61 extern unsigned int echoOn;
67 int expression_yyparse();
69 static char * thisNameSpace;
71 unsigned int thisClassParams = 1;
73 unsigned int internalValueCounter;
75 extern unsigned int outputLineNumbers;
77 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
79 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
81 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
83 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
89 extern int targetBits;
91 extern unsigned int inCompiler;
93 extern unsigned int inPreCompiler;
95 extern unsigned int inDebugger;
97 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
99 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
101 int UnescapeString(char * d, char * s, int len)
106 while(j < len && (ch = s[j]))
111 switch((ch = s[++j]))
157 char * OffsetEscapedString(char * s, int len, int offset)
162 while(j < len && k < offset && (ch = s[j]))
168 return (k == offset) ? s + j : (((void *)0));
171 extern int __ecereVMethodID_class_OnGetString;
173 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
175 extern unsigned int parseError;
177 static int definedExpStackPos;
179 static void * definedExpStack[512];
181 extern const char * sourceFile;
183 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
185 extern unsigned int memoryGuard;
187 struct __ecereNameSpace__ecere__sys__OldList
196 struct __ecereNameSpace__ecere__com__DataValue
211 } ecere_gcc_struct __anon1;
214 struct __ecereNameSpace__ecere__com__SerialBuffer
216 unsigned char * _buffer;
222 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
224 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
226 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
228 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
230 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
238 struct TemplateArgument;
254 extern size_t strlen(const char * );
256 extern int strcmp(const char * , const char * );
258 extern int sprintf(char * , const char * , ...);
260 extern char * strcat(char * , const char * );
262 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
264 extern int isprint(int c);
266 extern char * strcpy(char * , const char * );
268 extern void Compiler_Error(const char * format, ...);
270 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
272 struct __ecereNameSpace__ecere__com__LinkList
279 extern char * strchr(const char * , int);
281 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
283 extern void * memcpy(void * , const void * , size_t size);
285 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
287 extern void Compiler_Warning(const char * format, ...);
289 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
291 extern long long strtoll(const char * nptr, char * * endptr, int base);
293 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
295 extern int strtol(const char * , char * * , int base);
297 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
299 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
301 extern double strtod(const char * , char * * );
303 extern int strncmp(const char * , const char * , size_t n);
305 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
307 extern char * QMkString(const char * source);
309 extern char * strncpy(char * , const char * , size_t n);
311 extern int printf(const char * , ...);
313 extern char * strstr(const char * , const char * );
315 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
317 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
319 extern int (* __ecereProp_float_Get_signBit)(float this);
321 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
323 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
325 extern int (* __ecereProp_double_Get_signBit)(double this);
327 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
329 extern float (* __ecereMethod_float_inf)(void);
331 extern float (* __ecereMethod_float_nan)(void);
333 extern double (* __ecereMethod_double_inf)(void);
335 extern double (* __ecereMethod_double_nan)(void);
337 int __ecereVMethodID_class_OnGetString;
339 void SetYydebug(unsigned int b)
344 unsigned int GetParseError()
349 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
351 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
353 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
355 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
357 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
359 struct __ecereNameSpace__ecere__com__EnumClassData
361 struct __ecereNameSpace__ecere__sys__OldList values;
365 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
367 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
369 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
371 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
373 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
375 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
377 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
379 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
383 struct CodePosition start;
384 struct CodePosition end;
387 void ReadString(char * output, char * string)
389 int len = strlen(string);
391 unsigned int quoted = 0, escaped = 0;
393 for(c = 0; c < len; c++)
453 char * PrintInt(long long result)
457 if(result > (((int)0x7fffffff)))
458 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
460 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
461 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
463 return __ecereNameSpace__ecere__sys__CopyString(temp);
466 char * PrintUInt(uint64 result)
470 if(result > (0xffffffff))
471 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
472 else if(result > (((int)0x7fffffff)))
473 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
475 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
476 return __ecereNameSpace__ecere__sys__CopyString(temp);
479 char * PrintInt64(long long result)
483 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
484 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
486 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
487 return __ecereNameSpace__ecere__sys__CopyString(temp);
490 char * PrintUInt64(uint64 result)
494 if(result > (0xffffffff))
495 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
496 else if(result > (((int)0x7fffffff)))
497 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
499 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
500 return __ecereNameSpace__ecere__sys__CopyString(temp);
503 char * PrintHexUInt(uint64 result)
507 if(result > (0xffffffff))
508 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
510 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
511 if(result > (0xffffffff))
513 return __ecereNameSpace__ecere__sys__CopyString(temp);
516 char * PrintHexUInt64(uint64 result)
520 if(result > (0xffffffff))
521 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
523 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
524 return __ecereNameSpace__ecere__sys__CopyString(temp);
527 char * PrintShort(short result)
531 sprintf(temp, "%d", (unsigned short)result);
532 return __ecereNameSpace__ecere__sys__CopyString(temp);
535 char * PrintUShort(unsigned short result)
539 if(result > (unsigned short)32767)
540 sprintf(temp, "0x%X", (int)result);
542 sprintf(temp, "%d", (int)result);
543 return __ecereNameSpace__ecere__sys__CopyString(temp);
546 char * PrintUChar(unsigned char result)
550 sprintf(temp, "0x%X", result);
551 return __ecereNameSpace__ecere__sys__CopyString(temp);
554 char * PrintChar(char result)
558 if(result > (char)0 && isprint(result))
559 sprintf(temp, "'%c'", result);
560 else if(result < (char)0)
561 sprintf(temp, "%d", (int)result);
563 sprintf(temp, "0x%X", (unsigned char)result);
564 return __ecereNameSpace__ecere__sys__CopyString(temp);
567 char * PrintFloat(float result)
571 if(__ecereProp_float_Get_isInf(result))
573 if(__ecereProp_float_Get_signBit(result))
574 strcpy(temp, "-inf");
578 else if(__ecereProp_float_Get_isNan(result))
580 if(__ecereProp_float_Get_signBit(result))
581 strcpy(temp, "-nan");
586 sprintf(temp, "%.16ff", result);
587 return __ecereNameSpace__ecere__sys__CopyString(temp);
590 char * PrintDouble(double result)
594 if(__ecereProp_double_Get_isInf(result))
596 if(__ecereProp_double_Get_signBit(result))
597 strcpy(temp, "-inf");
601 else if(__ecereProp_double_Get_isNan(result))
603 if(__ecereProp_double_Get_signBit(result))
604 strcpy(temp, "-nan");
609 sprintf(temp, "%.16f", result);
610 return __ecereNameSpace__ecere__sys__CopyString(temp);
613 extern struct Location yylloc;
622 struct Attrib * attr;
623 } ecere_gcc_struct __anon1;
626 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
630 extern struct Expression * parsedExpression;
632 extern struct Expression * QMkExpId(const char * id);
634 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
636 void ComputeExpression(struct Expression * exp);
638 extern struct Expression * MkExpConstant(const char * string);
640 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
642 extern void FreeExpression(struct Expression * exp);
644 extern void FreeExpContents(struct Expression * exp);
646 extern struct Expression * CopyExpression(struct Expression * exp);
648 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
650 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
652 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
654 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
656 extern struct Expression * MoveExpContents(struct Expression * exp);
658 extern struct Expression * QBrackets(struct Expression * exp);
660 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
664 static struct Statement * curCompound;
666 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
668 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
670 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
672 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
674 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
676 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
680 struct External * curExternal, * afterExternal;
682 extern void FreeExternal(struct External * external);
686 static struct Type * curSwitchType;
688 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
690 extern void FreeType(struct Type * type);
692 extern struct Type * MkClassType(const char * name);
694 extern void CopyTypeInto(struct Type * type, struct Type * src);
696 struct __ecereNameSpace__ecere__com__Class;
698 struct __ecereNameSpace__ecere__com__Instance
701 struct __ecereNameSpace__ecere__com__Class * _class;
705 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
707 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
709 static struct __ecereNameSpace__ecere__com__Class * currentClass;
711 struct __ecereNameSpace__ecere__com__Class * thisClass;
713 struct __ecereNameSpace__ecere__com__Class * containerClass;
715 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
717 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
719 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
721 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
723 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
725 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
727 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
729 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
733 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
735 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
737 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
742 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
749 extern struct Context * curContext;
751 extern struct Context * topContext;
753 extern struct Context * PushContext(void);
755 extern void PopContext(struct Context * ctx);
757 extern void FreeContext(struct Context * context);
759 extern struct Context * globalContext;
763 extern struct ModuleImport * mainModule;
767 struct ModuleImport * prev;
768 struct ModuleImport * next;
770 struct __ecereNameSpace__ecere__sys__OldList classes;
771 struct __ecereNameSpace__ecere__sys__OldList functions;
776 struct __ecereNameSpace__ecere__com__NameSpace;
778 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
780 struct FunctionDefinition;
782 static struct FunctionDefinition * curFunction;
784 struct __ecereNameSpace__ecere__sys__BTNode;
786 struct __ecereNameSpace__ecere__sys__BTNode
789 struct __ecereNameSpace__ecere__sys__BTNode * parent;
790 struct __ecereNameSpace__ecere__sys__BTNode * left;
791 struct __ecereNameSpace__ecere__sys__BTNode * right;
795 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
797 struct __ecereNameSpace__ecere__com__Property;
799 struct __ecereNameSpace__ecere__com__Property
801 struct __ecereNameSpace__ecere__com__Property * prev;
802 struct __ecereNameSpace__ecere__com__Property * next;
804 unsigned int isProperty;
807 struct __ecereNameSpace__ecere__com__Class * _class;
808 const char * dataTypeString;
809 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
810 struct Type * dataType;
811 void (* Set)(void * , int);
812 int (* Get)(void * );
813 unsigned int (* IsSet)(void * );
817 unsigned int conversion;
818 unsigned int watcherOffset;
819 const char * category;
820 unsigned int compiled;
821 unsigned int selfWatchable;
822 unsigned int isWatchable;
825 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
827 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);
829 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
831 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
835 extern void FreeIdentifier(struct Identifier * id);
837 extern struct Identifier * MkIdentifier(const char * string);
839 extern struct Expression * MkExpIdentifier(struct Identifier * id);
841 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
843 extern struct Identifier * CopyIdentifier(struct Identifier * id);
845 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
847 struct __ecereNameSpace__ecere__sys__OldLink;
849 struct __ecereNameSpace__ecere__sys__OldLink
851 struct __ecereNameSpace__ecere__sys__OldLink * prev;
852 struct __ecereNameSpace__ecere__sys__OldLink * next;
858 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
860 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
864 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
866 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
868 extern struct Specifier * MkSpecifier(int specifier);
870 extern struct Specifier * MkSpecifierName(const char * name);
872 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
874 extern void FreeSpecifier(struct Specifier * spec);
876 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
880 struct Statement * prev;
881 struct Statement * next;
886 struct __ecereNameSpace__ecere__sys__OldList * expressions;
889 struct Identifier * id;
890 struct Statement * stmt;
891 } ecere_gcc_struct labeled;
894 struct Expression * exp;
895 struct Statement * stmt;
896 } ecere_gcc_struct caseStmt;
899 struct __ecereNameSpace__ecere__sys__OldList * declarations;
900 struct __ecereNameSpace__ecere__sys__OldList * statements;
901 struct Context * context;
902 unsigned int isSwitch;
903 } ecere_gcc_struct compound;
906 struct __ecereNameSpace__ecere__sys__OldList * exp;
907 struct Statement * stmt;
908 struct Statement * elseStmt;
909 } ecere_gcc_struct ifStmt;
912 struct __ecereNameSpace__ecere__sys__OldList * exp;
913 struct Statement * stmt;
914 } ecere_gcc_struct switchStmt;
917 struct __ecereNameSpace__ecere__sys__OldList * exp;
918 struct Statement * stmt;
919 } ecere_gcc_struct whileStmt;
922 struct __ecereNameSpace__ecere__sys__OldList * exp;
923 struct Statement * stmt;
924 } ecere_gcc_struct doWhile;
927 struct Statement * init;
928 struct Statement * check;
929 struct __ecereNameSpace__ecere__sys__OldList * increment;
930 struct Statement * stmt;
931 } ecere_gcc_struct forStmt;
934 struct Identifier * id;
935 } ecere_gcc_struct gotoStmt;
938 struct Specifier * spec;
940 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
941 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
942 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
943 } ecere_gcc_struct asmStmt;
946 struct Expression * watcher;
947 struct Expression * object;
948 struct __ecereNameSpace__ecere__sys__OldList * watches;
949 } ecere_gcc_struct _watch;
952 struct Identifier * id;
953 struct __ecereNameSpace__ecere__sys__OldList * exp;
954 struct __ecereNameSpace__ecere__sys__OldList * filter;
955 struct Statement * stmt;
956 } ecere_gcc_struct forEachStmt;
957 struct Declaration * decl;
958 } ecere_gcc_struct __anon1;
961 extern struct Specifier * CopySpecifier(struct Specifier * spec);
963 extern struct Expression * MkExpClassSize(struct Specifier * _class);
969 struct Identifier * prev;
970 struct Identifier * next;
972 struct Symbol * classSym;
973 struct Specifier * _class;
975 struct Identifier * badID;
978 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
980 extern struct Symbol * FindClass(const char * name);
982 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
984 extern struct Symbol * FindType(struct Context * ctx, const char * name);
986 extern void FreeSymbol(struct Symbol * symbol);
990 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
992 extern void FreeClassDef(struct ClassDef * def);
996 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
998 struct TemplateDatatype
1000 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1001 struct Declarator * decl;
1004 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1006 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1008 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1010 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1012 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1016 struct Declarator * prev;
1017 struct Declarator * next;
1018 struct Location loc;
1020 struct Symbol * symbol;
1021 struct Declarator * declarator;
1024 struct Identifier * identifier;
1027 struct Expression * exp;
1028 struct Expression * posExp;
1029 struct Attrib * attrib;
1030 } ecere_gcc_struct structDecl;
1033 struct Expression * exp;
1034 struct Specifier * enumClass;
1035 } ecere_gcc_struct array;
1038 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1039 } ecere_gcc_struct function;
1042 struct Pointer * pointer;
1043 } ecere_gcc_struct pointer;
1046 struct ExtDecl * extended;
1047 } ecere_gcc_struct extended;
1048 } ecere_gcc_struct __anon1;
1051 extern struct Identifier * GetDeclId(struct Declarator * decl);
1053 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1055 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1057 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1059 extern void FreeDeclarator(struct Declarator * decl);
1061 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1063 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1065 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1067 struct FunctionDefinition
1069 struct FunctionDefinition * prev;
1070 struct FunctionDefinition * next;
1071 struct Location loc;
1072 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1073 struct Declarator * declarator;
1074 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1075 struct Statement * body;
1076 struct __ecereNameSpace__ecere__com__Class * _class;
1077 struct __ecereNameSpace__ecere__sys__OldList attached;
1080 struct Symbol * propSet;
1082 unsigned int propertyNoThis;
1085 extern struct Declarator * QMkPtrDecl(const char * id);
1087 struct ClassFunction;
1089 struct ClassFunction
1091 struct ClassFunction * prev;
1092 struct ClassFunction * next;
1093 struct Location loc;
1094 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1095 struct Declarator * declarator;
1096 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1097 struct Statement * body;
1098 struct __ecereNameSpace__ecere__com__Class * _class;
1099 struct __ecereNameSpace__ecere__sys__OldList attached;
1102 struct Symbol * propSet;
1103 unsigned int isVirtual;
1104 unsigned int isConstructor;
1105 unsigned int isDestructor;
1106 unsigned int dontMangle;
1111 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);
1113 extern void FreeClassFunction(struct ClassFunction * func);
1115 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1117 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1121 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1123 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1127 struct TypeName * prev;
1128 struct TypeName * next;
1129 struct Location loc;
1130 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1131 struct Declarator * declarator;
1132 int classObjectType;
1133 struct Expression * bitCount;
1136 extern void FreeTypeName(struct TypeName * typeName);
1138 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1140 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1142 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1144 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1146 struct __ecereNameSpace__ecere__com__BTNamedLink;
1148 struct __ecereNameSpace__ecere__com__BTNamedLink
1151 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1152 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1153 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1158 struct __ecereNameSpace__ecere__sys__NamedLink64;
1160 struct __ecereNameSpace__ecere__sys__NamedLink64
1162 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1163 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1168 struct Instantiation;
1172 struct Declaration * prev;
1173 struct Declaration * next;
1174 struct Location loc;
1180 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1181 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1182 } ecere_gcc_struct __anon1;
1183 struct Instantiation * inst;
1186 struct Identifier * id;
1187 struct Expression * exp;
1188 } ecere_gcc_struct __anon2;
1189 } ecere_gcc_struct __anon1;
1190 struct Specifier * extStorage;
1191 struct Symbol * symbol;
1195 struct Instantiation
1197 struct Instantiation * prev;
1198 struct Instantiation * next;
1199 struct Location loc;
1200 struct Specifier * _class;
1201 struct Expression * exp;
1202 struct __ecereNameSpace__ecere__sys__OldList * members;
1203 struct Symbol * symbol;
1204 unsigned int fullSet;
1205 unsigned int isConstant;
1206 unsigned char * data;
1207 struct Location nameLoc;
1208 struct Location insideLoc;
1212 extern void FreeInstance(struct Instantiation * inst);
1214 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1216 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1218 struct InitDeclarator;
1220 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1222 struct PropertyWatch;
1224 struct PropertyWatch
1226 struct PropertyWatch * prev;
1227 struct PropertyWatch * next;
1228 struct Location loc;
1229 struct Statement * compound;
1230 struct __ecereNameSpace__ecere__sys__OldList * properties;
1231 unsigned int deleteWatch;
1234 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1236 struct PropertyImport;
1238 struct PropertyImport
1240 struct PropertyImport * prev;
1241 struct PropertyImport * next;
1243 unsigned int isVirtual;
1244 unsigned int hasSet;
1245 unsigned int hasGet;
1248 struct MethodImport;
1252 struct MethodImport * prev;
1253 struct MethodImport * next;
1255 unsigned int isVirtual;
1258 struct FunctionImport;
1260 struct FunctionImport
1262 struct FunctionImport * prev;
1263 struct FunctionImport * next;
1271 struct ClassImport * prev;
1272 struct ClassImport * next;
1274 struct __ecereNameSpace__ecere__sys__OldList methods;
1275 struct __ecereNameSpace__ecere__sys__OldList properties;
1276 unsigned int itself;
1284 struct Expression * prev;
1285 struct Expression * next;
1286 struct Location loc;
1293 struct Identifier * identifier;
1294 } ecere_gcc_struct __anon1;
1295 struct Statement * compound;
1296 struct Instantiation * instance;
1300 unsigned int intlString;
1301 unsigned int wideString;
1302 } ecere_gcc_struct __anon2;
1303 struct __ecereNameSpace__ecere__sys__OldList * list;
1306 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1307 struct Declarator * decl;
1308 } ecere_gcc_struct _classExp;
1311 struct Identifier * id;
1312 } ecere_gcc_struct classData;
1315 struct Expression * exp;
1316 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1317 struct Location argLoc;
1318 } ecere_gcc_struct call;
1321 struct Expression * exp;
1322 struct __ecereNameSpace__ecere__sys__OldList * index;
1323 } ecere_gcc_struct index;
1326 struct Expression * exp;
1327 struct Identifier * member;
1329 unsigned int thisPtr;
1330 } ecere_gcc_struct member;
1334 struct Expression * exp1;
1335 struct Expression * exp2;
1336 } ecere_gcc_struct op;
1337 struct TypeName * typeName;
1338 struct Specifier * _class;
1341 struct TypeName * typeName;
1342 struct Expression * exp;
1343 } ecere_gcc_struct cast;
1346 struct Expression * cond;
1347 struct __ecereNameSpace__ecere__sys__OldList * exp;
1348 struct Expression * elseExp;
1349 } ecere_gcc_struct cond;
1352 struct TypeName * typeName;
1353 struct Expression * size;
1354 } ecere_gcc_struct _new;
1357 struct TypeName * typeName;
1358 struct Expression * size;
1359 struct Expression * exp;
1360 } ecere_gcc_struct _renew;
1364 struct Identifier * id;
1365 } ecere_gcc_struct db;
1368 struct Expression * ds;
1369 struct Expression * name;
1370 } ecere_gcc_struct dbopen;
1373 struct TypeName * typeName;
1374 struct Initializer * initializer;
1375 } ecere_gcc_struct initializer;
1378 struct Expression * exp;
1379 struct TypeName * typeName;
1380 } ecere_gcc_struct vaArg;
1381 } ecere_gcc_struct __anon1;
1382 unsigned int debugValue;
1383 struct __ecereNameSpace__ecere__com__DataValue val;
1385 unsigned int hasAddress;
1386 struct Type * expType;
1387 struct Type * destType;
1390 unsigned int byReference;
1391 unsigned int isConstant;
1392 unsigned int addedThis;
1393 unsigned int needCast;
1394 unsigned int thisPtr;
1395 unsigned int opDestType;
1396 unsigned int needTemplateCast;
1399 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1403 struct Initializer * prev;
1404 struct Initializer * next;
1405 struct Location loc;
1409 struct Expression * exp;
1410 struct __ecereNameSpace__ecere__sys__OldList * list;
1411 } ecere_gcc_struct __anon1;
1412 unsigned int isConstant;
1413 struct Identifier * id;
1416 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1418 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1420 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1422 struct InitDeclarator
1424 struct InitDeclarator * prev;
1425 struct InitDeclarator * next;
1426 struct Location loc;
1427 struct Declarator * declarator;
1428 struct Initializer * initializer;
1431 void ApplyLocation(struct Expression * exp, struct Location * loc)
1437 if(exp->__anon1.op.exp1)
1438 ApplyLocation(exp->__anon1.op.exp1, loc);
1439 if(exp->__anon1.op.exp2)
1440 ApplyLocation(exp->__anon1.op.exp2, loc);
1443 if(exp->__anon1.list)
1445 struct Expression * e;
1447 for(e = (*exp->__anon1.list).first; e; e = e->next)
1448 ApplyLocation(e, loc);
1452 if(exp->__anon1.index.index)
1454 struct Expression * e;
1456 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1457 ApplyLocation(e, loc);
1459 if(exp->__anon1.index.exp)
1460 ApplyLocation(exp->__anon1.index.exp, loc);
1463 if(exp->__anon1.call.arguments)
1465 struct Expression * arg;
1467 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1468 ApplyLocation(arg, loc);
1470 if(exp->__anon1.call.exp)
1471 ApplyLocation(exp->__anon1.call.exp, loc);
1475 if(exp->__anon1.member.exp)
1476 ApplyLocation(exp->__anon1.member.exp, loc);
1479 if(exp->__anon1.cast.exp)
1480 ApplyLocation(exp->__anon1.cast.exp, loc);
1483 if(exp->__anon1.cond.exp)
1485 struct Expression * e;
1487 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1488 ApplyLocation(e, loc);
1490 if(exp->__anon1.cond.cond)
1491 ApplyLocation(exp->__anon1.cond.cond, loc);
1492 if(exp->__anon1.cond.elseExp)
1493 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1496 if(exp->__anon1.vaArg.exp)
1497 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1504 void __ecereMethod_Expression_Clear();
1510 struct MembersInit * prev;
1511 struct MembersInit * next;
1512 struct Location loc;
1516 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1517 struct ClassFunction * function;
1518 } ecere_gcc_struct __anon1;
1521 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1527 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1528 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1529 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1530 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1531 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1532 unsigned int (* Neg)(struct Expression *, struct Operand *);
1533 unsigned int (* Inc)(struct Expression *, struct Operand *);
1534 unsigned int (* Dec)(struct Expression *, struct Operand *);
1535 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1537 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1543 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1547 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* Not)(struct Expression *, struct Operand *);
1553 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1554 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1555 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1557 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1559 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1560 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1561 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1568 unsigned int ptrSize;
1581 } ecere_gcc_struct __anon1;
1585 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1587 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1589 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1592 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1594 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1596 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1599 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1601 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1604 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1606 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1608 _PrintType(type, string, printName, fullName, 1);
1611 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1613 _PrintType(type, string, printName, fullName, 0);
1616 struct __ecereNameSpace__ecere__com__Method;
1618 struct __ecereNameSpace__ecere__com__Method
1621 struct __ecereNameSpace__ecere__com__Method * parent;
1622 struct __ecereNameSpace__ecere__com__Method * left;
1623 struct __ecereNameSpace__ecere__com__Method * right;
1628 struct __ecereNameSpace__ecere__com__Class * _class;
1630 const char * dataTypeString;
1631 struct Type * dataType;
1638 struct Symbol * parent;
1639 struct Symbol * left;
1640 struct Symbol * right;
1645 struct __ecereNameSpace__ecere__com__Method * method;
1646 struct __ecereNameSpace__ecere__com__Property * _property;
1647 struct __ecereNameSpace__ecere__com__Class * registered;
1648 } ecere_gcc_struct __anon1;
1649 unsigned int notYetDeclared;
1654 struct External * pointerExternal;
1655 struct External * structExternal;
1656 } ecere_gcc_struct __anon1;
1659 struct External * externalGet;
1660 struct External * externalSet;
1661 struct External * externalPtr;
1662 struct External * externalIsSet;
1663 } ecere_gcc_struct __anon2;
1666 struct External * methodExternal;
1667 struct External * methodCodeExternal;
1668 } ecere_gcc_struct __anon3;
1669 } ecere_gcc_struct __anon2;
1670 unsigned int imported;
1671 unsigned int declaredStructSym;
1672 struct __ecereNameSpace__ecere__com__Class * _class;
1673 unsigned int declaredStruct;
1674 unsigned int needConstructor;
1675 unsigned int needDestructor;
1676 char * constructorName;
1679 char * destructorName;
1680 struct ModuleImport * module;
1681 struct ClassImport * _import;
1682 struct Location nameLoc;
1683 unsigned int isParam;
1684 unsigned int isRemote;
1685 unsigned int isStruct;
1686 unsigned int fireWatchersDone;
1688 unsigned int classData;
1689 unsigned int isStatic;
1691 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1692 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1693 struct Context * ctx;
1695 struct Expression * propCategory;
1696 unsigned int mustRegister;
1699 struct __ecereNameSpace__ecere__com__ClassProperty;
1701 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1703 struct __ecereNameSpace__ecere__com__ClassProperty
1706 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1707 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1708 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1710 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1711 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1712 const char * dataTypeString;
1713 struct Type * dataType;
1714 unsigned int constant;
1717 struct __ecereNameSpace__ecere__com__BitMember;
1719 struct __ecereNameSpace__ecere__com__BitMember
1721 struct __ecereNameSpace__ecere__com__BitMember * prev;
1722 struct __ecereNameSpace__ecere__com__BitMember * next;
1724 unsigned int isProperty;
1727 struct __ecereNameSpace__ecere__com__Class * _class;
1728 const char * dataTypeString;
1729 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1730 struct Type * dataType;
1737 struct __ecereNameSpace__ecere__com__DataMember;
1739 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1745 const char * dataTypeString;
1746 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1747 } ecere_gcc_struct __anon1;
1748 struct __ecereNameSpace__ecere__com__DataValue expression;
1751 const char * memberString;
1754 struct __ecereNameSpace__ecere__com__DataMember * member;
1755 struct __ecereNameSpace__ecere__com__Property * prop;
1756 struct __ecereNameSpace__ecere__com__Method * method;
1757 } ecere_gcc_struct __anon1;
1758 } ecere_gcc_struct __anon2;
1759 } ecere_gcc_struct __anon1;
1762 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);
1764 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);
1766 struct TemplateParameter;
1768 struct TemplateParameter
1770 struct TemplateParameter * prev;
1771 struct TemplateParameter * next;
1772 struct Location loc;
1774 struct Identifier * identifier;
1777 struct TemplateDatatype * dataType;
1779 } ecere_gcc_struct __anon1;
1780 struct TemplateArgument * defaultArgument;
1781 const char * dataTypeString;
1782 struct Type * baseType;
1792 struct Symbol * _class;
1795 struct __ecereNameSpace__ecere__sys__OldList members;
1797 } ecere_gcc_struct __anon1;
1800 struct Type * returnType;
1801 struct __ecereNameSpace__ecere__sys__OldList params;
1802 struct Symbol * thisClass;
1803 unsigned int staticMethod;
1804 struct TemplateParameter * thisClassTemplate;
1805 } ecere_gcc_struct __anon2;
1808 struct __ecereNameSpace__ecere__com__Method * method;
1809 struct __ecereNameSpace__ecere__com__Class * methodClass;
1810 struct __ecereNameSpace__ecere__com__Class * usedClass;
1811 } ecere_gcc_struct __anon3;
1814 struct Type * arrayType;
1816 struct Expression * arraySizeExp;
1817 unsigned int freeExp;
1818 struct Symbol * enumClass;
1819 } ecere_gcc_struct __anon4;
1821 struct TemplateParameter * templateParameter;
1822 } ecere_gcc_struct __anon1;
1827 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1828 int classObjectType;
1830 unsigned int offset;
1833 unsigned int isSigned : 1;
1834 unsigned int constant : 1;
1835 unsigned int truth : 1;
1836 unsigned int byReference : 1;
1837 unsigned int extraParam : 1;
1838 unsigned int directClassAccess : 1;
1839 unsigned int computing : 1;
1840 unsigned int keepCast : 1;
1841 unsigned int passAsTemplate : 1;
1842 unsigned int dllExport : 1;
1843 unsigned int attrStdcall : 1;
1844 unsigned int declaredWithStruct : 1;
1845 unsigned int typedByReference : 1;
1846 unsigned int casted : 1;
1847 unsigned int pointerAlignment : 1;
1848 unsigned int isLong : 1;
1853 struct Specifier * prev;
1854 struct Specifier * next;
1855 struct Location loc;
1862 struct ExtDecl * extDecl;
1864 struct Symbol * symbol;
1865 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1866 struct Specifier * nsSpec;
1867 } ecere_gcc_struct __anon1;
1870 struct Identifier * id;
1871 struct __ecereNameSpace__ecere__sys__OldList * list;
1872 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1873 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1874 unsigned int addNameSpace;
1875 struct Context * ctx;
1876 struct ExtDecl * extDeclStruct;
1877 } ecere_gcc_struct __anon2;
1878 struct Expression * expression;
1879 struct Specifier * _class;
1880 struct TemplateParameter * templateParameter;
1881 } ecere_gcc_struct __anon1;
1884 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1886 struct TemplatedType
1889 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1890 struct __ecereNameSpace__ecere__sys__BTNode * left;
1891 struct __ecereNameSpace__ecere__sys__BTNode * right;
1893 struct TemplateParameter * param;
1896 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1898 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1900 if(!param->baseType)
1902 if(param->dataTypeString)
1903 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1905 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1907 return param->baseType;
1909 return (((void *)0));
1912 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1914 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1916 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1920 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1931 if(type1->passAsTemplate && !type2->passAsTemplate)
1933 return type1->isSigned != type2->isSigned;
1935 return type1->__anon1._class != type2->__anon1._class;
1937 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1945 unsigned int GetOpInt(struct Operand * op2, int * value2)
1947 if(op2->kind == 3 && op2->type->isSigned)
1948 *value2 = op2->__anon1.i;
1949 else if(op2->kind == 3)
1950 *value2 = (int)op2->__anon1.ui;
1951 else if(op2->kind == 4 && op2->type->isSigned)
1952 *value2 = (int)op2->__anon1.i64;
1953 else if(op2->kind == 4)
1954 *value2 = (int)op2->__anon1.ui64;
1955 else if(op2->kind == 23 && op2->type->isSigned)
1956 *value2 = (int)op2->__anon1.i64;
1957 else if(op2->kind == 23)
1958 *value2 = (int)op2->__anon1.ui64;
1959 else if(op2->kind == 22 && op2->type->isSigned)
1960 *value2 = (int)op2->__anon1.i64;
1961 else if(op2->kind == 22)
1962 *value2 = (int)op2->__anon1.ui64;
1963 else if(op2->kind == 2 && op2->type->isSigned)
1964 *value2 = (int)op2->__anon1.s;
1965 else if(op2->kind == 2)
1966 *value2 = (int)op2->__anon1.us;
1967 else if(op2->kind == 1 && op2->type->isSigned)
1968 *value2 = (int)op2->__anon1.c;
1969 else if(op2->kind == 24 || op2->kind == 1)
1970 *value2 = (int)op2->__anon1.uc;
1971 else if(op2->kind == 6)
1972 *value2 = (int)op2->__anon1.f;
1973 else if(op2->kind == 7)
1974 *value2 = (int)op2->__anon1.d;
1975 else if(op2->kind == 13)
1976 *value2 = (int)op2->__anon1.ui64;
1982 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1984 if(op2->kind == 3 && op2->type->isSigned)
1985 *value2 = (unsigned int)op2->__anon1.i;
1986 else if(op2->kind == 3)
1987 *value2 = op2->__anon1.ui;
1988 else if(op2->kind == 4 && op2->type->isSigned)
1989 *value2 = (unsigned int)op2->__anon1.i64;
1990 else if(op2->kind == 4)
1991 *value2 = (unsigned int)op2->__anon1.ui64;
1992 else if(op2->kind == 23 && op2->type->isSigned)
1993 *value2 = (unsigned int)op2->__anon1.i64;
1994 else if(op2->kind == 23)
1995 *value2 = (unsigned int)op2->__anon1.ui64;
1996 else if(op2->kind == 22 && op2->type->isSigned)
1997 *value2 = (unsigned int)op2->__anon1.i64;
1998 else if(op2->kind == 22)
1999 *value2 = (unsigned int)op2->__anon1.ui64;
2000 else if(op2->kind == 2 && op2->type->isSigned)
2001 *value2 = (unsigned int)op2->__anon1.s;
2002 else if(op2->kind == 2)
2003 *value2 = (unsigned int)op2->__anon1.us;
2004 else if(op2->kind == 1 && op2->type->isSigned)
2005 *value2 = (unsigned int)op2->__anon1.c;
2006 else if(op2->kind == 24 || op2->kind == 1)
2007 *value2 = (unsigned int)op2->__anon1.uc;
2008 else if(op2->kind == 6)
2009 *value2 = (unsigned int)op2->__anon1.f;
2010 else if(op2->kind == 7)
2011 *value2 = (unsigned int)op2->__anon1.d;
2012 else if(op2->kind == 13)
2013 *value2 = (unsigned int)op2->__anon1.ui64;
2019 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2021 if(op2->kind == 3 && op2->type->isSigned)
2022 *value2 = (long long)op2->__anon1.i;
2023 else if(op2->kind == 3)
2024 *value2 = (long long)op2->__anon1.ui;
2025 else if(op2->kind == 4 && op2->type->isSigned)
2026 *value2 = op2->__anon1.i64;
2027 else if(op2->kind == 4)
2028 *value2 = (long long)op2->__anon1.ui64;
2029 else if(op2->kind == 23 && op2->type->isSigned)
2030 *value2 = op2->__anon1.i64;
2031 else if(op2->kind == 23)
2032 *value2 = (long long)op2->__anon1.ui64;
2033 else if(op2->kind == 22 && op2->type->isSigned)
2034 *value2 = op2->__anon1.i64;
2035 else if(op2->kind == 22)
2036 *value2 = (long long)op2->__anon1.ui64;
2037 else if(op2->kind == 2 && op2->type->isSigned)
2038 *value2 = (long long)op2->__anon1.s;
2039 else if(op2->kind == 2)
2040 *value2 = (long long)op2->__anon1.us;
2041 else if(op2->kind == 1 && op2->type->isSigned)
2042 *value2 = (long long)op2->__anon1.c;
2043 else if(op2->kind == 24 || op2->kind == 1)
2044 *value2 = (long long)op2->__anon1.uc;
2045 else if(op2->kind == 6)
2046 *value2 = (long long)op2->__anon1.f;
2047 else if(op2->kind == 7)
2048 *value2 = (long long)op2->__anon1.d;
2049 else if(op2->kind == 13)
2050 *value2 = (long long)op2->__anon1.ui64;
2056 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2058 if(op2->kind == 3 && op2->type->isSigned)
2059 *value2 = (uint64)op2->__anon1.i;
2060 else if(op2->kind == 3)
2061 *value2 = (uint64)op2->__anon1.ui;
2062 else if(op2->kind == 4 && op2->type->isSigned)
2063 *value2 = (uint64)op2->__anon1.i64;
2064 else if(op2->kind == 4)
2065 *value2 = op2->__anon1.ui64;
2066 else if(op2->kind == 23 && op2->type->isSigned)
2067 *value2 = (uint64)op2->__anon1.i64;
2068 else if(op2->kind == 23)
2069 *value2 = op2->__anon1.ui64;
2070 else if(op2->kind == 22 && op2->type->isSigned)
2071 *value2 = (uint64)op2->__anon1.i64;
2072 else if(op2->kind == 22)
2073 *value2 = op2->__anon1.ui64;
2074 else if(op2->kind == 2 && op2->type->isSigned)
2075 *value2 = (uint64)op2->__anon1.s;
2076 else if(op2->kind == 2)
2077 *value2 = (uint64)op2->__anon1.us;
2078 else if(op2->kind == 1 && op2->type->isSigned)
2079 *value2 = (uint64)op2->__anon1.c;
2080 else if(op2->kind == 24 || op2->kind == 1)
2081 *value2 = (uint64)op2->__anon1.uc;
2082 else if(op2->kind == 6)
2083 *value2 = (uint64)op2->__anon1.f;
2084 else if(op2->kind == 7)
2085 *value2 = (uint64)op2->__anon1.d;
2086 else if(op2->kind == 13)
2087 *value2 = op2->__anon1.ui64;
2093 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2095 if(op2->kind == 3 && op2->type->isSigned)
2096 *value2 = (intptr_t)op2->__anon1.i;
2097 else if(op2->kind == 3)
2098 *value2 = (intptr_t)op2->__anon1.ui;
2099 else if(op2->kind == 4 && op2->type->isSigned)
2100 *value2 = (intptr_t)op2->__anon1.i64;
2101 else if(op2->kind == 4)
2102 *value2 = (intptr_t)op2->__anon1.ui64;
2103 else if(op2->kind == 23 && op2->type->isSigned)
2104 *value2 = (intptr_t)op2->__anon1.i64;
2105 else if(op2->kind == 23)
2106 *value2 = (intptr_t)op2->__anon1.ui64;
2107 else if(op2->kind == 22 && op2->type->isSigned)
2108 *value2 = (intptr_t)op2->__anon1.i64;
2109 else if(op2->kind == 22)
2110 *value2 = (intptr_t)op2->__anon1.ui64;
2111 else if(op2->kind == 2 && op2->type->isSigned)
2112 *value2 = (intptr_t)op2->__anon1.s;
2113 else if(op2->kind == 2)
2114 *value2 = (intptr_t)op2->__anon1.us;
2115 else if(op2->kind == 1 && op2->type->isSigned)
2116 *value2 = (intptr_t)op2->__anon1.c;
2117 else if(op2->kind == 24 || op2->kind == 1)
2118 *value2 = (intptr_t)op2->__anon1.uc;
2119 else if(op2->kind == 6)
2120 *value2 = (intptr_t)op2->__anon1.f;
2121 else if(op2->kind == 7)
2122 *value2 = (intptr_t)op2->__anon1.d;
2123 else if(op2->kind == 13)
2124 *value2 = (intptr_t)op2->__anon1.ui64;
2130 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2132 if(op2->kind == 3 && op2->type->isSigned)
2133 *value2 = (uintptr_t)op2->__anon1.i;
2134 else if(op2->kind == 3)
2135 *value2 = (uintptr_t)op2->__anon1.ui;
2136 else if(op2->kind == 4 && op2->type->isSigned)
2137 *value2 = (uintptr_t)op2->__anon1.i64;
2138 else if(op2->kind == 4)
2139 *value2 = (uintptr_t)op2->__anon1.ui64;
2140 else if(op2->kind == 23 && op2->type->isSigned)
2141 *value2 = (uintptr_t)op2->__anon1.i64;
2142 else if(op2->kind == 23)
2143 *value2 = (uintptr_t)op2->__anon1.ui64;
2144 else if(op2->kind == 22 && op2->type->isSigned)
2145 *value2 = (uintptr_t)op2->__anon1.i64;
2146 else if(op2->kind == 22)
2147 *value2 = (uintptr_t)op2->__anon1.ui64;
2148 else if(op2->kind == 2 && op2->type->isSigned)
2149 *value2 = (uintptr_t)op2->__anon1.s;
2150 else if(op2->kind == 2)
2151 *value2 = (uintptr_t)op2->__anon1.us;
2152 else if(op2->kind == 1 && op2->type->isSigned)
2153 *value2 = (uintptr_t)op2->__anon1.c;
2154 else if(op2->kind == 24 || op2->kind == 1)
2155 *value2 = (uintptr_t)op2->__anon1.uc;
2156 else if(op2->kind == 6)
2157 *value2 = (uintptr_t)op2->__anon1.f;
2158 else if(op2->kind == 7)
2159 *value2 = (uintptr_t)op2->__anon1.d;
2160 else if(op2->kind == 13)
2161 *value2 = (uintptr_t)op2->__anon1.ui64;
2167 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2169 if(op2->kind == 3 && op2->type->isSigned)
2170 *value2 = (ssize_t)op2->__anon1.i;
2171 else if(op2->kind == 3)
2172 *value2 = (ssize_t)op2->__anon1.ui;
2173 else if(op2->kind == 4 && op2->type->isSigned)
2174 *value2 = (ssize_t)op2->__anon1.i64;
2175 else if(op2->kind == 4)
2176 *value2 = (ssize_t)op2->__anon1.ui64;
2177 else if(op2->kind == 23 && op2->type->isSigned)
2178 *value2 = (ssize_t)op2->__anon1.i64;
2179 else if(op2->kind == 23)
2180 *value2 = (ssize_t)op2->__anon1.ui64;
2181 else if(op2->kind == 22 && op2->type->isSigned)
2182 *value2 = (ssize_t)op2->__anon1.i64;
2183 else if(op2->kind == 22)
2184 *value2 = (ssize_t)op2->__anon1.ui64;
2185 else if(op2->kind == 2 && op2->type->isSigned)
2186 *value2 = (ssize_t)op2->__anon1.s;
2187 else if(op2->kind == 2)
2188 *value2 = (ssize_t)op2->__anon1.us;
2189 else if(op2->kind == 1 && op2->type->isSigned)
2190 *value2 = (ssize_t)op2->__anon1.c;
2191 else if(op2->kind == 24 || op2->kind == 1)
2192 *value2 = (ssize_t)op2->__anon1.uc;
2193 else if(op2->kind == 6)
2194 *value2 = (ssize_t)op2->__anon1.f;
2195 else if(op2->kind == 7)
2196 *value2 = (ssize_t)op2->__anon1.d;
2197 else if(op2->kind == 13)
2198 *value2 = (ssize_t)op2->__anon1.ui64;
2204 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2206 if(op2->kind == 3 && op2->type->isSigned)
2207 *value2 = (size_t)op2->__anon1.i;
2208 else if(op2->kind == 3)
2209 *value2 = (size_t)op2->__anon1.ui;
2210 else if(op2->kind == 4 && op2->type->isSigned)
2211 *value2 = (size_t)op2->__anon1.i64;
2212 else if(op2->kind == 4)
2213 *value2 = (size_t)op2->__anon1.ui64;
2214 else if(op2->kind == 23 && op2->type->isSigned)
2215 *value2 = (size_t)op2->__anon1.i64;
2216 else if(op2->kind == 23)
2217 *value2 = (size_t)op2->__anon1.ui64;
2218 else if(op2->kind == 22 && op2->type->isSigned)
2219 *value2 = (size_t)op2->__anon1.i64;
2220 else if(op2->kind == 22)
2221 *value2 = (size_t)op2->__anon1.ui64;
2222 else if(op2->kind == 2 && op2->type->isSigned)
2223 *value2 = (size_t)op2->__anon1.s;
2224 else if(op2->kind == 2)
2225 *value2 = (size_t)op2->__anon1.us;
2226 else if(op2->kind == 1 && op2->type->isSigned)
2227 *value2 = (size_t)op2->__anon1.c;
2228 else if(op2->kind == 24 || op2->kind == 1)
2229 *value2 = (size_t)op2->__anon1.uc;
2230 else if(op2->kind == 6)
2231 *value2 = (size_t)op2->__anon1.f;
2232 else if(op2->kind == 7)
2233 *value2 = (size_t)op2->__anon1.d;
2234 else if(op2->kind == 13)
2235 *value2 = (size_t)op2->__anon1.ui64;
2241 unsigned int GetOpShort(struct Operand * op2, short * value2)
2243 if(op2->kind == 3 && op2->type->isSigned)
2244 *value2 = (short)op2->__anon1.i;
2245 else if(op2->kind == 3)
2246 *value2 = (short)op2->__anon1.ui;
2247 else if(op2->kind == 4 && op2->type->isSigned)
2248 *value2 = (short)op2->__anon1.i64;
2249 else if(op2->kind == 4)
2250 *value2 = (short)op2->__anon1.ui64;
2251 else if(op2->kind == 23 && op2->type->isSigned)
2252 *value2 = (short)op2->__anon1.i64;
2253 else if(op2->kind == 23)
2254 *value2 = (short)op2->__anon1.ui64;
2255 else if(op2->kind == 22 && op2->type->isSigned)
2256 *value2 = (short)op2->__anon1.i64;
2257 else if(op2->kind == 22)
2258 *value2 = (short)op2->__anon1.ui64;
2259 else if(op2->kind == 2 && op2->type->isSigned)
2260 *value2 = op2->__anon1.s;
2261 else if(op2->kind == 2)
2262 *value2 = (short)op2->__anon1.us;
2263 else if(op2->kind == 1 && op2->type->isSigned)
2264 *value2 = (short)op2->__anon1.c;
2265 else if(op2->kind == 24 || op2->kind == 1)
2266 *value2 = (short)op2->__anon1.uc;
2267 else if(op2->kind == 6)
2268 *value2 = (short)op2->__anon1.f;
2269 else if(op2->kind == 7)
2270 *value2 = (short)op2->__anon1.d;
2271 else if(op2->kind == 13)
2272 *value2 = (short)op2->__anon1.ui64;
2278 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2280 if(op2->kind == 3 && op2->type->isSigned)
2281 *value2 = (unsigned short)op2->__anon1.i;
2282 else if(op2->kind == 3)
2283 *value2 = (unsigned short)op2->__anon1.ui;
2284 else if(op2->kind == 4 && op2->type->isSigned)
2285 *value2 = (unsigned short)op2->__anon1.i64;
2286 else if(op2->kind == 4)
2287 *value2 = (unsigned short)op2->__anon1.ui64;
2288 else if(op2->kind == 23 && op2->type->isSigned)
2289 *value2 = (unsigned short)op2->__anon1.i64;
2290 else if(op2->kind == 23)
2291 *value2 = (unsigned short)op2->__anon1.ui64;
2292 else if(op2->kind == 22 && op2->type->isSigned)
2293 *value2 = (unsigned short)op2->__anon1.i64;
2294 else if(op2->kind == 22)
2295 *value2 = (unsigned short)op2->__anon1.ui64;
2296 else if(op2->kind == 2 && op2->type->isSigned)
2297 *value2 = (unsigned short)op2->__anon1.s;
2298 else if(op2->kind == 2)
2299 *value2 = op2->__anon1.us;
2300 else if(op2->kind == 1 && op2->type->isSigned)
2301 *value2 = (unsigned short)op2->__anon1.c;
2302 else if(op2->kind == 24 || op2->kind == 1)
2303 *value2 = (unsigned short)op2->__anon1.uc;
2304 else if(op2->kind == 6)
2305 *value2 = (unsigned short)op2->__anon1.f;
2306 else if(op2->kind == 7)
2307 *value2 = (unsigned short)op2->__anon1.d;
2308 else if(op2->kind == 13)
2309 *value2 = (unsigned short)op2->__anon1.ui64;
2315 unsigned int GetOpChar(struct Operand * op2, char * value2)
2317 if(op2->kind == 3 && op2->type->isSigned)
2318 *value2 = (char)op2->__anon1.i;
2319 else if(op2->kind == 3)
2320 *value2 = (char)op2->__anon1.ui;
2321 else if(op2->kind == 4 && op2->type->isSigned)
2322 *value2 = (char)op2->__anon1.i64;
2323 else if(op2->kind == 4)
2324 *value2 = (char)op2->__anon1.ui64;
2325 else if(op2->kind == 23 && op2->type->isSigned)
2326 *value2 = (char)op2->__anon1.i64;
2327 else if(op2->kind == 23)
2328 *value2 = (char)op2->__anon1.ui64;
2329 else if(op2->kind == 22 && op2->type->isSigned)
2330 *value2 = (char)op2->__anon1.i64;
2331 else if(op2->kind == 22)
2332 *value2 = (char)op2->__anon1.ui64;
2333 else if(op2->kind == 2 && op2->type->isSigned)
2334 *value2 = (char)op2->__anon1.s;
2335 else if(op2->kind == 2)
2336 *value2 = (char)op2->__anon1.us;
2337 else if(op2->kind == 1 && op2->type->isSigned)
2338 *value2 = op2->__anon1.c;
2339 else if(op2->kind == 24 || op2->kind == 1)
2340 *value2 = (char)op2->__anon1.uc;
2341 else if(op2->kind == 6)
2342 *value2 = (char)op2->__anon1.f;
2343 else if(op2->kind == 7)
2344 *value2 = (char)op2->__anon1.d;
2345 else if(op2->kind == 13)
2346 *value2 = (char)op2->__anon1.ui64;
2352 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2354 if(op2->kind == 3 && op2->type->isSigned)
2355 *value2 = (unsigned char)op2->__anon1.i;
2356 else if(op2->kind == 3)
2357 *value2 = (unsigned char)op2->__anon1.ui;
2358 else if(op2->kind == 4 && op2->type->isSigned)
2359 *value2 = (unsigned char)op2->__anon1.i64;
2360 else if(op2->kind == 4)
2361 *value2 = (unsigned char)op2->__anon1.ui64;
2362 else if(op2->kind == 23 && op2->type->isSigned)
2363 *value2 = (unsigned char)op2->__anon1.i64;
2364 else if(op2->kind == 23)
2365 *value2 = (unsigned char)op2->__anon1.ui64;
2366 else if(op2->kind == 22 && op2->type->isSigned)
2367 *value2 = (unsigned char)op2->__anon1.i64;
2368 else if(op2->kind == 22)
2369 *value2 = (unsigned char)op2->__anon1.ui64;
2370 else if(op2->kind == 2 && op2->type->isSigned)
2371 *value2 = (unsigned char)op2->__anon1.s;
2372 else if(op2->kind == 2)
2373 *value2 = (unsigned char)op2->__anon1.us;
2374 else if(op2->kind == 1 && op2->type->isSigned)
2375 *value2 = (unsigned char)op2->__anon1.c;
2376 else if(op2->kind == 24 || op2->kind == 1)
2377 *value2 = op2->__anon1.uc;
2378 else if(op2->kind == 6)
2379 *value2 = (unsigned char)op2->__anon1.f;
2380 else if(op2->kind == 7)
2381 *value2 = (unsigned char)op2->__anon1.d;
2382 else if(op2->kind == 13)
2383 *value2 = (unsigned char)op2->__anon1.ui64;
2389 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2391 if(op2->kind == 3 && op2->type->isSigned)
2392 *value2 = (float)(float)op2->__anon1.i;
2393 else if(op2->kind == 3)
2394 *value2 = (float)(float)op2->__anon1.ui;
2395 else if(op2->kind == 4 && op2->type->isSigned)
2396 *value2 = (float)(float)op2->__anon1.i64;
2397 else if(op2->kind == 4)
2398 *value2 = (float)(float)op2->__anon1.ui64;
2399 else if(op2->kind == 23 && op2->type->isSigned)
2400 *value2 = (float)(float)op2->__anon1.i64;
2401 else if(op2->kind == 23)
2402 *value2 = (float)(float)op2->__anon1.ui64;
2403 else if(op2->kind == 22 && op2->type->isSigned)
2404 *value2 = (float)(float)op2->__anon1.i64;
2405 else if(op2->kind == 22)
2406 *value2 = (float)(float)op2->__anon1.ui64;
2407 else if(op2->kind == 2 && op2->type->isSigned)
2408 *value2 = (float)(float)op2->__anon1.s;
2409 else if(op2->kind == 2)
2410 *value2 = (float)(float)op2->__anon1.us;
2411 else if(op2->kind == 1 && op2->type->isSigned)
2412 *value2 = (float)(float)op2->__anon1.c;
2413 else if(op2->kind == 24 || op2->kind == 1)
2414 *value2 = (float)(float)op2->__anon1.uc;
2415 else if(op2->kind == 6)
2416 *value2 = (float)op2->__anon1.f;
2417 else if(op2->kind == 7)
2418 *value2 = (float)op2->__anon1.d;
2419 else if(op2->kind == 13)
2420 *value2 = (float)(float)op2->__anon1.ui64;
2426 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2428 if(op2->kind == 3 && op2->type->isSigned)
2429 *value2 = (double)(double)op2->__anon1.i;
2430 else if(op2->kind == 3)
2431 *value2 = (double)(double)op2->__anon1.ui;
2432 else if(op2->kind == 4 && op2->type->isSigned)
2433 *value2 = (double)(double)op2->__anon1.i64;
2434 else if(op2->kind == 4)
2435 *value2 = (double)(double)op2->__anon1.ui64;
2436 else if(op2->kind == 23 && op2->type->isSigned)
2437 *value2 = (double)(double)op2->__anon1.i64;
2438 else if(op2->kind == 23)
2439 *value2 = (double)(double)op2->__anon1.ui64;
2440 else if(op2->kind == 22 && op2->type->isSigned)
2441 *value2 = (double)(double)op2->__anon1.i64;
2442 else if(op2->kind == 22)
2443 *value2 = (double)(double)op2->__anon1.ui64;
2444 else if(op2->kind == 2 && op2->type->isSigned)
2445 *value2 = (double)(double)op2->__anon1.s;
2446 else if(op2->kind == 2)
2447 *value2 = (double)(double)op2->__anon1.us;
2448 else if(op2->kind == 1 && op2->type->isSigned)
2449 *value2 = (double)(double)op2->__anon1.c;
2450 else if(op2->kind == 24 || op2->kind == 1)
2451 *value2 = (double)(double)op2->__anon1.uc;
2452 else if(op2->kind == 6)
2453 *value2 = (double)op2->__anon1.f;
2454 else if(op2->kind == 7)
2455 *value2 = (double)op2->__anon1.d;
2456 else if(op2->kind == 13)
2457 *value2 = (double)(double)op2->__anon1.ui64;
2463 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2465 int value2 = op2->__anon1.i;
2468 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2471 exp->expType = op1->type;
2473 op1->type->refCount++;
2478 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2480 unsigned int value2 = op2->__anon1.ui;
2483 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2486 exp->expType = op1->type;
2488 op1->type->refCount++;
2493 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2495 long long value2 = op2->__anon1.i64;
2498 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2501 exp->expType = op1->type;
2503 op1->type->refCount++;
2508 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2510 uint64 value2 = op2->__anon1.ui64;
2513 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2516 exp->expType = op1->type;
2518 op1->type->refCount++;
2523 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2525 short value2 = op2->__anon1.s;
2528 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
2531 exp->expType = op1->type;
2533 op1->type->refCount++;
2538 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2540 unsigned short value2 = op2->__anon1.us;
2543 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
2546 exp->expType = op1->type;
2548 op1->type->refCount++;
2553 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2555 char value2 = op2->__anon1.c;
2558 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
2561 exp->expType = op1->type;
2563 op1->type->refCount++;
2568 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2570 unsigned char value2 = op2->__anon1.uc;
2573 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
2576 exp->expType = op1->type;
2578 op1->type->refCount++;
2583 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2585 float value2 = op2->__anon1.f;
2588 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2591 exp->expType = op1->type;
2593 op1->type->refCount++;
2598 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2600 double value2 = op2->__anon1.d;
2603 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2606 exp->expType = op1->type;
2608 op1->type->refCount++;
2613 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2615 int value2 = op2->__anon1.i;
2618 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2621 exp->expType = op1->type;
2623 op1->type->refCount++;
2628 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2630 unsigned int value2 = op2->__anon1.ui;
2633 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2636 exp->expType = op1->type;
2638 op1->type->refCount++;
2643 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2645 long long value2 = op2->__anon1.i64;
2648 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2651 exp->expType = op1->type;
2653 op1->type->refCount++;
2658 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2660 uint64 value2 = op2->__anon1.ui64;
2663 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2666 exp->expType = op1->type;
2668 op1->type->refCount++;
2673 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2675 short value2 = op2->__anon1.s;
2678 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
2681 exp->expType = op1->type;
2683 op1->type->refCount++;
2688 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2690 unsigned short value2 = op2->__anon1.us;
2693 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
2696 exp->expType = op1->type;
2698 op1->type->refCount++;
2703 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2705 char value2 = op2->__anon1.c;
2708 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
2711 exp->expType = op1->type;
2713 op1->type->refCount++;
2718 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2720 unsigned char value2 = op2->__anon1.uc;
2723 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
2726 exp->expType = op1->type;
2728 op1->type->refCount++;
2733 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2735 float value2 = op2->__anon1.f;
2738 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2741 exp->expType = op1->type;
2743 op1->type->refCount++;
2748 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2750 double value2 = op2->__anon1.d;
2753 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2756 exp->expType = op1->type;
2758 op1->type->refCount++;
2763 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2765 int value2 = op2->__anon1.i;
2768 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2771 exp->expType = op1->type;
2773 op1->type->refCount++;
2778 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2780 unsigned int value2 = op2->__anon1.ui;
2783 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2786 exp->expType = op1->type;
2788 op1->type->refCount++;
2793 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2795 long long value2 = op2->__anon1.i64;
2798 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2801 exp->expType = op1->type;
2803 op1->type->refCount++;
2808 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2810 uint64 value2 = op2->__anon1.ui64;
2813 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2816 exp->expType = op1->type;
2818 op1->type->refCount++;
2823 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2825 short value2 = op2->__anon1.s;
2828 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
2831 exp->expType = op1->type;
2833 op1->type->refCount++;
2838 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2840 unsigned short value2 = op2->__anon1.us;
2843 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
2846 exp->expType = op1->type;
2848 op1->type->refCount++;
2853 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2855 char value2 = op2->__anon1.c;
2858 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
2861 exp->expType = op1->type;
2863 op1->type->refCount++;
2868 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2870 unsigned char value2 = op2->__anon1.uc;
2873 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
2876 exp->expType = op1->type;
2878 op1->type->refCount++;
2883 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2885 float value2 = op2->__anon1.f;
2888 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2891 exp->expType = op1->type;
2893 op1->type->refCount++;
2898 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2900 double value2 = op2->__anon1.d;
2903 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2906 exp->expType = op1->type;
2908 op1->type->refCount++;
2913 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2915 int value2 = op2->__anon1.i;
2918 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
2921 exp->expType = op1->type;
2923 op1->type->refCount++;
2928 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2930 unsigned int value2 = op2->__anon1.ui;
2933 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
2936 exp->expType = op1->type;
2938 op1->type->refCount++;
2943 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2945 long long value2 = op2->__anon1.i64;
2948 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
2951 exp->expType = op1->type;
2953 op1->type->refCount++;
2958 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2960 uint64 value2 = op2->__anon1.ui64;
2963 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
2966 exp->expType = op1->type;
2968 op1->type->refCount++;
2973 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2975 short value2 = op2->__anon1.s;
2978 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
2981 exp->expType = op1->type;
2983 op1->type->refCount++;
2988 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2990 unsigned short value2 = op2->__anon1.us;
2993 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
2996 exp->expType = op1->type;
2998 op1->type->refCount++;
3003 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3005 char value2 = op2->__anon1.c;
3008 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
3011 exp->expType = op1->type;
3013 op1->type->refCount++;
3018 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3020 unsigned char value2 = op2->__anon1.uc;
3023 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
3026 exp->expType = op1->type;
3028 op1->type->refCount++;
3033 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3035 float value2 = op2->__anon1.f;
3038 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
3041 exp->expType = op1->type;
3043 op1->type->refCount++;
3048 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3050 double value2 = op2->__anon1.d;
3053 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
3056 exp->expType = op1->type;
3058 op1->type->refCount++;
3063 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3065 int value2 = op2->__anon1.i;
3068 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
3071 exp->expType = op1->type;
3073 op1->type->refCount++;
3078 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3080 unsigned int value2 = op2->__anon1.ui;
3083 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
3086 exp->expType = op1->type;
3088 op1->type->refCount++;
3093 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3095 long long value2 = op2->__anon1.i64;
3098 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
3101 exp->expType = op1->type;
3103 op1->type->refCount++;
3108 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3110 uint64 value2 = op2->__anon1.ui64;
3113 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
3116 exp->expType = op1->type;
3118 op1->type->refCount++;
3123 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3125 short value2 = op2->__anon1.s;
3128 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
3131 exp->expType = op1->type;
3133 op1->type->refCount++;
3138 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3140 unsigned short value2 = op2->__anon1.us;
3143 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
3146 exp->expType = op1->type;
3148 op1->type->refCount++;
3153 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3155 char value2 = op2->__anon1.c;
3158 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
3161 exp->expType = op1->type;
3163 op1->type->refCount++;
3168 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3170 unsigned char value2 = op2->__anon1.uc;
3173 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
3176 exp->expType = op1->type;
3178 op1->type->refCount++;
3183 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3186 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3189 exp->expType = op1->type;
3191 op1->type->refCount++;
3196 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3199 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3202 exp->expType = op1->type;
3204 op1->type->refCount++;
3209 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3212 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3215 exp->expType = op1->type;
3217 op1->type->refCount++;
3222 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3225 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3228 exp->expType = op1->type;
3230 op1->type->refCount++;
3235 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3238 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3241 exp->expType = op1->type;
3243 op1->type->refCount++;
3248 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3251 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3254 exp->expType = op1->type;
3256 op1->type->refCount++;
3261 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3264 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3267 exp->expType = op1->type;
3269 op1->type->refCount++;
3274 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3277 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3280 exp->expType = op1->type;
3282 op1->type->refCount++;
3287 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3290 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3293 exp->expType = op1->type;
3295 op1->type->refCount++;
3300 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3303 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3306 exp->expType = op1->type;
3308 op1->type->refCount++;
3313 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3316 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3319 exp->expType = op1->type;
3321 op1->type->refCount++;
3326 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3329 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3332 exp->expType = op1->type;
3334 op1->type->refCount++;
3339 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3342 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3345 exp->expType = op1->type;
3347 op1->type->refCount++;
3352 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3355 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3358 exp->expType = op1->type;
3360 op1->type->refCount++;
3365 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3368 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3371 exp->expType = op1->type;
3373 op1->type->refCount++;
3378 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3381 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3384 exp->expType = op1->type;
3386 op1->type->refCount++;
3391 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3394 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3397 exp->expType = op1->type;
3399 op1->type->refCount++;
3404 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3407 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3410 exp->expType = op1->type;
3412 op1->type->refCount++;
3417 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3420 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3423 exp->expType = op1->type;
3425 op1->type->refCount++;
3430 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3433 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3436 exp->expType = op1->type;
3438 op1->type->refCount++;
3443 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3446 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3449 exp->expType = op1->type;
3451 op1->type->refCount++;
3456 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3459 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3462 exp->expType = op1->type;
3464 op1->type->refCount++;
3469 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3472 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3475 exp->expType = op1->type;
3477 op1->type->refCount++;
3482 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3485 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3488 exp->expType = op1->type;
3490 op1->type->refCount++;
3495 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3498 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3501 exp->expType = op1->type;
3503 op1->type->refCount++;
3508 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3511 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3514 exp->expType = op1->type;
3516 op1->type->refCount++;
3521 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3524 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3527 exp->expType = op1->type;
3529 op1->type->refCount++;
3534 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3537 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3540 exp->expType = op1->type;
3542 op1->type->refCount++;
3547 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3550 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3553 exp->expType = op1->type;
3555 op1->type->refCount++;
3560 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3563 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3566 exp->expType = op1->type;
3568 op1->type->refCount++;
3573 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3575 int value2 = op2->__anon1.i;
3578 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3581 exp->expType = op1->type;
3583 op1->type->refCount++;
3588 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3590 unsigned int value2 = op2->__anon1.ui;
3593 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3596 exp->expType = op1->type;
3598 op1->type->refCount++;
3603 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3605 long long value2 = op2->__anon1.i64;
3608 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3611 exp->expType = op1->type;
3613 op1->type->refCount++;
3618 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3620 uint64 value2 = op2->__anon1.ui64;
3623 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3626 exp->expType = op1->type;
3628 op1->type->refCount++;
3633 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3635 short value2 = op2->__anon1.s;
3638 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3641 exp->expType = op1->type;
3643 op1->type->refCount++;
3648 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3650 unsigned short value2 = op2->__anon1.us;
3653 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3656 exp->expType = op1->type;
3658 op1->type->refCount++;
3663 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3665 char value2 = op2->__anon1.c;
3668 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3671 exp->expType = op1->type;
3673 op1->type->refCount++;
3678 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3680 unsigned char value2 = op2->__anon1.uc;
3683 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3686 exp->expType = op1->type;
3688 op1->type->refCount++;
3693 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3695 float value2 = op2->__anon1.f;
3698 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3701 exp->expType = op1->type;
3703 op1->type->refCount++;
3708 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3710 double value2 = op2->__anon1.d;
3713 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3716 exp->expType = op1->type;
3718 op1->type->refCount++;
3723 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3725 int value2 = op2->__anon1.i;
3728 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3731 exp->expType = op1->type;
3733 op1->type->refCount++;
3738 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3740 unsigned int value2 = op2->__anon1.ui;
3743 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3746 exp->expType = op1->type;
3748 op1->type->refCount++;
3753 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3755 long long value2 = op2->__anon1.i64;
3758 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3761 exp->expType = op1->type;
3763 op1->type->refCount++;
3768 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3770 uint64 value2 = op2->__anon1.ui64;
3773 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3776 exp->expType = op1->type;
3778 op1->type->refCount++;
3783 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3785 short value2 = op2->__anon1.s;
3788 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3791 exp->expType = op1->type;
3793 op1->type->refCount++;
3798 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3800 unsigned short value2 = op2->__anon1.us;
3803 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3806 exp->expType = op1->type;
3808 op1->type->refCount++;
3813 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3815 char value2 = op2->__anon1.c;
3818 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3821 exp->expType = op1->type;
3823 op1->type->refCount++;
3828 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3830 unsigned char value2 = op2->__anon1.uc;
3833 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3836 exp->expType = op1->type;
3838 op1->type->refCount++;
3843 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3845 float value2 = op2->__anon1.f;
3848 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3851 exp->expType = op1->type;
3853 op1->type->refCount++;
3858 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3860 double value2 = op2->__anon1.d;
3863 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3866 exp->expType = op1->type;
3868 op1->type->refCount++;
3873 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3875 int value2 = op2->__anon1.i;
3878 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3881 exp->expType = op1->type;
3883 op1->type->refCount++;
3888 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3890 unsigned int value2 = op2->__anon1.ui;
3893 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3896 exp->expType = op1->type;
3898 op1->type->refCount++;
3903 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3905 long long value2 = op2->__anon1.i64;
3908 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3911 exp->expType = op1->type;
3913 op1->type->refCount++;
3918 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3920 uint64 value2 = op2->__anon1.ui64;
3923 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3926 exp->expType = op1->type;
3928 op1->type->refCount++;
3933 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3935 short value2 = op2->__anon1.s;
3938 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3941 exp->expType = op1->type;
3943 op1->type->refCount++;
3948 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3950 unsigned short value2 = op2->__anon1.us;
3953 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3956 exp->expType = op1->type;
3958 op1->type->refCount++;
3963 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3965 char value2 = op2->__anon1.c;
3968 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3971 exp->expType = op1->type;
3973 op1->type->refCount++;
3978 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3980 unsigned char value2 = op2->__anon1.uc;
3983 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3986 exp->expType = op1->type;
3988 op1->type->refCount++;
3993 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3995 float value2 = op2->__anon1.f;
3998 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4001 exp->expType = op1->type;
4003 op1->type->refCount++;
4008 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4010 double value2 = op2->__anon1.d;
4013 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4016 exp->expType = op1->type;
4018 op1->type->refCount++;
4023 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4025 int value2 = op2->__anon1.i;
4028 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4031 exp->expType = op1->type;
4033 op1->type->refCount++;
4038 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4040 unsigned int value2 = op2->__anon1.ui;
4043 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4046 exp->expType = op1->type;
4048 op1->type->refCount++;
4053 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4055 long long value2 = op2->__anon1.i64;
4058 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4061 exp->expType = op1->type;
4063 op1->type->refCount++;
4068 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4070 uint64 value2 = op2->__anon1.ui64;
4073 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4076 exp->expType = op1->type;
4078 op1->type->refCount++;
4083 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4085 short value2 = op2->__anon1.s;
4088 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4091 exp->expType = op1->type;
4093 op1->type->refCount++;
4098 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4100 unsigned short value2 = op2->__anon1.us;
4103 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4106 exp->expType = op1->type;
4108 op1->type->refCount++;
4113 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4115 char value2 = op2->__anon1.c;
4118 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4121 exp->expType = op1->type;
4123 op1->type->refCount++;
4128 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4130 unsigned char value2 = op2->__anon1.uc;
4133 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4136 exp->expType = op1->type;
4138 op1->type->refCount++;
4143 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4145 float value2 = op2->__anon1.f;
4148 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4151 exp->expType = op1->type;
4153 op1->type->refCount++;
4158 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4160 double value2 = op2->__anon1.d;
4163 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4166 exp->expType = op1->type;
4168 op1->type->refCount++;
4173 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4175 int value2 = op2->__anon1.i;
4178 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
4181 exp->expType = op1->type;
4183 op1->type->refCount++;
4188 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4190 unsigned int value2 = op2->__anon1.ui;
4193 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
4196 exp->expType = op1->type;
4198 op1->type->refCount++;
4203 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4205 long long value2 = op2->__anon1.i64;
4208 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
4211 exp->expType = op1->type;
4213 op1->type->refCount++;
4218 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4220 uint64 value2 = op2->__anon1.ui64;
4223 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
4226 exp->expType = op1->type;
4228 op1->type->refCount++;
4233 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4235 short value2 = op2->__anon1.s;
4238 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
4241 exp->expType = op1->type;
4243 op1->type->refCount++;
4248 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4250 unsigned short value2 = op2->__anon1.us;
4253 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
4256 exp->expType = op1->type;
4258 op1->type->refCount++;
4263 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4265 char value2 = op2->__anon1.c;
4268 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
4271 exp->expType = op1->type;
4273 op1->type->refCount++;
4278 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4280 unsigned char value2 = op2->__anon1.uc;
4283 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
4286 exp->expType = op1->type;
4288 op1->type->refCount++;
4293 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4295 float value2 = op2->__anon1.f;
4298 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
4301 exp->expType = op1->type;
4303 op1->type->refCount++;
4308 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4310 double value2 = op2->__anon1.d;
4313 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
4316 exp->expType = op1->type;
4318 op1->type->refCount++;
4323 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4325 int value2 = op2->__anon1.i;
4328 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
4331 exp->expType = op1->type;
4333 op1->type->refCount++;
4338 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4340 unsigned int value2 = op2->__anon1.ui;
4343 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
4346 exp->expType = op1->type;
4348 op1->type->refCount++;
4353 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4355 long long value2 = op2->__anon1.i64;
4358 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
4361 exp->expType = op1->type;
4363 op1->type->refCount++;
4368 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4370 uint64 value2 = op2->__anon1.ui64;
4373 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
4376 exp->expType = op1->type;
4378 op1->type->refCount++;
4383 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4385 short value2 = op2->__anon1.s;
4388 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
4391 exp->expType = op1->type;
4393 op1->type->refCount++;
4398 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4400 unsigned short value2 = op2->__anon1.us;
4403 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
4406 exp->expType = op1->type;
4408 op1->type->refCount++;
4413 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4415 char value2 = op2->__anon1.c;
4418 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
4421 exp->expType = op1->type;
4423 op1->type->refCount++;
4428 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4430 unsigned char value2 = op2->__anon1.uc;
4433 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
4436 exp->expType = op1->type;
4438 op1->type->refCount++;
4443 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4445 int value2 = op2->__anon1.i;
4448 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4451 exp->expType = op1->type;
4453 op1->type->refCount++;
4458 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4460 unsigned int value2 = op2->__anon1.ui;
4463 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4466 exp->expType = op1->type;
4468 op1->type->refCount++;
4473 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4475 long long value2 = op2->__anon1.i64;
4478 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4481 exp->expType = op1->type;
4483 op1->type->refCount++;
4488 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4490 uint64 value2 = op2->__anon1.ui64;
4493 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4496 exp->expType = op1->type;
4498 op1->type->refCount++;
4503 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4505 short value2 = op2->__anon1.s;
4508 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
4511 exp->expType = op1->type;
4513 op1->type->refCount++;
4518 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4520 unsigned short value2 = op2->__anon1.us;
4523 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
4526 exp->expType = op1->type;
4528 op1->type->refCount++;
4533 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4535 char value2 = op2->__anon1.c;
4538 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
4541 exp->expType = op1->type;
4543 op1->type->refCount++;
4548 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4550 unsigned char value2 = op2->__anon1.uc;
4553 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
4556 exp->expType = op1->type;
4558 op1->type->refCount++;
4563 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4565 int value2 = op2->__anon1.i;
4568 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4571 exp->expType = op1->type;
4573 op1->type->refCount++;
4578 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4580 unsigned int value2 = op2->__anon1.ui;
4583 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4586 exp->expType = op1->type;
4588 op1->type->refCount++;
4593 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4595 long long value2 = op2->__anon1.i64;
4598 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4601 exp->expType = op1->type;
4603 op1->type->refCount++;
4608 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4610 uint64 value2 = op2->__anon1.ui64;
4613 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4616 exp->expType = op1->type;
4618 op1->type->refCount++;
4623 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4625 short value2 = op2->__anon1.s;
4628 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
4631 exp->expType = op1->type;
4633 op1->type->refCount++;
4638 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4640 unsigned short value2 = op2->__anon1.us;
4643 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
4646 exp->expType = op1->type;
4648 op1->type->refCount++;
4653 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4655 char value2 = op2->__anon1.c;
4658 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
4661 exp->expType = op1->type;
4663 op1->type->refCount++;
4668 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4670 unsigned char value2 = op2->__anon1.uc;
4673 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
4676 exp->expType = op1->type;
4678 op1->type->refCount++;
4683 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4685 int value2 = op2->__anon1.i;
4688 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4691 exp->expType = op1->type;
4693 op1->type->refCount++;
4698 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4700 unsigned int value2 = op2->__anon1.ui;
4703 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4706 exp->expType = op1->type;
4708 op1->type->refCount++;
4713 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4715 long long value2 = op2->__anon1.i64;
4718 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4721 exp->expType = op1->type;
4723 op1->type->refCount++;
4728 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4730 uint64 value2 = op2->__anon1.ui64;
4733 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4736 exp->expType = op1->type;
4738 op1->type->refCount++;
4743 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4745 short value2 = op2->__anon1.s;
4748 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
4751 exp->expType = op1->type;
4753 op1->type->refCount++;
4758 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4760 unsigned short value2 = op2->__anon1.us;
4763 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
4766 exp->expType = op1->type;
4768 op1->type->refCount++;
4773 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4775 char value2 = op2->__anon1.c;
4778 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
4781 exp->expType = op1->type;
4783 op1->type->refCount++;
4788 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4790 unsigned char value2 = op2->__anon1.uc;
4793 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
4796 exp->expType = op1->type;
4798 op1->type->refCount++;
4803 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4805 int value2 = op2->__anon1.i;
4808 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4811 exp->expType = op1->type;
4813 op1->type->refCount++;
4818 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4820 unsigned int value2 = op2->__anon1.ui;
4823 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4826 exp->expType = op1->type;
4828 op1->type->refCount++;
4833 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4835 long long value2 = op2->__anon1.i64;
4838 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4841 exp->expType = op1->type;
4843 op1->type->refCount++;
4848 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4850 uint64 value2 = op2->__anon1.ui64;
4853 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4856 exp->expType = op1->type;
4858 op1->type->refCount++;
4863 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4865 short value2 = op2->__anon1.s;
4868 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
4871 exp->expType = op1->type;
4873 op1->type->refCount++;
4878 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4880 unsigned short value2 = op2->__anon1.us;
4883 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
4886 exp->expType = op1->type;
4888 op1->type->refCount++;
4893 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4895 char value2 = op2->__anon1.c;
4898 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
4901 exp->expType = op1->type;
4903 op1->type->refCount++;
4908 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4910 unsigned char value2 = op2->__anon1.uc;
4913 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
4916 exp->expType = op1->type;
4918 op1->type->refCount++;
4923 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4925 int value2 = op2->__anon1.i;
4928 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4931 exp->expType = op1->type;
4933 op1->type->refCount++;
4938 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4940 unsigned int value2 = op2->__anon1.ui;
4943 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4946 exp->expType = op1->type;
4948 op1->type->refCount++;
4953 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4955 long long value2 = op2->__anon1.i64;
4958 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4961 exp->expType = op1->type;
4963 op1->type->refCount++;
4968 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4970 uint64 value2 = op2->__anon1.ui64;
4973 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4976 exp->expType = op1->type;
4978 op1->type->refCount++;
4983 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4985 short value2 = op2->__anon1.s;
4988 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
4991 exp->expType = op1->type;
4993 op1->type->refCount++;
4998 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5000 unsigned short value2 = op2->__anon1.us;
5003 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
5006 exp->expType = op1->type;
5008 op1->type->refCount++;
5013 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5015 char value2 = op2->__anon1.c;
5018 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
5021 exp->expType = op1->type;
5023 op1->type->refCount++;
5028 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5030 unsigned char value2 = op2->__anon1.uc;
5033 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
5036 exp->expType = op1->type;
5038 op1->type->refCount++;
5043 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5046 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5049 exp->expType = op1->type;
5051 op1->type->refCount++;
5056 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5059 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5062 exp->expType = op1->type;
5064 op1->type->refCount++;
5069 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5072 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5075 exp->expType = op1->type;
5077 op1->type->refCount++;
5082 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5085 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5088 exp->expType = op1->type;
5090 op1->type->refCount++;
5095 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5098 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5101 exp->expType = op1->type;
5103 op1->type->refCount++;
5108 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5111 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5114 exp->expType = op1->type;
5116 op1->type->refCount++;
5121 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5124 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5127 exp->expType = op1->type;
5129 op1->type->refCount++;
5134 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5137 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5140 exp->expType = op1->type;
5142 op1->type->refCount++;
5147 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5149 int value2 = op2->__anon1.i;
5152 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5155 exp->expType = op1->type;
5157 op1->type->refCount++;
5162 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5164 unsigned int value2 = op2->__anon1.ui;
5167 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5170 exp->expType = op1->type;
5172 op1->type->refCount++;
5177 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5179 long long value2 = op2->__anon1.i64;
5182 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5185 exp->expType = op1->type;
5187 op1->type->refCount++;
5192 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5194 uint64 value2 = op2->__anon1.ui64;
5197 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5200 exp->expType = op1->type;
5202 op1->type->refCount++;
5207 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5209 short value2 = op2->__anon1.s;
5212 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5215 exp->expType = op1->type;
5217 op1->type->refCount++;
5222 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5224 unsigned short value2 = op2->__anon1.us;
5227 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5230 exp->expType = op1->type;
5232 op1->type->refCount++;
5237 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5239 char value2 = op2->__anon1.c;
5242 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5245 exp->expType = op1->type;
5247 op1->type->refCount++;
5252 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5254 unsigned char value2 = op2->__anon1.uc;
5257 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5260 exp->expType = op1->type;
5262 op1->type->refCount++;
5267 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5269 int value2 = op2->__anon1.i;
5272 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5275 exp->expType = op1->type;
5277 op1->type->refCount++;
5282 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5284 unsigned int value2 = op2->__anon1.ui;
5287 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5290 exp->expType = op1->type;
5292 op1->type->refCount++;
5297 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5299 long long value2 = op2->__anon1.i64;
5302 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5305 exp->expType = op1->type;
5307 op1->type->refCount++;
5312 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5314 uint64 value2 = op2->__anon1.ui64;
5317 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5320 exp->expType = op1->type;
5322 op1->type->refCount++;
5327 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5329 short value2 = op2->__anon1.s;
5332 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5335 exp->expType = op1->type;
5337 op1->type->refCount++;
5342 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5344 unsigned short value2 = op2->__anon1.us;
5347 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5350 exp->expType = op1->type;
5352 op1->type->refCount++;
5357 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5359 char value2 = op2->__anon1.c;
5362 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5365 exp->expType = op1->type;
5367 op1->type->refCount++;
5372 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5374 unsigned char value2 = op2->__anon1.uc;
5377 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5380 exp->expType = op1->type;
5382 op1->type->refCount++;
5387 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5389 int value2 = op2->__anon1.i;
5392 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5395 exp->expType = op1->type;
5397 op1->type->refCount++;
5402 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5404 unsigned int value2 = op2->__anon1.ui;
5407 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5410 exp->expType = op1->type;
5412 op1->type->refCount++;
5417 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5419 long long value2 = op2->__anon1.i64;
5422 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5425 exp->expType = op1->type;
5427 op1->type->refCount++;
5432 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5434 uint64 value2 = op2->__anon1.ui64;
5437 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5440 exp->expType = op1->type;
5442 op1->type->refCount++;
5447 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5449 short value2 = op2->__anon1.s;
5452 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5455 exp->expType = op1->type;
5457 op1->type->refCount++;
5462 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5464 unsigned short value2 = op2->__anon1.us;
5467 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5470 exp->expType = op1->type;
5472 op1->type->refCount++;
5477 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5479 char value2 = op2->__anon1.c;
5482 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5485 exp->expType = op1->type;
5487 op1->type->refCount++;
5492 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5494 unsigned char value2 = op2->__anon1.uc;
5497 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5500 exp->expType = op1->type;
5502 op1->type->refCount++;
5507 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5509 int value2 = op2->__anon1.i;
5512 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5515 exp->expType = op1->type;
5517 op1->type->refCount++;
5522 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5524 unsigned int value2 = op2->__anon1.ui;
5527 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5530 exp->expType = op1->type;
5532 op1->type->refCount++;
5537 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5539 long long value2 = op2->__anon1.i64;
5542 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5545 exp->expType = op1->type;
5547 op1->type->refCount++;
5552 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5554 uint64 value2 = op2->__anon1.ui64;
5557 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5560 exp->expType = op1->type;
5562 op1->type->refCount++;
5567 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5569 short value2 = op2->__anon1.s;
5572 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5575 exp->expType = op1->type;
5577 op1->type->refCount++;
5582 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5584 unsigned short value2 = op2->__anon1.us;
5587 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5590 exp->expType = op1->type;
5592 op1->type->refCount++;
5597 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5599 char value2 = op2->__anon1.c;
5602 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5605 exp->expType = op1->type;
5607 op1->type->refCount++;
5612 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5614 unsigned char value2 = op2->__anon1.uc;
5617 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5620 exp->expType = op1->type;
5622 op1->type->refCount++;
5627 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5629 int value2 = op2->__anon1.i;
5632 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5635 exp->expType = op1->type;
5637 op1->type->refCount++;
5642 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5644 unsigned int value2 = op2->__anon1.ui;
5647 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5650 exp->expType = op1->type;
5652 op1->type->refCount++;
5657 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5659 long long value2 = op2->__anon1.i64;
5662 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5665 exp->expType = op1->type;
5667 op1->type->refCount++;
5672 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5674 uint64 value2 = op2->__anon1.ui64;
5677 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5680 exp->expType = op1->type;
5682 op1->type->refCount++;
5687 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5689 short value2 = op2->__anon1.s;
5692 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5695 exp->expType = op1->type;
5697 op1->type->refCount++;
5702 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5704 unsigned short value2 = op2->__anon1.us;
5707 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5710 exp->expType = op1->type;
5712 op1->type->refCount++;
5717 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5719 char value2 = op2->__anon1.c;
5722 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5725 exp->expType = op1->type;
5727 op1->type->refCount++;
5732 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5734 unsigned char value2 = op2->__anon1.uc;
5737 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5740 exp->expType = op1->type;
5742 op1->type->refCount++;
5747 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5750 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5753 exp->expType = op1->type;
5755 op1->type->refCount++;
5760 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5763 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5766 exp->expType = op1->type;
5768 op1->type->refCount++;
5773 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5776 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5779 exp->expType = op1->type;
5781 op1->type->refCount++;
5786 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5789 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5792 exp->expType = op1->type;
5794 op1->type->refCount++;
5799 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5802 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5805 exp->expType = op1->type;
5807 op1->type->refCount++;
5812 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5815 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5818 exp->expType = op1->type;
5820 op1->type->refCount++;
5825 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5828 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5831 exp->expType = op1->type;
5833 op1->type->refCount++;
5838 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5841 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5844 exp->expType = op1->type;
5846 op1->type->refCount++;
5851 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5853 int value2 = op2->__anon1.i;
5856 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5859 exp->expType = op1->type;
5861 op1->type->refCount++;
5866 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5868 unsigned int value2 = op2->__anon1.ui;
5871 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5874 exp->expType = op1->type;
5876 op1->type->refCount++;
5881 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5883 long long value2 = op2->__anon1.i64;
5886 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5889 exp->expType = op1->type;
5891 op1->type->refCount++;
5896 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5898 uint64 value2 = op2->__anon1.ui64;
5901 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5904 exp->expType = op1->type;
5906 op1->type->refCount++;
5911 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5913 short value2 = op2->__anon1.s;
5916 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5919 exp->expType = op1->type;
5921 op1->type->refCount++;
5926 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5928 unsigned short value2 = op2->__anon1.us;
5931 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5934 exp->expType = op1->type;
5936 op1->type->refCount++;
5941 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5943 char value2 = op2->__anon1.c;
5946 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5949 exp->expType = op1->type;
5951 op1->type->refCount++;
5956 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5958 unsigned char value2 = op2->__anon1.uc;
5961 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5964 exp->expType = op1->type;
5966 op1->type->refCount++;
5971 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5973 float value2 = op2->__anon1.f;
5976 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5979 exp->expType = op1->type;
5981 op1->type->refCount++;
5986 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5988 double value2 = op2->__anon1.d;
5991 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5994 exp->expType = op1->type;
5996 op1->type->refCount++;
6001 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6003 int value2 = op2->__anon1.i;
6006 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6009 exp->expType = op1->type;
6011 op1->type->refCount++;
6016 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6018 unsigned int value2 = op2->__anon1.ui;
6021 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6024 exp->expType = op1->type;
6026 op1->type->refCount++;
6031 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6033 long long value2 = op2->__anon1.i64;
6036 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6039 exp->expType = op1->type;
6041 op1->type->refCount++;
6046 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6048 uint64 value2 = op2->__anon1.ui64;
6051 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6054 exp->expType = op1->type;
6056 op1->type->refCount++;
6061 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6063 short value2 = op2->__anon1.s;
6066 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6069 exp->expType = op1->type;
6071 op1->type->refCount++;
6076 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6078 unsigned short value2 = op2->__anon1.us;
6081 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6084 exp->expType = op1->type;
6086 op1->type->refCount++;
6091 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6093 char value2 = op2->__anon1.c;
6096 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6099 exp->expType = op1->type;
6101 op1->type->refCount++;
6106 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6108 unsigned char value2 = op2->__anon1.uc;
6111 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6114 exp->expType = op1->type;
6116 op1->type->refCount++;
6121 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6123 float value2 = op2->__anon1.f;
6126 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6129 exp->expType = op1->type;
6131 op1->type->refCount++;
6136 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6138 double value2 = op2->__anon1.d;
6141 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6144 exp->expType = op1->type;
6146 op1->type->refCount++;
6151 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6153 int value2 = op2->__anon1.i;
6156 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6159 exp->expType = op1->type;
6161 op1->type->refCount++;
6166 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6168 unsigned int value2 = op2->__anon1.ui;
6171 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6174 exp->expType = op1->type;
6176 op1->type->refCount++;
6181 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6183 long long value2 = op2->__anon1.i64;
6186 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6189 exp->expType = op1->type;
6191 op1->type->refCount++;
6196 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6198 uint64 value2 = op2->__anon1.ui64;
6201 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6204 exp->expType = op1->type;
6206 op1->type->refCount++;
6211 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6213 short value2 = op2->__anon1.s;
6216 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6219 exp->expType = op1->type;
6221 op1->type->refCount++;
6226 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6228 unsigned short value2 = op2->__anon1.us;
6231 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6234 exp->expType = op1->type;
6236 op1->type->refCount++;
6241 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6243 char value2 = op2->__anon1.c;
6246 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6249 exp->expType = op1->type;
6251 op1->type->refCount++;
6256 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6258 unsigned char value2 = op2->__anon1.uc;
6261 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6264 exp->expType = op1->type;
6266 op1->type->refCount++;
6271 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6273 float value2 = op2->__anon1.f;
6276 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6279 exp->expType = op1->type;
6281 op1->type->refCount++;
6286 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6288 double value2 = op2->__anon1.d;
6291 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6294 exp->expType = op1->type;
6296 op1->type->refCount++;
6301 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6303 int value2 = op2->__anon1.i;
6306 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6309 exp->expType = op1->type;
6311 op1->type->refCount++;
6316 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6318 unsigned int value2 = op2->__anon1.ui;
6321 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6324 exp->expType = op1->type;
6326 op1->type->refCount++;
6331 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6333 long long value2 = op2->__anon1.i64;
6336 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6339 exp->expType = op1->type;
6341 op1->type->refCount++;
6346 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6348 uint64 value2 = op2->__anon1.ui64;
6351 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6354 exp->expType = op1->type;
6356 op1->type->refCount++;
6361 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6363 short value2 = op2->__anon1.s;
6366 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6369 exp->expType = op1->type;
6371 op1->type->refCount++;
6376 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6378 unsigned short value2 = op2->__anon1.us;
6381 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6384 exp->expType = op1->type;
6386 op1->type->refCount++;
6391 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6393 char value2 = op2->__anon1.c;
6396 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6399 exp->expType = op1->type;
6401 op1->type->refCount++;
6406 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6408 unsigned char value2 = op2->__anon1.uc;
6411 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6414 exp->expType = op1->type;
6416 op1->type->refCount++;
6421 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6423 float value2 = op2->__anon1.f;
6426 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6429 exp->expType = op1->type;
6431 op1->type->refCount++;
6436 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6438 double value2 = op2->__anon1.d;
6441 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6444 exp->expType = op1->type;
6446 op1->type->refCount++;
6451 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6453 int value2 = op2->__anon1.i;
6456 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6459 exp->expType = op1->type;
6461 op1->type->refCount++;
6466 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6468 unsigned int value2 = op2->__anon1.ui;
6471 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6474 exp->expType = op1->type;
6476 op1->type->refCount++;
6481 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6483 long long value2 = op2->__anon1.i64;
6486 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6489 exp->expType = op1->type;
6491 op1->type->refCount++;
6496 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6498 uint64 value2 = op2->__anon1.ui64;
6501 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6504 exp->expType = op1->type;
6506 op1->type->refCount++;
6511 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6513 short value2 = op2->__anon1.s;
6516 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6519 exp->expType = op1->type;
6521 op1->type->refCount++;
6526 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6528 unsigned short value2 = op2->__anon1.us;
6531 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6534 exp->expType = op1->type;
6536 op1->type->refCount++;
6541 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6543 char value2 = op2->__anon1.c;
6546 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6549 exp->expType = op1->type;
6551 op1->type->refCount++;
6556 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6558 unsigned char value2 = op2->__anon1.uc;
6561 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6564 exp->expType = op1->type;
6566 op1->type->refCount++;
6571 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6573 float value2 = op2->__anon1.f;
6576 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6579 exp->expType = op1->type;
6581 op1->type->refCount++;
6586 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6588 double value2 = op2->__anon1.d;
6591 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6594 exp->expType = op1->type;
6596 op1->type->refCount++;
6601 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6603 int value2 = op2->__anon1.i;
6606 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6609 exp->expType = op1->type;
6611 op1->type->refCount++;
6616 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6618 unsigned int value2 = op2->__anon1.ui;
6621 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6624 exp->expType = op1->type;
6626 op1->type->refCount++;
6631 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6633 long long value2 = op2->__anon1.i64;
6636 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6639 exp->expType = op1->type;
6641 op1->type->refCount++;
6646 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6648 uint64 value2 = op2->__anon1.ui64;
6651 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6654 exp->expType = op1->type;
6656 op1->type->refCount++;
6661 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6663 short value2 = op2->__anon1.s;
6666 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6669 exp->expType = op1->type;
6671 op1->type->refCount++;
6676 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6678 unsigned short value2 = op2->__anon1.us;
6681 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6684 exp->expType = op1->type;
6686 op1->type->refCount++;
6691 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6693 char value2 = op2->__anon1.c;
6696 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6699 exp->expType = op1->type;
6701 op1->type->refCount++;
6706 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6708 unsigned char value2 = op2->__anon1.uc;
6711 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6714 exp->expType = op1->type;
6716 op1->type->refCount++;
6721 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6723 float value2 = op2->__anon1.f;
6726 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6729 exp->expType = op1->type;
6731 op1->type->refCount++;
6736 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6738 double value2 = op2->__anon1.d;
6741 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6744 exp->expType = op1->type;
6746 op1->type->refCount++;
6751 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6753 int value2 = op2->__anon1.i;
6756 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6759 exp->expType = op1->type;
6761 op1->type->refCount++;
6766 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6768 unsigned int value2 = op2->__anon1.ui;
6771 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6774 exp->expType = op1->type;
6776 op1->type->refCount++;
6781 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6783 long long value2 = op2->__anon1.i64;
6786 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6789 exp->expType = op1->type;
6791 op1->type->refCount++;
6796 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6798 uint64 value2 = op2->__anon1.ui64;
6801 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6804 exp->expType = op1->type;
6806 op1->type->refCount++;
6811 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6813 short value2 = op2->__anon1.s;
6816 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6819 exp->expType = op1->type;
6821 op1->type->refCount++;
6826 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6828 unsigned short value2 = op2->__anon1.us;
6831 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6834 exp->expType = op1->type;
6836 op1->type->refCount++;
6841 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6843 char value2 = op2->__anon1.c;
6846 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6849 exp->expType = op1->type;
6851 op1->type->refCount++;
6856 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6858 unsigned char value2 = op2->__anon1.uc;
6861 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6864 exp->expType = op1->type;
6866 op1->type->refCount++;
6871 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6873 float value2 = op2->__anon1.f;
6876 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6879 exp->expType = op1->type;
6881 op1->type->refCount++;
6886 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6888 double value2 = op2->__anon1.d;
6891 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6894 exp->expType = op1->type;
6896 op1->type->refCount++;
6901 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6903 int value2 = op2->__anon1.i;
6906 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6909 exp->expType = op1->type;
6911 op1->type->refCount++;
6916 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6918 unsigned int value2 = op2->__anon1.ui;
6921 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6924 exp->expType = op1->type;
6926 op1->type->refCount++;
6931 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6933 long long value2 = op2->__anon1.i64;
6936 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6939 exp->expType = op1->type;
6941 op1->type->refCount++;
6946 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6948 uint64 value2 = op2->__anon1.ui64;
6951 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6954 exp->expType = op1->type;
6956 op1->type->refCount++;
6961 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6963 short value2 = op2->__anon1.s;
6966 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6969 exp->expType = op1->type;
6971 op1->type->refCount++;
6976 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6978 unsigned short value2 = op2->__anon1.us;
6981 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6984 exp->expType = op1->type;
6986 op1->type->refCount++;
6991 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6993 char value2 = op2->__anon1.c;
6996 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
6999 exp->expType = op1->type;
7001 op1->type->refCount++;
7006 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7008 unsigned char value2 = op2->__anon1.uc;
7011 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7014 exp->expType = op1->type;
7016 op1->type->refCount++;
7021 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7023 float value2 = op2->__anon1.f;
7026 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7029 exp->expType = op1->type;
7031 op1->type->refCount++;
7036 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7038 double value2 = op2->__anon1.d;
7041 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7044 exp->expType = op1->type;
7046 op1->type->refCount++;
7051 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7054 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7057 exp->expType = op1->type;
7059 op1->type->refCount++;
7064 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7067 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7070 exp->expType = op1->type;
7072 op1->type->refCount++;
7077 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7080 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7083 exp->expType = op1->type;
7085 op1->type->refCount++;
7090 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7093 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7096 exp->expType = op1->type;
7098 op1->type->refCount++;
7103 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7106 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7109 exp->expType = op1->type;
7111 op1->type->refCount++;
7116 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7119 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7122 exp->expType = op1->type;
7124 op1->type->refCount++;
7129 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7132 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7135 exp->expType = op1->type;
7137 op1->type->refCount++;
7142 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7145 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7148 exp->expType = op1->type;
7150 op1->type->refCount++;
7155 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7157 if(type->name && type->name[0])
7160 strcat(string, type->name);
7163 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7169 strcat(string, name);
7174 static void PrintAttribs(struct Type * type, char * string)
7179 strcat(string, "dllexport ");
7180 if(type->attrStdcall)
7181 strcat(string, "stdcall ");
7185 static struct Type * FindMember(struct Type * type, char * string)
7187 struct Type * memberType;
7189 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7191 if(!memberType->name)
7193 struct Type * subType = FindMember(memberType, string);
7198 else if(!strcmp(memberType->name, string))
7201 return (((void *)0));
7204 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7206 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7208 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7210 unsigned int result = 0;
7215 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7216 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7220 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7221 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7224 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)
7225 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7228 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)
7229 result = GetOpFloat(op, &op->__anon1.f);
7232 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)
7233 result = GetOpDouble(op, &op->__anon1.d);
7236 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)
7237 result = GetOpUInt64(op, &op->__anon1.ui64);
7240 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)
7241 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7244 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7245 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7248 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7249 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7255 struct OpTable floatOps =
7257 (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)
7260 struct OpTable doubleOps =
7262 (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)
7265 struct OpTable intOps =
7267 (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)
7270 struct OpTable uintOps =
7272 (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)
7275 struct OpTable int64Ops =
7277 (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)
7280 struct OpTable uint64Ops =
7282 (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)
7285 struct OpTable shortOps =
7287 (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)
7290 struct OpTable ushortOps =
7292 (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)
7295 struct OpTable charOps =
7297 (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)
7300 struct OpTable ucharOps =
7302 (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)
7305 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7307 struct Type * memberType;
7309 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7311 if(!memberType->name)
7313 struct Type * subType = FindMember(memberType, string);
7317 *offset += memberType->offset;
7321 else if(!strcmp(memberType->name, string))
7323 *offset += memberType->offset;
7327 return (((void *)0));
7330 struct __ecereNameSpace__ecere__com__Module;
7332 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);
7334 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7336 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);
7338 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);
7340 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7342 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7347 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7348 struct __ecereNameSpace__ecere__sys__BTNode * left;
7349 struct __ecereNameSpace__ecere__sys__BTNode * right;
7351 struct __ecereNameSpace__ecere__com__Instance * module;
7352 char * dataTypeString;
7353 struct Type * dataType;
7358 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);
7360 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7362 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);
7364 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7366 struct __ecereNameSpace__ecere__com__DefinedExpression;
7368 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7370 struct __ecereNameSpace__ecere__com__DefinedExpression
7372 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7373 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7376 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7379 struct __ecereNameSpace__ecere__sys__BinaryTree;
7381 struct __ecereNameSpace__ecere__sys__BinaryTree
7383 struct __ecereNameSpace__ecere__sys__BTNode * root;
7385 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7386 void (* FreeKey)(void * key);
7389 struct __ecereNameSpace__ecere__com__Class
7391 struct __ecereNameSpace__ecere__com__Class * prev;
7392 struct __ecereNameSpace__ecere__com__Class * next;
7398 unsigned int (* Constructor)(void * );
7399 void (* Destructor)(void * );
7402 struct __ecereNameSpace__ecere__com__Class * base;
7403 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7404 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7405 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7406 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7407 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7408 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7412 struct __ecereNameSpace__ecere__com__Instance * module;
7413 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7414 const char * dataTypeString;
7415 struct Type * dataType;
7417 int defaultAlignment;
7418 void (* Initialize)();
7420 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7421 const char * designerClass;
7422 unsigned int noExpansion;
7423 const char * defaultProperty;
7424 unsigned int comRedefinition;
7427 unsigned int internalDecl;
7429 unsigned int computeSize;
7430 short structAlignment;
7431 short pointerAlignment;
7432 int destructionWatchOffset;
7434 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7435 int inheritanceAccess;
7436 const char * fullName;
7438 struct __ecereNameSpace__ecere__sys__OldList conversions;
7439 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7440 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7441 struct __ecereNameSpace__ecere__com__Class * templateClass;
7442 struct __ecereNameSpace__ecere__sys__OldList templatized;
7444 unsigned int isInstanceClass;
7445 unsigned int byValueSystemClass;
7448 struct __ecereNameSpace__ecere__com__NameSpace
7451 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7452 struct __ecereNameSpace__ecere__com__NameSpace * left;
7453 struct __ecereNameSpace__ecere__com__NameSpace * right;
7455 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7456 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7457 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7458 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7459 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7462 struct __ecereNameSpace__ecere__com__DataMember
7464 struct __ecereNameSpace__ecere__com__DataMember * prev;
7465 struct __ecereNameSpace__ecere__com__DataMember * next;
7467 unsigned int isProperty;
7470 struct __ecereNameSpace__ecere__com__Class * _class;
7471 const char * dataTypeString;
7472 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7473 struct Type * dataType;
7477 struct __ecereNameSpace__ecere__sys__OldList members;
7478 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7480 short structAlignment;
7481 short pointerAlignment;
7484 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7486 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7488 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7490 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7492 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7494 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7496 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7500 if(type->kind == 11)
7502 struct Type * param;
7504 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7505 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7506 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7508 else if(type->kind == 13)
7509 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7510 else if(type->kind == 8)
7512 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7514 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7516 else if(type->kind == 9 || type->kind == 10)
7518 struct Type * member;
7520 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7521 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7523 else if(type->kind == 12)
7524 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7528 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7530 unsigned int status = 1;
7532 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))
7534 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7535 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7537 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7539 struct Type * sourceType = source, * destType = dest;
7541 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7542 sourceType = sourceType->__anon1.type;
7543 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7544 destType = destType->__anon1.type;
7545 if(!destType->constant && sourceType->constant)
7549 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7556 struct Operand GetOperand(struct Expression * exp)
7565 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7568 struct Type * type = exp->expType;
7572 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))
7574 if(!type->__anon1._class->__anon1.registered->dataType)
7575 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7576 type = type->__anon1._class->__anon1.registered->dataType;
7578 if(exp->type == 3 && op.kind == 13)
7580 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7584 else if(exp->isConstant && exp->type == 2)
7586 op.kind = type->kind;
7593 if(exp->__anon1.__anon1.constant[0] == '\'')
7595 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7598 else if(type->isSigned)
7600 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7605 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7613 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7618 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7626 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7631 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7639 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7644 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7652 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7657 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7665 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7670 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7676 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7677 op.__anon1.f = __ecereMethod_float_inf();
7678 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7679 op.__anon1.f = -__ecereMethod_float_inf();
7680 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7681 op.__anon1.f = __ecereMethod_float_nan();
7682 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7683 op.__anon1.f = -__ecereMethod_float_nan();
7685 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7689 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7690 op.__anon1.d = __ecereMethod_double_inf();
7691 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7692 op.__anon1.d = -__ecereMethod_double_inf();
7693 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7694 op.__anon1.d = __ecereMethod_double_nan();
7695 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7696 op.__anon1.d = -__ecereMethod_double_nan();
7698 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7704 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7714 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7718 switch(_class->typeSize)
7721 if(!strcmp(_class->dataTypeString, "uint64"))
7722 v = (long long)*(uint64 *)ptr;
7724 v = *(long long *)ptr;
7727 if(!strcmp(_class->dataTypeString, "uint"))
7728 v = (long long)*(unsigned int *)ptr;
7730 v = (long long)*(int *)ptr;
7733 if(!strcmp(_class->dataTypeString, "uint16"))
7734 v = (long long)*(unsigned short *)ptr;
7736 v = (long long)*(short *)ptr;
7739 if(!strcmp(_class->dataTypeString, "byte"))
7740 v = (long long)*(unsigned char *)ptr;
7742 v = (long long)*(char *)ptr;
7748 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7750 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7751 ListAdd(specs, MkSpecifier(UNSIGNED));
7756 if(type->__anon1._class->__anon1.registered)
7758 if(!type->__anon1._class->__anon1.registered->dataType)
7759 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7760 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7765 ListAdd(specs, MkSpecifier(DOUBLE));
7768 ListAdd(specs, MkSpecifier(FLOAT));
7771 ListAdd(specs, MkSpecifier(CHAR));
7774 ListAdd(specs, MkSpecifier(_BOOL));
7777 ListAdd(specs, MkSpecifier(SHORT));
7780 ListAdd(specs, MkSpecifier(INT64));
7783 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7786 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7790 ListAdd(specs, MkSpecifier(INT));
7795 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7799 if(printConst && type->constant)
7800 strcat(string, "const ");
7805 struct Symbol * c = type->__anon1._class;
7806 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7808 if(type->classObjectType == 2 && isObjectBaseClass)
7809 strcat(string, "typed_object");
7810 else if(type->classObjectType == 3 && isObjectBaseClass)
7811 strcat(string, "any_object");
7815 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7817 if(type->byReference)
7818 strcat(string, " &");
7822 strcat(string, "void");
7825 strcat(string, type->isSigned ? "int" : "uint");
7828 strcat(string, type->isSigned ? "int64" : "uint64");
7831 strcat(string, type->isSigned ? "intptr" : "uintptr");
7834 strcat(string, type->isSigned ? "intsize" : "uintsize");
7837 strcat(string, type->isSigned ? "char" : "byte");
7840 strcat(string, "_Bool");
7843 strcat(string, type->isSigned ? "short" : "uint16");
7846 strcat(string, "float");
7849 strcat(string, "double");
7852 if(type->__anon1.__anon1.enumName)
7854 strcat(string, "struct ");
7855 strcat(string, type->__anon1.__anon1.enumName);
7857 else if(type->typeName)
7858 strcat(string, type->typeName);
7861 struct Type * member;
7863 strcat(string, "struct { ");
7864 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7866 PrintType(member, string, 1, fullName);
7867 strcat(string, "; ");
7869 strcat(string, "}");
7873 if(type->__anon1.__anon1.enumName)
7875 strcat(string, "union ");
7876 strcat(string, type->__anon1.__anon1.enumName);
7878 else if(type->typeName)
7879 strcat(string, type->typeName);
7882 strcat(string, "union ");
7883 strcat(string, "(unnamed)");
7887 if(type->__anon1.__anon1.enumName)
7889 strcat(string, "enum ");
7890 strcat(string, type->__anon1.__anon1.enumName);
7892 else if(type->typeName)
7893 strcat(string, type->typeName);
7895 strcat(string, "int");
7898 strcat(string, "...");
7901 strcat(string, "subclass(");
7902 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7903 strcat(string, ")");
7906 strcat(string, type->__anon1.templateParameter->identifier->string);
7909 strcat(string, "thisclass");
7912 strcat(string, "__builtin_va_list");
7918 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7920 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7922 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7924 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7926 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7928 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7930 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7932 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7934 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7936 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7938 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7940 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7942 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7944 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7946 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7948 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7950 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7954 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7956 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7958 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7960 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7962 struct __ecereNameSpace__ecere__com__Application
7965 const char * * argv;
7967 unsigned int isGUIApp;
7968 struct __ecereNameSpace__ecere__sys__OldList allModules;
7969 char * parsedCommand;
7970 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7973 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)
7977 *curMember = (*curMember)->next;
7978 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7980 *curMember = subMemberStack[--(*subMemberStackPos)];
7981 *curMember = (*curMember)->next;
7983 while((*curMember) && (*curMember)->isProperty)
7984 *curMember = (*curMember)->next;
7985 if(subMemberStackPos)
7987 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
7989 subMemberStack[(*subMemberStackPos)++] = *curMember;
7990 *curMember = (*curMember)->members.first;
7991 while(*curMember && (*curMember)->isProperty)
7992 *curMember = (*curMember)->next;
8000 if(subMemberStackPos && *subMemberStackPos)
8002 *curMember = subMemberStack[--(*subMemberStackPos)];
8003 *curMember = (*curMember)->next;
8007 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8009 if(*curClass == _class)
8011 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8013 *curMember = (*curClass)->membersAndProperties.first;
8015 while((*curMember) && (*curMember)->isProperty)
8016 *curMember = (*curMember)->next;
8017 if(subMemberStackPos)
8019 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8021 subMemberStack[(*subMemberStackPos)++] = *curMember;
8022 *curMember = (*curMember)->members.first;
8023 while(*curMember && (*curMember)->isProperty)
8024 *curMember = (*curMember)->next;
8031 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8033 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8034 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8035 struct __ecereNameSpace__ecere__com__NameSpace * child;
8039 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)))
8041 data = ScanGlobalData(child, name);
8049 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8051 int nsLen = strlen(nameSpace);
8052 struct Symbol * symbol;
8054 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)))
8056 char * s = symbol->string;
8058 if(!strncmp(s, nameSpace, nsLen))
8063 for(c = strlen(s) - 1; c >= 0; c--)
8066 namePart = s + c + 1;
8067 if(!strcmp(namePart, name))
8075 return (((void *)0));
8078 unsigned int GetInt(struct Expression * exp, int * value2)
8080 struct Operand op2 = GetOperand(exp);
8082 return GetOpInt(&op2, value2);
8085 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8087 struct Operand op2 = GetOperand(exp);
8089 return GetOpUInt(&op2, value2);
8092 unsigned int GetInt64(struct Expression * exp, long long * value2)
8094 struct Operand op2 = GetOperand(exp);
8096 return GetOpInt64(&op2, value2);
8099 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8101 struct Operand op2 = GetOperand(exp);
8103 return GetOpUInt64(&op2, value2);
8106 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8108 struct Operand op2 = GetOperand(exp);
8110 return GetOpIntPtr(&op2, value2);
8113 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8115 struct Operand op2 = GetOperand(exp);
8117 return GetOpUIntPtr(&op2, value2);
8120 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8122 struct Operand op2 = GetOperand(exp);
8124 return GetOpIntSize(&op2, value2);
8127 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8129 struct Operand op2 = GetOperand(exp);
8131 return GetOpUIntSize(&op2, value2);
8134 unsigned int GetShort(struct Expression * exp, short * value2)
8136 struct Operand op2 = GetOperand(exp);
8138 return GetOpShort(&op2, value2);
8141 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8143 struct Operand op2 = GetOperand(exp);
8145 return GetOpUShort(&op2, value2);
8148 unsigned int GetChar(struct Expression * exp, char * value2)
8150 struct Operand op2 = GetOperand(exp);
8152 return GetOpChar(&op2, value2);
8155 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8157 struct Operand op2 = GetOperand(exp);
8159 return GetOpUChar(&op2, value2);
8162 unsigned int GetFloat(struct Expression * exp, float * value2)
8164 struct Operand op2 = GetOperand(exp);
8166 return GetOpFloat(&op2, value2);
8169 unsigned int GetDouble(struct Expression * exp, double * value2)
8171 struct Operand op2 = GetOperand(exp);
8173 return GetOpDouble(&op2, value2);
8176 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8178 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8180 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8181 PrintAttribs(type, string);
8182 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8183 strcat(string, " const");
8184 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8185 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8186 strcat(string, " (");
8187 if(type->kind == 13)
8189 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8190 PrintAttribs(type->__anon1.type, string);
8192 if(type->kind == 13)
8194 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8195 strcat(string, "*");
8197 strcat(string, " *");
8199 if(printConst && type->constant && type->kind == 13)
8200 strcat(string, " const");
8203 PrintTypeSpecs(type, string, fullName, printConst);
8206 void PrintExpression(struct Expression * exp, char * string)
8209 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8211 unsigned int backOutputLineNumbers = outputLineNumbers;
8213 outputLineNumbers = 0;
8215 OutputExpression(exp, f);
8216 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8217 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8219 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8220 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8221 count = strlen(string);
8222 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8223 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8225 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8226 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8227 string[count] = '\0';
8228 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8229 outputLineNumbers = backOutputLineNumbers;
8233 struct Type * Dereference(struct Type * source)
8235 struct Type * type = (((void *)0));
8239 if(source->kind == 13 || source->kind == 12)
8241 type = source->__anon1.type;
8242 source->__anon1.type->refCount++;
8244 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8246 type = __extension__ ({
8247 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8249 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8252 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8258 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8263 static struct Type * Reference(struct Type * source)
8265 struct Type * type = (((void *)0));
8269 type = __extension__ ({
8270 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8272 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8279 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8281 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8283 FreeExpContents(checkedExp);
8284 FreeType(checkedExp->expType);
8285 FreeType(checkedExp->destType);
8286 *checkedExp = *newExp;
8287 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8288 checkedExp->prev = prev;
8289 checkedExp->next = next;
8292 void FinishTemplatesContext(struct Context * context)
8294 PopContext(context);
8295 FreeContext(context);
8296 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8299 static __attribute__((unused)) void UnusedFunction()
8303 ((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);
8306 struct Expression * ParseExpressionString(char * expression)
8309 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8310 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8311 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8313 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8314 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8315 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8316 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8318 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8319 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8321 parsedExpression = (((void *)0));
8323 expression_yyparse();
8324 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8325 return parsedExpression;
8328 struct __ecereNameSpace__ecere__com__Module
8330 struct __ecereNameSpace__ecere__com__Instance * application;
8331 struct __ecereNameSpace__ecere__sys__OldList classes;
8332 struct __ecereNameSpace__ecere__sys__OldList defines;
8333 struct __ecereNameSpace__ecere__sys__OldList functions;
8334 struct __ecereNameSpace__ecere__sys__OldList modules;
8335 struct __ecereNameSpace__ecere__com__Instance * prev;
8336 struct __ecereNameSpace__ecere__com__Instance * next;
8342 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8343 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8346 static struct GlobalData * FindGlobalData(char * name)
8349 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8351 nameSpace = globalData;
8352 for(c = 0; name[c]; c++)
8354 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8356 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8357 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8359 strncpy(spaceName, name + start, c - start);
8360 spaceName[c - start] = '\0';
8361 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8362 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8364 return (((void *)0));
8365 nameSpace = newSpace;
8373 return ScanGlobalData(nameSpace, name + start);
8375 return (((void *)0));
8378 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8381 char nameSpace[1024];
8382 const char * namePart;
8383 unsigned int gotColon = 0;
8385 nameSpace[0] = '\0';
8386 for(c = strlen(name) - 1; c >= 0; c--)
8392 namePart = name + c + 1;
8393 while(c >= 0 && name[c] == ':')
8397 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8401 memcpy(nameSpace, name, c + 1);
8402 nameSpace[c + 1] = (char)0;
8403 return ScanWithNameSpace(tree, nameSpace, namePart);
8407 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8413 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8417 return ScanWithNameSpace(tree, "", namePart);
8419 return (((void *)0));
8422 static void PrintArraySize(struct Type * arrayType, char * string)
8428 if(arrayType->__anon1.__anon4.enumClass)
8429 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8430 else if(arrayType->__anon1.__anon4.arraySizeExp)
8431 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8433 strcat(string, size);
8436 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8441 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8443 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8444 strcat(string, ")");
8445 if(type->kind == 12)
8446 PrintArraySize(type, string);
8447 else if(type->kind == 11)
8449 struct Type * param;
8451 strcat(string, "(");
8452 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8454 PrintType(param, string, 1, fullName);
8456 strcat(string, ", ");
8458 strcat(string, ")");
8460 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8461 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8464 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8466 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8467 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8468 strcat(string, " ");
8469 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8471 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8473 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8475 if(type->classObjectType == 1)
8476 strcat(string, "class");
8478 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8480 else if(_class && _class->string)
8482 char * s = _class->string;
8488 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8494 strcat(string, name);
8497 strcat(string, "::");
8499 if(printName && type->name)
8500 PrintName(type, string, fullName);
8501 PostPrintType(type, string, fullName);
8502 if(type->bitFieldCount)
8506 sprintf(count, ":%d", type->bitFieldCount);
8507 strcat(string, count);
8515 struct Conversion * prev, * next;
8516 struct __ecereNameSpace__ecere__com__Property * convert;
8518 struct Type * resultType;
8521 static void FreeConvert(struct Conversion * convert)
8523 if(convert->resultType)
8524 FreeType(convert->resultType);
8531 struct Enumerator * prev;
8532 struct Enumerator * next;
8533 struct Location loc;
8534 struct Identifier * id;
8535 struct Expression * exp;
8542 struct AsmField * prev;
8543 struct AsmField * next;
8544 struct Location loc;
8546 struct Expression * expression;
8547 struct Identifier * symbolic;
8550 struct ClassDefinition;
8554 struct Context * parent;
8555 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8556 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8557 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8558 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8561 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8562 struct ClassDefinition * classDef;
8563 unsigned int templateTypesOnly;
8564 unsigned int hasNameSpace;
8569 struct External * prev;
8570 struct External * next;
8571 struct Location loc;
8573 struct Symbol * symbol;
8576 struct FunctionDefinition * function;
8577 struct ClassDefinition * _class;
8578 struct Declaration * declaration;
8579 char * importString;
8580 struct Identifier * id;
8581 struct DBTableDef * table;
8582 } ecere_gcc_struct __anon1;
8584 struct External * fwdDecl;
8585 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8586 struct __ecereNameSpace__ecere__com__Instance * incoming;
8587 int nonBreakableIncoming;
8590 struct ClassDefinition
8592 struct ClassDefinition * prev;
8593 struct ClassDefinition * next;
8594 struct Location loc;
8595 struct Specifier * _class;
8596 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8597 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8598 struct Symbol * symbol;
8599 struct Location blockStart;
8600 struct Location nameLoc;
8602 unsigned int deleteWatchable;
8605 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8607 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8609 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8611 struct Symbol * symbol = data->symbol;
8613 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8618 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8621 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8624 struct Declaration * decl;
8625 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8626 struct Declarator * d;
8627 struct External * external;
8629 specifiers = MkList();
8630 declarators = MkList();
8631 ListAdd(specifiers, MkSpecifier(EXTERN));
8632 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8633 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8634 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8635 decl = MkDeclaration(specifiers, declarators);
8636 external = MkExternalDeclaration(decl);
8638 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8639 external->symbol = symbol;
8640 symbol->__anon2.__anon1.pointerExternal = external;
8641 DeclareType(external, data->dataType, 1, 1);
8644 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8645 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8648 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8650 struct Context * ctx;
8651 struct Symbol * symbol = (((void *)0));
8653 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8655 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8657 symbol = (((void *)0));
8662 strcpy(curName, thisNameSpace);
8663 strcat(curName, "::");
8664 strcat(curName, name);
8665 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8668 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8671 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8672 if(symbol || ctx == endContext)
8675 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8676 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8684 struct ClassDef * prev;
8685 struct ClassDef * next;
8686 struct Location loc;
8690 struct Declaration * decl;
8691 struct ClassFunction * function;
8692 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8693 struct PropertyDef * propertyDef;
8694 struct PropertyWatch * propertyWatch;
8696 struct Identifier * defaultProperty;
8699 struct Identifier * id;
8700 struct Initializer * initializer;
8701 } ecere_gcc_struct __anon1;
8702 } ecere_gcc_struct __anon1;
8709 struct PropertyDef * prev;
8710 struct PropertyDef * next;
8711 struct Location loc;
8712 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8713 struct Declarator * declarator;
8714 struct Identifier * id;
8715 struct Statement * getStmt;
8716 struct Statement * setStmt;
8717 struct Statement * issetStmt;
8718 struct Symbol * symbol;
8719 struct Expression * category;
8722 unsigned int conversion : 1;
8723 unsigned int isWatchable : 1;
8724 unsigned int isDBProp : 1;
8725 } ecere_gcc_struct __anon1;
8728 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8730 struct ClassDef * def;
8733 for(def = (*definitions).first; def; def = def->next)
8737 struct Declaration * decl = def->__anon1.decl;
8739 if(decl && decl->__anon1.__anon1.specifiers)
8741 struct Specifier * spec;
8742 unsigned int isStruct = 0;
8744 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8746 if(spec->type == 3 || spec->type == 4)
8748 if(spec->__anon1.__anon2.definitions)
8749 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8755 struct Declarator * d = (((void *)0));
8757 if(decl->__anon1.__anon1.declarators)
8759 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8761 struct Identifier * idDecl = GetDeclId(d);
8771 sprintf(id, "__anon%d", anonID++);
8772 if(!decl->__anon1.__anon1.declarators)
8773 decl->__anon1.__anon1.declarators = MkList();
8774 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8784 typedef union YYSTYPE
8789 struct Identifier * id;
8790 struct Expression * exp;
8791 struct Specifier * specifier;
8792 struct __ecereNameSpace__ecere__sys__OldList * list;
8793 struct Enumerator * enumerator;
8794 struct Declarator * declarator;
8795 struct Pointer * pointer;
8796 struct Initializer * initializer;
8797 struct InitDeclarator * initDeclarator;
8798 struct TypeName * typeName;
8799 struct Declaration * declaration;
8800 struct Statement * stmt;
8801 struct FunctionDefinition * function;
8802 struct External * external;
8803 struct Context * context;
8804 struct AsmField * asmField;
8805 struct Attrib * attrib;
8806 struct ExtDecl * extDecl;
8807 struct Attribute * attribute;
8808 struct Instantiation * instance;
8809 struct MembersInit * membersInit;
8810 struct MemberInit * memberInit;
8811 struct ClassFunction * classFunction;
8812 struct ClassDefinition * _class;
8813 struct ClassDef * classDef;
8814 struct PropertyDef * prop;
8816 struct Symbol * symbol;
8817 struct PropertyWatch * propertyWatch;
8818 struct TemplateParameter * templateParameter;
8819 struct TemplateArgument * templateArgument;
8820 struct TemplateDatatype * templateDatatype;
8821 struct DBTableEntry * dbtableEntry;
8822 struct DBIndexItem * dbindexItem;
8823 struct DBTableDef * dbtableDef;
8824 } ecere_gcc_struct YYSTYPE;
8826 extern YYSTYPE yylval;
8830 struct MemberInit * prev;
8831 struct MemberInit * next;
8832 struct Location loc;
8833 struct Location realLoc;
8834 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8835 struct Initializer * initializer;
8837 unsigned int variable;
8838 unsigned int takeOutExp;
8841 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8843 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8845 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8847 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8848 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8853 const char * dataTypeString;
8855 } ecere_gcc_struct __anon1;
8856 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8860 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8862 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8864 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8865 struct __ecereNameSpace__ecere__com__Class * sClass;
8867 for(sClass = _class; sClass; sClass = sClass->base)
8870 if(sClass->templateClass)
8871 sClass = sClass->templateClass;
8872 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8874 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8876 for(sClass = sClass->base; sClass; sClass = sClass->base)
8878 if(sClass->templateClass)
8879 sClass = sClass->templateClass;
8880 id += sClass->templateParams.count;
8891 arg = &_class->templateArgs[id];
8892 if(arg && param->type == 0)
8893 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8898 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8900 struct Context * context = PushContext();
8902 context->templateTypesOnly = 1;
8903 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8905 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8907 for(; param; param = param->next)
8909 if(param->type == 0 && param->identifier)
8911 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8913 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8919 struct __ecereNameSpace__ecere__com__Class * sClass;
8921 for(sClass = _class; sClass; sClass = sClass->base)
8923 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8925 for(p = sClass->templateParams.first; p; p = p->next)
8929 struct TemplateParameter * param = p->param;
8930 struct TemplatedType * type;
8934 p->param = param = __extension__ ({
8935 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8937 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8940 type = __extension__ ({
8941 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8943 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8945 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8953 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8955 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8957 unsigned int first = 1;
8959 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8961 char className[1024];
8963 strcpy(className, _class->fullName);
8964 for(param = _class->templateParams.first; param; param = param->next)
8968 strcat(className, "<");
8970 strcat(className, ", ");
8971 if(lastParam + 1 != p)
8973 strcat(className, param->name);
8974 strcat(className, " = ");
8976 strcat(className, param->name);
8984 int len = strlen(className);
8986 if(className[len - 1] == '>')
8987 className[len++] = ' ';
8988 className[len++] = '>';
8989 className[len++] = '\0';
8991 return __ecereNameSpace__ecere__sys__CopyString(className);
8994 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
8997 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9001 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9003 unsigned int first = 1;
9005 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9007 char className[1024];
9009 strcpy(className, _class->fullName);
9010 for(param = _class->templateParams.first; param; param = param->next)
9014 strcat(className, "<");
9016 strcat(className, ", ");
9017 if(lastParam + 1 != p)
9019 strcat(className, param->name);
9020 strcat(className, " = ");
9022 strcat(className, param->name);
9030 int len = strlen(className);
9032 if(className[len - 1] == '>')
9033 className[len++] = ' ';
9034 className[len++] = '>';
9035 className[len++] = '\0';
9037 type = MkClassType(className);
9041 type = MkClassType(_class->fullName);
9046 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9048 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9049 struct __ecereNameSpace__ecere__com__DataMember * member;
9050 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9052 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9053 DeclareMembers(neededBy, _class->base, 0);
9054 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9056 if(!member->isProperty)
9058 switch(member->type)
9062 if(!member->dataType && member->dataTypeString)
9063 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9064 if(member->dataType)
9065 DeclareType(neededBy, member->dataType, 1, 0);
9071 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9078 FinishTemplatesContext(context);
9079 return topMember ? topMember->memberID : _class->memberID;
9082 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9084 if(!method->dataType)
9086 struct Context * context = SetupTemplatesContext(method->_class);
9088 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9089 FinishTemplatesContext(context);
9090 if(method->type != 1 && method->dataType)
9092 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9094 if(!method->_class->symbol)
9095 method->_class->symbol = FindClass(method->_class->fullName);
9096 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9102 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9106 struct Context * context = SetupTemplatesContext(prop->_class);
9108 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9109 FinishTemplatesContext(context);
9113 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9115 if(specs != (((void *)0)) && _class)
9117 struct Specifier * spec;
9119 for(spec = specs->first; spec; spec = spec->next)
9121 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9124 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9125 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9131 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9133 struct Identifier * id = exp->__anon1.__anon1.identifier;
9134 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9135 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9136 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9137 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9139 if(_class && _class->type == 4)
9141 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9142 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9146 struct __ecereNameSpace__ecere__com__Class * baseClass;
9148 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9150 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9152 for(value = e->values.first; value; value = value->next)
9154 if(!strcmp(value->name, id->string))
9159 exp->isConstant = 1;
9160 if(inCompiler || inPreCompiler || inDebugger)
9164 FreeExpContents(exp);
9166 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9167 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9169 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9170 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9172 exp->expType = MkClassType(baseClass->fullName);
9180 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9182 ProcessMethodType(method);
9183 exp->expType = __extension__ ({
9184 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9186 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9190 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9193 ProcessPropertyType(prop);
9194 exp->expType = prop->dataType;
9196 prop->dataType->refCount++;
9199 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9201 if(!member->dataType)
9202 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9203 exp->expType = member->dataType;
9204 if(member->dataType)
9205 member->dataType->refCount++;
9208 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9210 if(!classProp->dataType)
9211 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9212 if(classProp->constant)
9214 FreeExpContents(exp);
9215 exp->isConstant = 1;
9216 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9219 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9226 sprintf(constant, "%d", (int)classProp->Get(_class));
9227 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9233 exp->expType = classProp->dataType;
9234 if(classProp->dataType)
9235 classProp->dataType->refCount++;
9241 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9243 struct Symbol * symbol = prop->symbol;
9244 unsigned int imported = 0;
9245 unsigned int dllImport = 0;
9246 struct External * structExternal = (((void *)0));
9247 struct External * instExternal = (((void *)0));
9249 strcpy(setName, "__ecereProp_");
9250 FullClassNameCat(setName, prop->_class->fullName, 0);
9251 strcat(setName, "_Set_");
9252 FullClassNameCat(setName, prop->name, 1);
9253 strcpy(getName, "__ecereProp_");
9254 FullClassNameCat(getName, prop->_class->fullName, 0);
9255 strcat(getName, "_Get_");
9256 FullClassNameCat(getName, prop->name, 1);
9257 if(!symbol || symbol->_import)
9261 struct Symbol * classSym;
9263 if(!prop->_class->symbol)
9264 prop->_class->symbol = FindClass(prop->_class->fullName);
9265 classSym = prop->_class->symbol;
9266 if(classSym && !classSym->_import)
9268 struct ModuleImport * module;
9270 if(prop->_class->module)
9271 module = FindModule(prop->_class->module);
9273 module = mainModule;
9274 classSym->_import = __extension__ ({
9275 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9277 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9279 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9281 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9282 symbol->_import = (struct ClassImport *)__extension__ ({
9283 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9285 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9288 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9291 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)
9296 struct Context * context = SetupTemplatesContext(prop->_class);
9298 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9299 FinishTemplatesContext(context);
9301 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9303 if(prop->_class->type == 0 && prop->_class->structSize)
9304 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9305 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9307 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9309 struct Declaration * decl;
9310 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9311 struct Declarator * d;
9312 struct __ecereNameSpace__ecere__sys__OldList * params;
9313 struct Specifier * spec = (((void *)0));
9314 struct External * external;
9315 struct Declarator * typeDecl;
9316 unsigned int simple = 0;
9317 unsigned int needReference;
9319 specifiers = MkList();
9320 declarators = MkList();
9322 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9323 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9325 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9327 struct Context * context = SetupTemplatesContext(prop->_class);
9329 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9330 FinishTemplatesContext(context);
9332 needReference = !typeDecl || typeDecl->type == 1;
9333 for(spec = (*specifiers).first; spec; spec = spec->next)
9337 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9341 symbol->_class = classSym->__anon1.registered;
9342 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9349 d = PlugDeclarator(typeDecl, d);
9352 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9353 specifiers = MkList();
9355 d = MkDeclaratorFunction(d, params);
9357 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9358 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9359 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9361 ListAdd(specifiers, MkSpecifier(VOID));
9362 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9363 decl = MkDeclaration(specifiers, declarators);
9364 external = MkExternalDeclaration(decl);
9366 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9368 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9370 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9371 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9372 external->symbol = symbol;
9373 symbol->__anon2.__anon2.externalGet = external;
9374 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9376 FreeDeclarator(typeDecl);
9378 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9380 struct Declaration * decl;
9381 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9382 struct Declarator * d;
9383 struct __ecereNameSpace__ecere__sys__OldList * params;
9384 struct Specifier * spec = (((void *)0));
9385 struct External * external;
9386 struct Declarator * typeDecl;
9387 unsigned int needReference;
9389 declarators = MkList();
9391 if(!prop->conversion || prop->_class->type == 1)
9393 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9395 specifiers = MkList();
9397 struct Context * context = SetupTemplatesContext(prop->_class);
9399 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9400 FinishTemplatesContext(context);
9402 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9403 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9404 ListAdd(params, MkTypeName(specifiers, d));
9405 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9407 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9408 d = MkDeclaratorFunction(d, params);
9409 needReference = !typeDecl || typeDecl->type == 1;
9410 for(spec = (*specifiers).first; spec; spec = spec->next)
9414 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9417 symbol->_class = classSym->__anon1.registered;
9421 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9422 specifiers = MkList();
9424 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9425 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9426 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9427 if(!prop->conversion || prop->_class->type == 1)
9428 ListAdd(specifiers, MkSpecifier(VOID));
9430 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9431 decl = MkDeclaration(specifiers, declarators);
9432 external = MkExternalDeclaration(decl);
9434 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9436 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9438 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9440 external->symbol = symbol;
9441 symbol->__anon2.__anon2.externalSet = external;
9442 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9444 if(!symbol->__anon2.__anon2.externalPtr)
9446 struct Declaration * decl;
9447 struct External * external;
9448 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9449 char propName[1024];
9452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9455 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9456 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9458 ListAdd(specifiers, MkSpecifierName("Property"));
9459 strcpy(propName, "__ecereProp_");
9460 FullClassNameCat(propName, prop->_class->fullName, 0);
9461 strcat(propName, "_");
9462 FullClassNameCat(propName, prop->name, 1);
9464 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9466 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9469 strcpy(propName, "__ecerePropM_");
9470 FullClassNameCat(propName, prop->_class->fullName, 0);
9471 strcat(propName, "_");
9472 FullClassNameCat(propName, prop->name, 1);
9473 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9475 decl = MkDeclaration(specifiers, list);
9477 external = MkExternalDeclaration(decl);
9478 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9479 external->symbol = symbol;
9480 symbol->__anon2.__anon2.externalPtr = external;
9482 if(inCompiler && neededBy)
9484 if(symbol->__anon2.__anon2.externalPtr)
9485 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9486 if(symbol->__anon2.__anon2.externalGet)
9487 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9488 if(symbol->__anon2.__anon2.externalSet)
9489 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9493 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9495 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9497 struct Symbol * symbol = method->symbol;
9499 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9501 unsigned int dllImport = 0;
9503 if(!method->dataType)
9504 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9506 if(!symbol || method->type == 1)
9508 struct Symbol * classSym;
9510 if(!method->_class->symbol)
9511 method->_class->symbol = FindClass(method->_class->fullName);
9512 classSym = method->_class->symbol;
9513 if(!classSym->_import)
9515 struct ModuleImport * module;
9517 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9518 module = FindModule(method->_class->module);
9520 module = mainModule;
9521 classSym->_import = __extension__ ({
9522 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9524 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9526 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9530 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9532 if(!symbol->_import)
9534 symbol->_import = (struct ClassImport *)__extension__ ({
9535 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9537 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9543 symbol->type = method->dataType;
9545 symbol->type->refCount++;
9548 if(!method->dataType->dllExport)
9550 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)
9556 struct Declaration * decl;
9557 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9558 struct Declarator * d;
9559 struct Declarator * funcDecl;
9560 struct External * external;
9562 specifiers = MkList();
9563 declarators = MkList();
9565 ListAdd(specifiers, MkSpecifier(EXTERN));
9566 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9567 ListAdd(specifiers, MkSpecifier(STATIC));
9568 if(method->type == 1)
9570 ListAdd(specifiers, MkSpecifier(INT));
9571 d = MkDeclaratorIdentifier(MkIdentifier(name));
9575 d = MkDeclaratorIdentifier(MkIdentifier(name));
9577 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9579 struct Context * context = SetupTemplatesContext(method->_class);
9581 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9582 FinishTemplatesContext(context);
9584 funcDecl = GetFuncDecl(d);
9587 struct Specifier * spec, * next;
9589 for(spec = (*specifiers).first; spec; spec = next)
9594 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9595 FreeSpecifier(spec);
9599 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9601 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9603 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9604 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")));
9605 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9606 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9608 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9610 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9612 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9613 FreeTypeName(param);
9615 if(!funcDecl->__anon1.function.parameters)
9616 funcDecl->__anon1.function.parameters = MkList();
9617 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9621 ProcessDeclarator(d, 1);
9622 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9623 decl = MkDeclaration(specifiers, declarators);
9624 ReplaceThisClassSpecifiers(specifiers, method->_class);
9625 external = MkExternalDeclaration(decl);
9626 external->symbol = symbol;
9627 symbol->__anon2.__anon1.pointerExternal = external;
9628 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9629 DeclareStruct(external, method->_class->fullName, 1, 1);
9630 if(method->dataType)
9631 DeclareType(external, method->dataType, 1, 1);
9634 if(inCompiler && neededFor)
9636 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9638 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9642 struct __ecereNameSpace__ecere__com__GlobalFunction;
9644 struct __ecereNameSpace__ecere__com__GlobalFunction
9646 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9647 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9650 struct __ecereNameSpace__ecere__com__Instance * module;
9651 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9652 const char * dataTypeString;
9653 struct Type * dataType;
9657 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9659 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);
9661 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9663 struct Symbol * symbol = function->symbol;
9665 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9667 unsigned int imported = 0;
9668 unsigned int dllImport = 0;
9670 if(!function->dataType)
9672 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9673 if(!function->dataType->__anon1.__anon2.thisClass)
9674 function->dataType->__anon1.__anon2.staticMethod = 1;
9680 struct ModuleImport * module = FindModule(function->module);
9682 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9685 if(!function->dataType->dllExport)
9687 symbol->_import = (struct ClassImport *)__extension__ ({
9688 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9690 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9692 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9696 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9697 if(!symbol->type->__anon1.__anon2.thisClass)
9698 symbol->type->__anon1.__anon2.staticMethod = 1;
9701 imported = symbol->_import ? 1 : 0;
9702 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9708 struct Declaration * decl;
9709 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9710 struct Declarator * d;
9711 struct Declarator * funcDecl;
9712 struct External * external;
9714 specifiers = MkList();
9715 declarators = MkList();
9716 ListAdd(specifiers, MkSpecifier(EXTERN));
9717 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9719 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9720 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9721 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9723 struct Specifier * spec;
9725 for(spec = (*specifiers).first; spec; spec = spec->next)
9726 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9728 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9729 FreeSpecifier(spec);
9733 funcDecl = GetFuncDecl(d);
9734 if(funcDecl && !funcDecl->__anon1.function.parameters)
9736 funcDecl->__anon1.function.parameters = MkList();
9737 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9739 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9741 struct Context * oldCtx = curContext;
9743 curContext = globalContext;
9744 decl = MkDeclaration(specifiers, declarators);
9745 curContext = oldCtx;
9747 external = MkExternalDeclaration(decl);
9748 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9749 external->symbol = symbol;
9750 symbol->__anon2.__anon1.pointerExternal = external;
9751 DeclareType(external, function->dataType, 1, 1);
9755 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9756 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9757 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;
9760 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9762 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9769 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9770 strcpy(name, "__ecereFunction_");
9771 FullClassNameCat(name, s, 0);
9772 DeclareFunction(neededBy, function, name);
9775 FindSymbol(s, globalContext, globalContext, 0, 0);
9778 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9780 char propName[1024], propNameM[1024];
9781 char getName[1024], setName[1024];
9782 struct __ecereNameSpace__ecere__sys__OldList * args;
9784 DeclareProperty(curExternal, prop, setName, getName);
9785 strcpy(propName, "__ecereProp_");
9786 FullClassNameCat(propName, prop->_class->fullName, 0);
9787 strcat(propName, "_");
9788 FullClassNameCat(propName, prop->name, 1);
9789 strcpy(propNameM, "__ecerePropM_");
9790 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9791 strcat(propNameM, "_");
9792 FullClassNameCat(propNameM, prop->name, 1);
9793 if(prop->isWatchable)
9796 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9797 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9798 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9800 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9801 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9802 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9803 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9807 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9808 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9809 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9811 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9812 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9813 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9814 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9816 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9817 curFunction->propSet->fireWatchersDone = 1;
9820 struct __ecereNameSpace__ecere__com__SubModule;
9822 struct __ecereNameSpace__ecere__com__SubModule
9824 struct __ecereNameSpace__ecere__com__SubModule * prev;
9825 struct __ecereNameSpace__ecere__com__SubModule * next;
9826 struct __ecereNameSpace__ecere__com__Instance * module;
9830 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9832 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9834 if(searchFor == searchIn)
9836 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9838 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9840 if(ModuleVisibility(subModule->module, searchFor))
9847 void ProcessExpressionType(struct Expression * exp);
9849 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9851 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9853 struct Identifier * id = exp->__anon1.__anon1.identifier;
9854 struct Context * ctx;
9855 struct Symbol * symbol = (((void *)0));
9857 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9859 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9861 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9866 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))))
9868 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9869 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9870 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9871 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9875 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9877 if(!prop && !method)
9878 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9879 if(!prop && !method && !member)
9881 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9883 if(prop || method || member || classProp)
9886 exp->__anon1.member.member = id;
9887 exp->__anon1.member.memberType = 0;
9888 exp->__anon1.member.exp = QMkExpId("this");
9891 else if(_class && _class->templateParams.first)
9893 struct __ecereNameSpace__ecere__com__Class * sClass;
9895 for(sClass = _class; sClass; sClass = sClass->base)
9897 if(sClass->templateParams.first)
9899 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9901 for(param = sClass->templateParams.first; param; param = param->next)
9903 if(param->type == 2 && !strcmp(param->name, id->string))
9905 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9909 struct Declarator * decl;
9910 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9912 FreeIdentifier(exp->__anon1.member.member);
9913 ProcessExpressionType(argExp);
9914 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9915 exp->expType = ProcessType(specs, decl);
9917 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9928 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9930 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9932 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9934 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9935 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9938 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9939 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9941 void * ptr = inst->data + dataMember->offset + offset;
9942 char * result = (((void *)0));
9944 exp->loc = member->loc = inst->loc;
9945 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9946 if(!dataMember->dataType)
9947 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9948 type = dataMember->dataType;
9951 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9953 if(_class->type == 4)
9955 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9959 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9960 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9962 for(item = e->values.first; item; item = item->next)
9964 if(item->data == GetEnumValue(_class, ptr))
9966 result = item->name;
9972 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9974 exp->destType = MkClassType(_class->fullName);
9975 ProcessExpressionType(exp);
9979 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9981 if(!_class->dataType)
9982 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9983 type = _class->dataType;
9992 FreeExpContents(exp);
9993 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
9999 FreeExpContents(exp);
10000 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10006 FreeExpContents(exp);
10007 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10013 FreeExpContents(exp);
10014 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10020 FreeExpContents(exp);
10021 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10027 FreeExpContents(exp);
10028 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10033 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10036 ListAdd(memberList, member);
10038 if(parentDataMember->type == 1)
10043 void CheckTemplateTypes(struct Expression * exp)
10045 struct Expression * nbExp = GetNonBracketsExp(exp);
10047 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10049 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10050 struct Context * context;
10051 int kind = exp->expType->kind;
10055 exp->destType->refCount++;
10057 exp->expType->refCount++;
10058 newExp->prev = (((void *)0));
10059 newExp->next = (((void *)0));
10060 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10062 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10064 if(c->type == 2 || c->type == 4 || c->type == 3)
10067 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10068 kind = c->dataType->kind;
10074 if(exp->destType->classObjectType)
10077 exp->destType->refCount--;
10079 exp->expType->refCount--;
10080 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10084 struct __ecereNameSpace__ecere__sys__OldList * specs;
10085 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10086 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10088 context = PushContext();
10089 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10090 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10091 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10093 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10094 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10095 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10096 exp->__anon1.compound->__anon1.compound.context = context;
10097 PopContext(context);
10102 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10103 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))
10104 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10106 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10111 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10113 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10114 struct Context * context;
10115 int kind = exp->expType->kind;
10119 exp->destType->refCount++;
10121 exp->expType->refCount++;
10122 newExp->prev = (((void *)0));
10123 newExp->next = (((void *)0));
10124 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10126 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10128 if(c->type == 2 || c->type == 4 || c->type == 3)
10131 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10132 kind = c->dataType->kind;
10138 if(exp->destType->classObjectType)
10141 exp->destType->refCount--;
10143 exp->expType->refCount--;
10144 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10148 struct __ecereNameSpace__ecere__sys__OldList * specs;
10149 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10150 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10152 context = PushContext();
10153 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10154 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10155 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10157 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10158 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10159 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10160 exp->__anon1.compound->__anon1.compound.context = context;
10161 PopContext(context);
10166 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10169 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10170 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)));
10171 ProcessExpressionType((*exp->__anon1.list).first);
10177 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10179 exp->needTemplateCast = 2;
10180 newExp->needCast = 1;
10181 newExp->needTemplateCast = 2;
10182 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10184 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10185 exp->needTemplateCast = 2;
10186 newExp->needCast = 1;
10187 newExp->needTemplateCast = 2;
10188 ProcessExpressionType((*exp->__anon1.list).first);
10194 if(exp->expType->kind == 20)
10196 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10200 FreeType(exp->destType);
10201 FreeType(exp->expType);
10202 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10207 char typeString[1024];
10208 struct Declarator * decl;
10209 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10211 typeString[0] = '\0';
10212 PrintType(exp->expType, typeString, 0, 0);
10213 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10215 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10216 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10217 exp->__anon1.cast.exp->needCast = 1;
10218 exp->needTemplateCast = 2;
10219 newExp->needTemplateCast = 2;
10227 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10232 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10234 if(init->__anon1.exp && !init->__anon1.exp->destType)
10236 FreeType(init->__anon1.exp->destType);
10237 init->__anon1.exp->destType = type;
10241 if(init->__anon1.exp)
10243 ProcessExpressionType(init->__anon1.exp);
10244 init->isConstant = init->__anon1.exp->isConstant;
10250 struct Expression * exp = init->__anon1.exp;
10251 struct Instantiation * inst = exp->__anon1.instance;
10252 struct MembersInit * members;
10255 init->__anon1.list = MkList();
10258 for(members = (*inst->members).first; members; members = members->next)
10260 if(members->type == 0)
10262 struct MemberInit * member;
10264 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10266 ListAdd(init->__anon1.list, member->initializer);
10267 member->initializer = (((void *)0));
10272 FreeExpression(exp);
10276 struct Initializer * i;
10277 struct Type * initializerType = (((void *)0));
10278 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10279 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10280 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10281 int subMemberStackPos = 0;
10283 if(type && type->kind == 12)
10284 initializerType = Dereference(type);
10285 else if(type && (type->kind == 9 || type->kind == 10))
10286 initializerType = type->__anon1.__anon1.members.first;
10287 for(i = (*init->__anon1.list).first; i; i = i->next)
10289 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10291 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10294 if(!curMember->dataType)
10295 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10296 initializerType = curMember->dataType;
10299 ProcessInitializer(i, initializerType);
10300 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10301 initializerType = initializerType->next;
10303 init->isConstant = 0;
10305 if(type && type->kind == 12)
10306 FreeType(initializerType);
10307 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))
10309 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10316 void PopulateInstance(struct Instantiation * inst)
10318 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10319 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10320 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10321 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10324 inst->members = MkListOne(MkMembersInitList(memberList));
10326 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10327 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10329 if(!dataMember->isProperty)
10331 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10332 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10335 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10336 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10337 struct Type * type;
10338 void * ptr = inst->data + dataMember->offset;
10339 char * result = (((void *)0));
10341 exp->loc = member->loc = inst->loc;
10342 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10343 if(!dataMember->dataType)
10344 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10345 type = dataMember->dataType;
10346 if(type->kind == 8)
10348 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10350 if(_class->type == 4)
10352 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10356 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10357 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10359 for(item = e->values.first; item; item = item->next)
10361 if(item->data == GetEnumValue(_class, ptr))
10363 result = item->name;
10370 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10372 exp->destType = MkClassType(_class->fullName);
10373 ProcessExpressionType(exp);
10376 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10378 if(!_class->dataType)
10379 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10380 type = _class->dataType;
10389 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10395 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10401 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10407 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10413 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10418 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10421 ListAdd(memberList, member);
10427 int ComputeTypeSize(struct Type * type);
10429 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10431 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10432 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10434 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))
10436 int unionMemberOffset = 0;
10441 member->memberOffset = 0;
10442 if(targetBits < sizeof(void *) * 8)
10443 member->structAlignment = (short)0;
10445 else if(targetBits < sizeof(void *) * 8)
10446 _class->structAlignment = (short)0;
10447 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10448 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10449 if(!member && _class->destructionWatchOffset)
10450 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10452 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10454 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10456 if(!dataMember->isProperty)
10458 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10460 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10466 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10468 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10470 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10472 if(!isMember && _class->type == 2 && dataMember->dataType)
10474 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10478 ComputeTypeSize(dataMember->dataType);
10479 if(bitMember->pos == -1)
10480 bitMember->pos = _class->memberOffset;
10481 if(!bitMember->size)
10482 bitMember->size = dataMember->dataType->size * 8;
10483 _class->memberOffset = bitMember->pos + bitMember->size;
10484 for(d = 0; d < bitMember->size; d++)
10490 bitMember->mask = mask << bitMember->pos;
10492 else if(dataMember->type == 0 && dataMember->dataType)
10497 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)))
10498 ComputeTypeSize(dataMember->dataType);
10499 if(dataMember->dataType->bitFieldCount)
10501 bitFields += dataMember->dataType->bitFieldCount;
10508 int size = (bitFields + 7) / 8;
10512 int __simpleStruct0;
10516 short __simpleStruct0;
10518 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10519 if(member->memberOffset % alignment)
10520 member->memberOffset += alignment - (member->memberOffset % alignment);
10522 dataMember->offset = member->memberOffset;
10523 if(member->type == 1)
10524 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10527 member->memberOffset += size;
10534 short __simpleStruct0;
10536 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10537 if(_class->memberOffset % alignment)
10538 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10540 dataMember->offset = _class->memberOffset;
10541 _class->memberOffset += size;
10545 size = dataMember->dataType->size;
10546 alignment = dataMember->dataType->alignment;
10550 int __simpleStruct0;
10554 short __simpleStruct0;
10556 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10557 if(member->memberOffset % alignment)
10558 member->memberOffset += alignment - (member->memberOffset % alignment);
10560 dataMember->offset = member->memberOffset;
10561 if(member->type == 1)
10562 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10565 member->memberOffset += size;
10572 short __simpleStruct0;
10574 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10575 if(_class->memberOffset % alignment)
10576 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10578 dataMember->offset = _class->memberOffset;
10579 _class->memberOffset += size;
10586 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10587 alignment = dataMember->structAlignment;
10590 int __simpleStruct0;
10594 short __simpleStruct0;
10596 if(member->memberOffset % alignment)
10597 member->memberOffset += alignment - (member->memberOffset % alignment);
10598 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10600 dataMember->offset = member->memberOffset;
10601 if(member->type == 1)
10602 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10604 member->memberOffset += dataMember->memberOffset;
10610 short __simpleStruct0;
10612 if(_class->memberOffset % alignment)
10613 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10614 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10616 dataMember->offset = _class->memberOffset;
10617 _class->memberOffset += dataMember->memberOffset;
10625 int size = (bitFields + 7) / 8;
10629 int __simpleStruct0;
10633 short __simpleStruct0;
10635 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10636 if(member->memberOffset % alignment)
10637 member->memberOffset += alignment - (member->memberOffset % alignment);
10639 if(member->type == 1)
10640 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10643 member->memberOffset += size;
10650 short __simpleStruct0;
10652 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10653 if(_class->memberOffset % alignment)
10654 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10656 _class->memberOffset += size;
10661 if(member && member->type == 1)
10663 member->memberOffset = unionMemberOffset;
10667 if(_class->type != 2)
10671 if(_class->structAlignment)
10673 if(_class->memberOffset % _class->structAlignment)
10674 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10676 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10679 struct __ecereNameSpace__ecere__com__Property * prop;
10681 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10683 if(prop->isProperty && prop->isWatchable)
10685 prop->watcherOffset = _class->structSize;
10686 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10691 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10693 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10695 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10697 if(deriv->computeSize)
10699 deriv->offset = _class->structSize;
10700 deriv->memberOffset = 0;
10701 deriv->structSize = deriv->offset;
10702 ComputeClassMembers(deriv, 0);
10710 FinishTemplatesContext(context);
10713 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)
10715 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10716 unsigned int totalSize = 0;
10717 unsigned int maxSize = 0;
10720 struct __ecereNameSpace__ecere__com__DataMember * member;
10722 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10726 if(!isMember && _class->base)
10728 maxSize = _class->structSize;
10730 if(_class->type == 1 || _class->type == 5)
10731 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10734 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10736 if(maxSize > baseSize)
10737 maxSize -= baseSize;
10743 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10745 if(!member->isProperty)
10747 switch(member->type)
10751 if(member->dataTypeString)
10753 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10754 struct Declarator * decl;
10756 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10757 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10758 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10759 if(!member->dataType)
10760 member->dataType = ProcessType(specs, decl);
10761 ReplaceThisClassSpecifiers(specs, topClass);
10763 struct Type * type = ProcessType(specs, decl);
10765 DeclareType(neededBy, member->dataType, 1, 0);
10768 ComputeTypeSize(member->dataType);
10769 size = member->dataType->size;
10770 alignment = member->dataType->alignment;
10773 if(totalSize % alignment)
10774 totalSize += alignment - (totalSize % alignment);
10783 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10786 sprintf(id, "__anon%d", anonID++);
10788 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10789 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10790 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10791 alignment = member->structAlignment;
10794 if(totalSize % alignment)
10795 totalSize += alignment - (totalSize % alignment);
10805 unsigned int __simpleStruct0;
10807 if(topMember && topMember->type == 1)
10808 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10810 *retSize += totalSize;
10812 else if(totalSize < maxSize && _class->type != 1000)
10814 int autoPadding = 0;
10816 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10817 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10818 if(totalSize + autoPadding < maxSize)
10820 char sizeString[50];
10822 sprintf(sizeString, "%d", maxSize - totalSize);
10823 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10829 FinishTemplatesContext(context);
10830 return topMember ? topMember->memberID : _class->memberID;
10833 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)
10838 CheckConstCompatibility(source, dest, 1);
10839 if(source->kind == 20 && dest->kind != 20)
10841 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10846 if(dest->kind == 20 && source->kind != 20)
10848 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10853 if(dest->classObjectType == 2 && dest->kind != 11)
10855 if(source->classObjectType != 3)
10859 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10867 if(source->kind != 11 && source->classObjectType == 3)
10869 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10872 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10874 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))
10877 if(dest->kind == 14 && source->kind != 0)
10879 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))
10881 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))
10883 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10885 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10887 if(conversions != (((void *)0)))
10889 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10894 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10896 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10898 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10900 if(sourceBase == destBase)
10904 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))
10908 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))
10910 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10917 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10921 if(source->kind == 8)
10923 struct __ecereNameSpace__ecere__com__Class * _class;
10925 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10927 struct __ecereNameSpace__ecere__com__Property * convert;
10929 for(convert = _class->conversions.first; convert; convert = convert->next)
10931 if(convert->memberAccess == 1 || _class->module == privateModule)
10933 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10935 if(!convert->dataType)
10936 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10937 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))
10939 if(!conversions && !convert->Get)
10941 else if(conversions != (((void *)0)))
10943 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))
10947 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10949 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10958 if(dest->kind == 8)
10960 struct __ecereNameSpace__ecere__com__Class * _class;
10962 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10964 struct __ecereNameSpace__ecere__com__Property * convert;
10966 for(convert = _class->conversions.first; convert; convert = convert->next)
10968 if(convert->memberAccess == 1 || _class->module == privateModule)
10970 struct Type * constType = (((void *)0));
10971 unsigned int success = 0;
10973 if(!convert->dataType)
10974 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10975 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10977 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10979 constType = __extension__ ({
10980 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10982 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10984 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10985 ptrType->constant = 1;
10987 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10989 if(!conversions && !convert->Set)
10991 else if(conversions != (((void *)0)))
10993 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))
10997 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10999 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
11005 FreeType(constType);
11011 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11013 if(!dest->__anon1._class->__anon1.registered->dataType)
11014 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11015 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11017 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))
11024 if(source->kind == 8)
11026 struct __ecereNameSpace__ecere__com__Class * _class;
11028 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11030 struct __ecereNameSpace__ecere__com__Property * convert;
11032 for(convert = _class->conversions.first; convert; convert = convert->next)
11034 if(convert->memberAccess == 1 || _class->module == privateModule)
11036 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11038 if(!convert->dataType)
11039 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11040 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))
11042 if(!conversions && !convert->Get)
11044 else if(conversions != (((void *)0)))
11046 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))
11050 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11052 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11060 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11062 if(!source->__anon1._class->__anon1.registered->dataType)
11063 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11064 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11066 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))
11068 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11074 if(source->kind == 8 || source->kind == 19)
11076 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11078 else if(dest->kind == 7 && source->kind == 6)
11080 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11082 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11084 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11086 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11088 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11090 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))
11092 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))
11094 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)))
11096 struct Type * paramSource, * paramDest;
11098 if(dest->kind == 16)
11099 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11100 if(source->kind == 16)
11101 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11102 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11103 dest = dest->__anon1.type;
11104 if(source->kind == 13 && source->__anon1.type->kind == 11)
11105 source = source->__anon1.type;
11106 if(dest->kind == 16)
11107 dest = dest->__anon1.__anon3.method->dataType;
11108 if(source->kind == 16)
11109 source = source->__anon1.__anon3.method->dataType;
11110 paramSource = source->__anon1.__anon2.params.first;
11111 if(paramSource && paramSource->kind == 0)
11112 paramSource = (((void *)0));
11113 paramDest = dest->__anon1.__anon2.params.first;
11114 if(paramDest && paramDest->kind == 0)
11115 paramDest = (((void *)0));
11116 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11118 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))))
11120 if(paramDest && paramDest->kind == 8)
11121 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11123 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11126 paramDest = paramDest->next;
11128 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11130 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11132 if(dest->__anon1.__anon2.thisClass)
11134 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11136 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11142 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11144 if(owningClassDest)
11145 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11147 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11151 paramSource = paramSource->next;
11155 if(dest->__anon1.__anon2.thisClass)
11157 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11159 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11165 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11167 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11173 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11175 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11179 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11180 for(; paramDest; paramDest = paramDest->next)
11184 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11188 struct Type * paramDestType = paramDest;
11189 struct Type * paramSourceType = paramSource;
11190 struct Type * type = paramDestType;
11192 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11195 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11196 struct __ecereNameSpace__ecere__com__Class * sClass;
11198 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11201 if(sClass->templateClass)
11202 sClass = sClass->templateClass;
11203 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11205 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11207 for(sClass = sClass->base; sClass; sClass = sClass->base)
11209 if(sClass->templateClass)
11210 sClass = sClass->templateClass;
11211 id += sClass->templateParams.count;
11222 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11224 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11227 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)))
11232 PrintType(paramDest, type, 0, 1);
11233 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11234 if(paramDestType != paramDest)
11235 FreeType(paramDestType);
11238 if(paramDestType != paramDest)
11239 FreeType(paramDestType);
11241 paramSource = paramSource->next;
11245 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11250 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11254 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11256 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))
11258 ComputeTypeSize(source->__anon1.type);
11259 ComputeTypeSize(dest->__anon1.type);
11260 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))
11268 void ComputeInstantiation(struct Expression * exp)
11270 struct Instantiation * inst = exp->__anon1.instance;
11271 struct MembersInit * members;
11272 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11273 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11274 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11275 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11276 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11277 int subMemberStackPos = 0;
11280 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11284 if(_class->type == 0 || _class->type == 5)
11286 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11287 if(_class->type == 0)
11288 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11291 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11295 for(members = (*inst->members).first; members; members = members->next)
11297 switch(members->type)
11301 if(members->__anon1.dataMembers)
11303 struct MemberInit * member;
11305 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11307 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11308 unsigned int found = 0;
11309 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11310 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11311 unsigned int dataMemberOffset;
11315 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11318 if(curMember->isProperty)
11319 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11322 dataMember = curMember;
11323 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11324 if(_class->type == 0)
11325 dataMemberOffset += _class->base->structSize;
11332 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11336 if(prop->memberAccess == 1)
11338 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11339 curClass = prop->_class;
11344 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11345 int _subMemberStackPos = 0;
11347 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11351 if(dataMember->memberAccess == 1)
11353 curMember = dataMember;
11354 curClass = dataMember->_class;
11355 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11356 subMemberStackPos = _subMemberStackPos;
11361 if(found && member->initializer && member->initializer->type == 0)
11363 struct Expression * value = member->initializer->__anon1.exp;
11364 struct Type * type = (((void *)0));
11365 unsigned int deepMember = 0;
11369 type = prop->dataType;
11371 else if(dataMember)
11373 if(!dataMember->dataType)
11374 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11375 type = dataMember->dataType;
11377 if(ident && ident->next)
11380 for(ident = ident->next; ident && type; ident = ident->next)
11382 if(type->kind == 8)
11384 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11386 type = prop->dataType;
11389 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11391 type = dataMember->dataType;
11394 else if(type->kind == 9 || type->kind == 10)
11396 struct Type * memberType;
11398 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11400 if(!strcmp(memberType->name, ident->string))
11411 FreeType(value->destType);
11412 value->destType = type;
11415 ComputeExpression(value);
11417 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11419 if(type->kind == 8)
11421 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11423 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11425 if(!_class->dataType)
11426 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11427 type = _class->dataType;
11432 void * ptr = inst->data + dataMemberOffset;
11434 if(value->type == 2)
11440 GetInt(value, (int *)ptr);
11445 GetInt64(value, (long long *)ptr);
11450 GetIntPtr(value, (intptr_t *)ptr);
11455 GetIntSize(value, (ssize_t *)ptr);
11460 GetFloat(value, (float *)ptr);
11465 GetDouble(value, (double *)ptr);
11470 else if(value->type == 1)
11472 if(type->kind == 8)
11474 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11476 if(_class->type == 1)
11478 ComputeTypeSize(type);
11479 if(value->__anon1.instance->data)
11480 memcpy(ptr, value->__anon1.instance->data, type->size);
11485 else if(prop && prop->Set != (void *)(intptr_t)1)
11487 if(value->type == 1 && value->__anon1.instance->data)
11489 if(type->kind == 8)
11491 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11493 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)))
11495 void (* Set)(void *, void *) = (void *)prop->Set;
11497 Set(inst->data, value->__anon1.instance->data);
11498 PopulateInstance(inst);
11502 else if(value->type == 2)
11508 void (* Set)(void *, double) = (void *)prop->Set;
11510 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11515 void (* Set)(void *, float) = (void *)prop->Set;
11517 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11522 void (* Set)(void *, int) = (void *)prop->Set;
11524 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11529 void (* Set)(void *, long long) = (void *)prop->Set;
11531 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11536 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11538 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11543 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11545 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11550 else if(value->type == 3)
11554 ReadString(temp, value->__anon1.__anon2.string);
11555 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11559 else if(!deepMember && type && _class->type == 3)
11563 if(value->type == 2)
11565 if(type->kind == 8)
11567 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11569 if(_class->type == 3)
11571 if(!_class->dataType)
11572 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11573 type = _class->dataType;
11581 float (* Set)(float) = (void *)prop->Set;
11583 GetFloat(member->initializer->__anon1.exp, &fValue);
11584 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11591 double (* Set)(double) = (void *)prop->Set;
11593 GetDouble(member->initializer->__anon1.exp, &dValue);
11594 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11602 else if(!deepMember && type && _class->type == 2)
11606 if(value->type == 1 && value->__anon1.instance->data)
11608 unsigned int (* Set)(void *) = (void *)prop->Set;
11610 bits = Set(value->__anon1.instance->data);
11612 else if(value->type == 2)
11616 else if(dataMember)
11618 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11619 struct Type * type;
11622 bits = (bits & ~bitMember->mask);
11623 if(!bitMember->dataType)
11624 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11625 type = bitMember->dataType;
11626 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11628 if(!type->__anon1._class->__anon1.registered->dataType)
11629 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11630 type = type->__anon1._class->__anon1.registered->dataType;
11639 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11647 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11656 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11664 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11672 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11680 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11685 bits |= part << bitMember->pos;
11691 if(_class && _class->type == 3)
11693 ComputeExpression(member->initializer->__anon1.exp);
11694 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11696 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11706 if(_class && _class->type == 2)
11708 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11713 FreeInstance(inst);
11717 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11719 if(exp->__anon1.op.op == SIZEOF)
11721 FreeExpContents(exp);
11723 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11727 if(!exp->__anon1.op.exp1)
11729 switch(exp->__anon1.op.op)
11733 struct Expression * exp2 = exp->__anon1.op.exp2;
11735 exp->__anon1.op.exp2 = (((void *)0));
11736 FreeExpContents(exp);
11737 FreeType(exp->expType);
11738 FreeType(exp->destType);
11740 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11746 FreeExpContents(exp);
11747 op1->ops.Neg(exp, op1);
11751 if(op1->ops.BitNot)
11753 FreeExpContents(exp);
11754 op1->ops.BitNot(exp, op1);
11760 FreeExpContents(exp);
11761 op1->ops.Not(exp, op1);
11768 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11770 if(Promote(op2, op1->kind, op1->type->isSigned))
11771 op2->kind = op1->kind, op2->ops = op1->ops;
11772 else if(Promote(op1, op2->kind, op2->type->isSigned))
11773 op1->kind = op2->kind, op1->ops = op2->ops;
11775 switch(exp->__anon1.op.op)
11780 FreeExpContents(exp);
11781 op1->ops.Add(exp, op1, op2);
11787 FreeExpContents(exp);
11788 op1->ops.Sub(exp, op1, op2);
11794 FreeExpContents(exp);
11795 op1->ops.Mul(exp, op1, op2);
11801 FreeExpContents(exp);
11802 op1->ops.Div(exp, op1, op2);
11808 FreeExpContents(exp);
11809 op1->ops.Mod(exp, op1, op2);
11813 if(exp->__anon1.op.exp2)
11815 if(op1->ops.BitAnd)
11817 FreeExpContents(exp);
11818 op1->ops.BitAnd(exp, op1, op2);
11825 FreeExpContents(exp);
11826 op1->ops.BitOr(exp, op1, op2);
11830 if(op1->ops.BitXor)
11832 FreeExpContents(exp);
11833 op1->ops.BitXor(exp, op1, op2);
11837 if(op1->ops.LShift)
11839 FreeExpContents(exp);
11840 op1->ops.LShift(exp, op1, op2);
11844 if(op1->ops.RShift)
11846 FreeExpContents(exp);
11847 op1->ops.RShift(exp, op1, op2);
11853 FreeExpContents(exp);
11854 op1->ops.Equ(exp, op1, op2);
11860 FreeExpContents(exp);
11861 op1->ops.Nqu(exp, op1, op2);
11867 FreeExpContents(exp);
11868 op1->ops.And(exp, op1, op2);
11874 FreeExpContents(exp);
11875 op1->ops.Or(exp, op1, op2);
11881 FreeExpContents(exp);
11882 op1->ops.Grt(exp, op1, op2);
11888 FreeExpContents(exp);
11889 op1->ops.Sma(exp, op1, op2);
11893 if(op1->ops.GrtEqu)
11895 FreeExpContents(exp);
11896 op1->ops.GrtEqu(exp, op1, op2);
11900 if(op1->ops.SmaEqu)
11902 FreeExpContents(exp);
11903 op1->ops.SmaEqu(exp, op1, op2);
11911 void ApplyAnyObjectLogic(struct Expression * e)
11913 struct Type * destType = e->destType;
11915 if(destType && (destType->classObjectType == 3))
11917 if(e && e->expType)
11919 struct Type * type = e->expType;
11920 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11922 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11924 _class = type->__anon1._class->__anon1.registered;
11926 else if(type->kind == 19)
11928 _class = FindClass("ecere::com::Class")->__anon1.registered;
11932 char string[1024] = "";
11933 struct Symbol * classSym;
11935 PrintTypeNoConst(type, string, 0, 1);
11936 classSym = FindClass(string);
11938 _class = classSym->__anon1.registered;
11940 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)))
11942 if(!_class || strcmp(_class->fullName, "char *"))
11944 struct Expression * checkedExp = e, * newExp;
11946 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11948 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11950 if(checkedExp->type == 23)
11952 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11955 checkedExp = (*checkedExp->__anon1.list).last;
11957 else if(checkedExp->type == 11)
11958 checkedExp = checkedExp->__anon1.cast.exp;
11960 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11962 newExp = checkedExp->__anon1.op.exp2;
11963 checkedExp->__anon1.op.exp2 = (((void *)0));
11964 FreeExpContents(checkedExp);
11965 if(e->expType && e->expType->passAsTemplate)
11969 ComputeTypeSize(e->expType);
11970 sprintf(size, "%d", e->expType->size);
11971 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))))));
11973 ReplaceExpContents(checkedExp, newExp);
11974 e->byReference = 1;
11976 else if(!e->byReference || (_class && _class->type == 5))
11978 struct Expression * checkedExp;
11981 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;
11983 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11985 struct Context * context = PushContext();
11986 struct Declarator * decl;
11987 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11988 char typeString[1024];
11989 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11991 typeString[0] = '\0';
11993 newExp->prev = (((void *)0));
11994 newExp->next = (((void *)0));
11995 newExp->expType = (((void *)0));
11996 PrintTypeNoConst(e->expType, typeString, 0, 1);
11997 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11998 newExp->destType = ProcessType(specs, decl);
11999 curContext = context;
12003 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
12006 sprintf(name, "__internalValue%03X", internalValueCounter++);
12007 if(!curCompound->__anon1.compound.declarations)
12008 curCompound->__anon1.compound.declarations = MkList();
12009 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12010 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12011 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12012 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12015 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12017 struct Type * type = e->destType;
12019 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12020 CopyTypeInto(e->destType, type);
12021 e->destType->refCount = 1;
12022 e->destType->classObjectType = 0;
12025 e->__anon1.compound->__anon1.compound.context = context;
12026 PopContext(context);
12027 curContext = context->parent;
12031 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12033 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12035 if(checkedExp->type == 23)
12037 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12040 checkedExp = (*checkedExp->__anon1.list).last;
12042 else if(checkedExp->type == 11)
12043 checkedExp = checkedExp->__anon1.cast.exp;
12046 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12048 *operand = *checkedExp;
12049 __ecereMethod_Expression_Clear(checkedExp);
12050 checkedExp->destType = ProcessTypeString("void *", 0);
12051 checkedExp->expType = checkedExp->destType;
12052 checkedExp->destType->refCount++;
12053 checkedExp->type = 4;
12054 checkedExp->__anon1.op.op = '&';
12055 checkedExp->__anon1.op.exp1 = (((void *)0));
12056 checkedExp->__anon1.op.exp2 = operand;
12065 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))))
12067 if(e->expType->classObjectType && destType && destType->classObjectType)
12073 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12076 thisExp->prev = (((void *)0));
12077 thisExp->next = (((void *)0));
12078 __ecereMethod_Expression_Clear(e);
12080 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12081 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12082 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12084 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12085 CopyTypeInto(e->expType, thisExp->expType);
12086 e->expType->byReference = 0;
12087 e->expType->refCount = 1;
12088 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))
12090 e->expType->classObjectType = 0;
12095 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12097 if(destType->kind == 14)
12099 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12101 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))
12103 unsigned int byReference = e->expType->byReference;
12104 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12105 struct Declarator * decl;
12106 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12107 char typeString[1024];
12108 struct Type * type;
12109 int backupClassObjectType;
12110 unsigned int backupByReference;
12112 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12116 backupClassObjectType = type->classObjectType;
12117 backupByReference = type->byReference;
12118 type->classObjectType = 0;
12119 type->byReference = 0;
12120 typeString[0] = '\0';
12121 PrintType(type, typeString, 0, 1);
12122 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12123 type->classObjectType = backupClassObjectType;
12124 type->byReference = backupByReference;
12126 thisExp->prev = (((void *)0));
12127 thisExp->next = (((void *)0));
12128 __ecereMethod_Expression_Clear(e);
12129 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)))
12131 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12134 destType->refCount++;
12136 e->__anon1.op.op = '*';
12137 e->__anon1.op.exp1 = (((void *)0));
12138 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12139 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12140 CopyTypeInto(t, thisExp->destType);
12141 t->passAsTemplate = 0;
12142 FreeType(thisExp->destType);
12143 thisExp->destType = t;
12144 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12145 CopyTypeInto(t, destType);
12146 t->passAsTemplate = passAsTemplate;
12147 FreeType(destType);
12149 destType->refCount = 0;
12150 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12151 CopyTypeInto(e->expType, type);
12152 if(type->passAsTemplate)
12154 e->expType->classObjectType = 0;
12155 e->expType->passAsTemplate = 0;
12157 e->expType->byReference = 0;
12158 e->expType->refCount = 1;
12163 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12164 e->__anon1.cast.exp = thisExp;
12165 e->byReference = 1;
12170 FreeType(e->destType);
12171 e->destType = destType;
12172 destType->refCount++;
12177 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12179 struct __ecereNameSpace__ecere__com__Class * _class;
12180 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12182 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12183 ComputeModuleClasses(subModule->data);
12184 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12185 ComputeClassMembers(_class, 0);
12188 int ComputeTypeSize(struct Type * type)
12190 unsigned int size = type ? type->size : 0;
12192 if(!size && type && !type->computing)
12194 type->computing = 1;
12198 type->alignment = size = sizeof(char);
12201 type->alignment = size = sizeof(char);
12204 type->alignment = size = sizeof(int);
12207 type->alignment = size = sizeof(long long);
12210 type->alignment = size = targetBits / 8;
12211 type->pointerAlignment = 1;
12214 type->alignment = size = targetBits / 8;
12215 type->pointerAlignment = 1;
12218 type->alignment = size = sizeof(long);
12221 type->alignment = size = sizeof(short);
12224 type->alignment = size = sizeof(float);
12227 type->alignment = size = sizeof(double);
12231 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12233 if(_class && _class->type == 1)
12235 ComputeClassMembers(_class, 0);
12236 type->alignment = _class->structAlignment;
12237 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12238 size = _class->structSize;
12239 if(type->alignment && size % type->alignment)
12240 size += type->alignment - (size % type->alignment);
12242 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12244 if(!_class->dataType)
12245 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12246 size = type->alignment = ComputeTypeSize(_class->dataType);
12250 size = type->alignment = targetBits / 8;
12251 type->pointerAlignment = 1;
12257 size = type->alignment = targetBits / 8;
12258 type->pointerAlignment = 1;
12261 if(type->__anon1.__anon4.arraySizeExp)
12263 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12264 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12265 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)))
12267 struct Location oldLoc = yylloc;
12268 char expression[10240];
12270 expression[0] = '\0';
12271 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12272 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12274 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12275 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12278 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12280 else if(type->__anon1.__anon4.enumClass)
12282 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12284 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12287 type->__anon1.__anon4.arraySize = 0;
12291 type->__anon1.__anon4.arraySize = 0;
12293 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12294 if(type->__anon1.type)
12296 type->alignment = type->__anon1.type->alignment;
12297 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12302 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12304 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12306 if(symbol && symbol->type)
12308 ComputeTypeSize(symbol->type);
12309 size = symbol->type->size;
12314 struct Type * member;
12316 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12318 int __simpleStruct0, __simpleStruct1;
12319 unsigned int addSize = ComputeTypeSize(member);
12321 member->offset = size;
12322 if(member->alignment && size % member->alignment)
12323 member->offset += member->alignment - (size % member->alignment);
12324 size = member->offset;
12325 if(member->pointerAlignment && type->size <= 4)
12326 type->pointerAlignment = 1;
12327 else if(!member->pointerAlignment && member->alignment >= 8)
12328 type->pointerAlignment = 0;
12329 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12332 if(type->alignment && size % type->alignment)
12333 size += type->alignment - (size % type->alignment);
12339 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12341 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12343 if(symbol && symbol->type)
12345 ComputeTypeSize(symbol->type);
12346 size = symbol->type->size;
12347 type->alignment = symbol->type->alignment;
12352 struct Type * member;
12354 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12356 int __simpleStruct0, __simpleStruct1;
12357 unsigned int addSize = ComputeTypeSize(member);
12359 member->offset = size;
12360 if(member->alignment && size % member->alignment)
12361 member->offset += member->alignment - (size % member->alignment);
12362 size = member->offset;
12363 if(member->pointerAlignment && type->size <= 4)
12364 type->pointerAlignment = 1;
12365 else if(!member->pointerAlignment && member->alignment >= 8)
12366 type->pointerAlignment = 0;
12367 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12368 size = ((size > addSize) ? size : addSize);
12370 if(type->alignment && size % type->alignment)
12371 size += type->alignment - (size % type->alignment);
12377 struct TemplateParameter * param = type->__anon1.templateParameter;
12378 struct Type * baseType = ProcessTemplateParameterType(param);
12382 size = ComputeTypeSize(baseType);
12383 type->alignment = baseType->alignment;
12384 type->pointerAlignment = baseType->pointerAlignment;
12387 type->alignment = size = sizeof(uint64);
12392 type->alignment = size = sizeof(enum
12400 type->alignment = size = targetBits / 8;
12401 type->pointerAlignment = 1;
12406 type->computing = 0;
12411 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12413 struct External * external = (((void *)0));
12414 struct Symbol * classSym = FindClass(name);
12415 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12416 struct Specifier * curSpec = (((void *)0));
12418 if(!inCompiler || !classSym)
12419 return (((void *)0));
12420 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12421 return (((void *)0));
12422 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12423 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12424 external = classSym->__anon2.__anon1.structExternal;
12425 if(external && external->__anon1.declaration)
12427 struct Specifier * spec;
12429 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12430 if(spec->type == 3 || spec->type == 4)
12433 curDeclarations = spec->__anon1.__anon2.definitions;
12437 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12439 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12440 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12441 char structName[1024];
12442 unsigned int addedPadding = 0;
12444 classSym->declaring++;
12445 if(strchr(classSym->string, '<'))
12447 if(classSym->__anon1.registered->templateClass)
12449 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12450 classSym->declaring--;
12454 structName[0] = (char)0;
12455 FullClassNameCat(structName, name, 0);
12456 classSym->declaredStructSym = 1;
12457 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12459 unsigned int add = 0;
12463 external = MkExternalDeclaration((((void *)0)));
12464 classSym->__anon2.__anon1.structExternal = external;
12465 external->symbol = classSym;
12470 declarations = MkList();
12471 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12473 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12475 FreeList(declarations, (void *)(FreeClassDef));
12476 declarations = (((void *)0));
12478 if(classSym->__anon1.registered->type != 5 && !declarations)
12480 FreeExternal(external);
12481 external = (((void *)0));
12482 classSym->__anon2.__anon1.structExternal = (((void *)0));
12487 curSpec->__anon1.__anon2.definitions = declarations;
12490 char className[1024];
12492 strcpy(className, "__ecereClass_");
12493 FullClassNameCat(className, classSym->string, 1);
12494 specifiers = MkList();
12495 declarators = MkList();
12496 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12497 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12500 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12503 classSym->declaring--;
12505 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12507 classSym->declaredStructSym = 1;
12508 if(classSym->__anon1.registered)
12509 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12510 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12512 struct Specifier * spec;
12514 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12516 if(spec->__anon1.__anon2.definitions)
12517 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12521 if(inCompiler && neededBy && (external || !classSym->imported))
12525 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12526 external->symbol = classSym;
12527 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12531 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12533 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12534 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12537 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12542 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)
12544 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12545 unsigned int found = 0;
12546 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12547 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12548 unsigned int freeType = 0;
12550 yylloc = member->loc;
12555 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12559 dataMember = *curMember;
12565 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12566 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12567 int _subMemberStackPos = 0;
12570 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12573 dataMember = thisMember;
12574 if(curMember && thisMember->memberAccess == 1)
12576 *curMember = thisMember;
12577 *curClass = thisMember->_class;
12578 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12579 *subMemberStackPos = _subMemberStackPos;
12585 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12586 if(method && method->type == 1)
12589 method = (((void *)0));
12594 struct Type * type = (((void *)0));
12598 if(!dataMember->dataType && dataMember->dataTypeString)
12600 struct Context * context = SetupTemplatesContext(_class);
12602 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12603 FinishTemplatesContext(context);
12605 type = dataMember->dataType;
12609 if(!method->dataType)
12610 ProcessMethodType(method);
12611 type = method->dataType;
12613 if(ident && ident->next)
12615 for(ident = ident->next; ident && type; ident = ident->next)
12617 if(type->kind == 8)
12619 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12621 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12623 type = dataMember->dataType;
12625 else if(type->kind == 9 || type->kind == 10)
12627 struct Type * memberType;
12629 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12631 if(!strcmp(memberType->name, ident->string))
12640 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12643 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12644 struct __ecereNameSpace__ecere__com__Class * sClass;
12646 for(sClass = _class; sClass; sClass = sClass->base)
12649 if(sClass->templateClass)
12650 sClass = sClass->templateClass;
12651 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12653 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12655 for(sClass = sClass->base; sClass; sClass = sClass->base)
12657 if(sClass->templateClass)
12658 sClass = sClass->templateClass;
12659 id += sClass->templateParams.count;
12670 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12672 if(arg.__anon1.__anon1.dataTypeString)
12674 unsigned int constant = type->constant;
12676 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12677 if(type->kind == 8 && constant)
12678 type->constant = 1;
12679 else if(type->kind == 13)
12681 struct Type * t = type->__anon1.type;
12683 while(t->kind == 13)
12684 t = t->__anon1.type;
12686 t->constant = constant;
12689 if(type && _class->templateClass)
12690 type->passAsTemplate = 1;
12697 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12699 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12700 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12701 int paramCount = 0;
12702 int lastParam = -1;
12703 char templateString[1024];
12704 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12706 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12707 for(cClass = expClass; cClass; cClass = cClass->base)
12711 if(cClass->templateClass)
12712 cClass = cClass->templateClass;
12713 for(param = cClass->templateParams.first; param; param = param->next)
12716 struct __ecereNameSpace__ecere__com__Class * sClass;
12717 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12719 for(sClass = cClass->base; sClass; sClass = sClass->base)
12721 if(sClass->templateClass)
12722 sClass = sClass->templateClass;
12723 id += sClass->templateParams.count;
12725 arg = expClass->templateArgs[id];
12726 for(sClass = _class; sClass; sClass = sClass->base)
12728 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12730 struct __ecereNameSpace__ecere__com__Class * nextClass;
12732 if(sClass->templateClass)
12733 sClass = sClass->templateClass;
12734 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12736 if(nextClass->templateClass)
12737 nextClass = nextClass->templateClass;
12738 p += nextClass->templateParams.count;
12740 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12742 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12744 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12746 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12747 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12754 char argument[256];
12756 argument[0] = '\0';
12757 switch(param->type)
12761 char expString[1024];
12762 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12763 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12764 struct Expression * exp;
12765 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12767 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12768 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12769 ProcessExpressionType(exp);
12770 ComputeExpression(exp);
12771 expString[0] = '\0';
12772 PrintExpression(exp, expString);
12773 strcat(argument, expString);
12774 FreeExpression(exp);
12779 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12784 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12785 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12792 strcat(templateString, ", ");
12793 if(lastParam != p - 1)
12795 strcat(templateString, param->name);
12796 strcat(templateString, " = ");
12798 strcat(templateString, argument);
12807 int len = strlen(templateString);
12809 if(templateString[len - 1] == '<')
12813 if(templateString[len - 1] == '>')
12814 templateString[len++] = ' ';
12815 templateString[len++] = '>';
12817 templateString[len++] = '\0';
12820 struct Context * context = SetupTemplatesContext(_class);
12824 type = ProcessTypeString(templateString, 0);
12826 FinishTemplatesContext(context);
12829 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12831 ProcessExpressionType(member->initializer->__anon1.exp);
12832 if(!member->initializer->__anon1.exp->expType)
12836 char expString[10240];
12838 expString[0] = '\0';
12839 PrintExpression(member->initializer->__anon1.exp, expString);
12840 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12841 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12844 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12846 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12849 else if(member->initializer)
12851 ProcessInitializer(member->initializer, type);
12858 if(_class && _class->type == 3)
12860 if(member->initializer)
12862 struct Type * type = MkClassType(_class->fullName);
12864 ProcessInitializer(member->initializer, type);
12870 if(member->initializer)
12872 ProcessInitializer(member->initializer, (((void *)0)));
12878 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12882 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12884 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12888 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12893 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12895 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12897 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)))
12899 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12901 if(_class->type == 4)
12903 struct __ecereNameSpace__ecere__sys__OldList converts =
12907 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12910 if(!_class->symbol)
12911 _class->symbol = FindClass(_class->fullName);
12912 type->__anon1._class = _class->symbol;
12913 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))
12915 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12916 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12920 struct __ecereNameSpace__ecere__com__Class * baseClass;
12922 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12924 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12926 for(value = e->values.first; value; value = value->next)
12928 if(!strcmp(value->name, string))
12933 FreeType(sourceExp->expType);
12934 sourceExp->isConstant = 1;
12935 sourceExp->expType = MkClassType(baseClass->fullName);
12936 if(inCompiler || inPreCompiler || inDebugger)
12938 char constant[256];
12940 FreeExpContents(sourceExp);
12941 sourceExp->type = 2;
12942 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12943 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12945 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12946 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12948 while(converts.first)
12950 struct Conversion * convert = converts.first;
12952 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12953 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12955 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12962 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12963 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12966 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)))
12967 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12972 void ComputeExpression(struct Expression * exp)
12978 struct Identifier * id = exp->__anon1.__anon1.identifier;
12980 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12982 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12984 if(c && c->type == 4)
12986 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12990 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12991 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
12993 for(value = e->values.first; value; value = value->next)
12995 if(!strcmp(value->name, id->string))
13000 const char * dts = c->dataTypeString;
13002 FreeExpContents(exp);
13004 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13013 ComputeInstantiation(exp);
13018 struct Expression * exp1, * exp2 = (((void *)0));
13019 struct Operand op1 =
13026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13029 struct Operand op2 =
13036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13040 if(exp->__anon1.op.exp2)
13042 struct Expression * e = exp->__anon1.op.exp2;
13044 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13046 if(e->type == 5 || e->type == 32 || e->type == 23)
13049 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13051 e = (*e->__anon1.list).last;
13054 if(exp->__anon1.op.op == 261 && e && e->expType)
13056 if(e->type == 3 && e->__anon1.__anon2.string)
13058 char * string = e->__anon1.__anon2.string;
13059 int len = strlen(string);
13060 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13062 len = UnescapeString(tmp, string + 1, len - 2);
13063 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13064 FreeExpContents(exp);
13066 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13070 struct Type * type = e->expType;
13073 FreeExpContents(exp);
13075 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13081 ComputeExpression(exp->__anon1.op.exp2);
13083 if(exp->__anon1.op.exp1)
13085 ComputeExpression(exp->__anon1.op.exp1);
13086 exp1 = exp->__anon1.op.exp1;
13087 exp2 = exp->__anon1.op.exp2;
13088 op1 = GetOperand(exp1);
13090 op1.type->refCount++;
13093 op2 = GetOperand(exp2);
13095 op2.type->refCount++;
13100 exp1 = exp->__anon1.op.exp2;
13101 op1 = GetOperand(exp1);
13103 op1.type->refCount++;
13105 CallOperator(exp, exp1, exp2, &op1, &op2);
13107 FreeType(op1.type);
13109 FreeType(op2.type);
13115 struct Expression * e, * n;
13117 for(e = (*exp->__anon1.list).first; e; e = n)
13122 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13123 struct Expression * prev = exp->prev;
13124 struct Expression * next = exp->next;
13126 ComputeExpression(e);
13127 FreeType(exp->expType);
13128 FreeType(exp->destType);
13132 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13133 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13144 struct Expression * memberExp = exp->__anon1.member.exp;
13145 struct Identifier * memberID = exp->__anon1.member.member;
13146 struct Type * type;
13148 ComputeExpression(exp->__anon1.member.exp);
13149 type = exp->__anon1.member.exp->expType;
13152 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)));
13153 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13154 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13155 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13157 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13158 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13162 struct Symbol * classSym;
13165 PrintTypeNoConst(type, string, 0, 1);
13166 classSym = FindClass(string);
13167 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13169 if(exp->__anon1.member.member)
13171 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13173 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13175 if(!prop && !member && _class && exp->__anon1.member.member)
13177 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13179 convertTo = _class;
13180 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13181 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13187 struct Type * type = prop->dataType;
13189 if(_class->type == 3)
13191 if(type->kind == 8)
13193 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13195 if(_class->type == 3)
13197 if(!_class->dataType)
13198 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13199 type = _class->dataType;
13207 float (* Get)(float) = (void *)prop->Get;
13209 GetFloat(exp->__anon1.member.exp, &value);
13210 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13217 double (* Get)(double);
13219 GetDouble(exp->__anon1.member.exp, &value);
13221 Get = (void *)prop->Set;
13223 Get = (void *)prop->Get;
13224 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13234 struct Expression * value = exp->__anon1.member.exp;
13235 struct Type * type;
13237 if(!prop->dataType)
13238 ProcessPropertyType(prop);
13239 type = prop->dataType;
13243 else if(_class->type == 1)
13249 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13251 if(propertyClass->type == 1 && value->type == 1)
13253 void (* Set)(void *, void *) = (void *)prop->Set;
13255 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13256 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13257 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13258 exp->__anon1.instance->loc = exp->loc;
13260 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13261 PopulateInstance(exp->__anon1.instance);
13268 void (* Set)(void *, int) = (void *)prop->Set;
13270 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13271 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13272 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13273 exp->__anon1.instance->loc = exp->loc;
13275 GetInt(value, &intValue);
13276 Set(exp->__anon1.instance->data, intValue);
13277 PopulateInstance(exp->__anon1.instance);
13282 long long intValue;
13283 void (* Set)(void *, long long) = (void *)prop->Set;
13285 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13286 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13287 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13288 exp->__anon1.instance->loc = exp->loc;
13290 GetInt64(value, &intValue);
13291 Set(exp->__anon1.instance->data, intValue);
13292 PopulateInstance(exp->__anon1.instance);
13298 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13300 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13301 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13302 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13303 exp->__anon1.instance->loc = exp->loc;
13305 GetIntPtr(value, &intValue);
13306 Set(exp->__anon1.instance->data, intValue);
13307 PopulateInstance(exp->__anon1.instance);
13313 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13315 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13316 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13317 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13318 exp->__anon1.instance->loc = exp->loc;
13320 GetIntSize(value, &intValue);
13321 Set(exp->__anon1.instance->data, intValue);
13322 PopulateInstance(exp->__anon1.instance);
13328 void (* Set)(void *, float) = (void *)prop->Set;
13330 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13331 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13332 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13333 exp->__anon1.instance->loc = exp->loc;
13335 GetFloat(value, &floatValue);
13336 Set(exp->__anon1.instance->data, floatValue);
13337 PopulateInstance(exp->__anon1.instance);
13342 double doubleValue;
13343 void (* Set)(void *, double) = (void *)prop->Set;
13345 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13346 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13347 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13348 exp->__anon1.instance->loc = exp->loc;
13350 GetDouble(value, &doubleValue);
13351 Set(exp->__anon1.instance->data, doubleValue);
13352 PopulateInstance(exp->__anon1.instance);
13357 else if(_class->type == 2)
13363 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13365 if(propertyClass->type == 1 && value->__anon1.instance->data)
13367 unsigned int (* Set)(void *) = (void *)prop->Set;
13368 unsigned int bits = Set(value->__anon1.instance->data);
13370 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13374 else if(_class->type == 2)
13376 unsigned int value;
13377 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13380 GetUInt(exp->__anon1.member.exp, &value);
13382 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13391 if(_class->type == 2)
13393 unsigned int value;
13395 GetUInt(exp->__anon1.member.exp, &value);
13400 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13402 if(_class->type == 1)
13404 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13406 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13407 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13408 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13409 exp->__anon1.instance->loc = exp->loc;
13411 Get(value, exp->__anon1.instance->data);
13412 PopulateInstance(exp->__anon1.instance);
13414 else if(_class->type == 2)
13416 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13417 uint64 bits = Get(value);
13419 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13426 else if(_class->type == 1)
13428 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13434 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13436 if(_class->type == 1 && value)
13438 void (* Get)(void *, void *) = (void *)prop->Get;
13440 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13441 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13442 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13443 exp->__anon1.instance->loc = exp->loc;
13445 Get(value, exp->__anon1.instance->data);
13446 PopulateInstance(exp->__anon1.instance);
13457 exp->isConstant = 0;
13466 FreeExpression(memberExp);
13467 FreeIdentifier(memberID);
13473 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13475 FreeExpContents(exp);
13476 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13483 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13485 if(classSym && classSym->__anon1.registered)
13487 if(classSym->__anon1.registered->fixed)
13489 FreeSpecifier(exp->__anon1._class);
13490 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13495 char className[1024];
13497 strcpy(className, "__ecereClass_");
13498 FullClassNameCat(className, classSym->string, 1);
13499 DeclareClass(curExternal, classSym, className);
13500 FreeExpContents(exp);
13502 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13503 exp->__anon1.member.member = MkIdentifier("structSize");
13510 struct Type * type;
13511 struct Expression * e = exp;
13513 if(exp->type == 11)
13515 if(exp->__anon1.cast.exp)
13516 ComputeExpression(exp->__anon1.cast.exp);
13517 e = exp->__anon1.cast.exp;
13519 if(e && exp->expType)
13521 type = exp->expType;
13522 if(type->kind == 8)
13524 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13526 if(_class && (_class->type == 3 || _class->type == 2))
13528 if(!_class->dataType)
13529 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13530 type = _class->dataType;
13539 char value = (char)0;
13541 if(GetChar(e, &value))
13543 FreeExpContents(exp);
13544 exp->__anon1.__anon1.constant = PrintChar(value);
13550 unsigned char value = (unsigned char)0;
13552 if(GetUChar(e, &value))
13554 FreeExpContents(exp);
13555 exp->__anon1.__anon1.constant = PrintUChar(value);
13563 short value = (short)0;
13565 if(GetShort(e, &value))
13567 FreeExpContents(exp);
13568 exp->__anon1.__anon1.constant = PrintShort(value);
13574 unsigned short value = (unsigned short)0;
13576 if(GetUShort(e, &value))
13578 FreeExpContents(exp);
13579 exp->__anon1.__anon1.constant = PrintUShort(value);
13589 if(GetInt(e, &value))
13591 FreeExpContents(exp);
13592 exp->__anon1.__anon1.constant = PrintInt(value);
13598 unsigned int value = 0;
13600 if(GetUInt(e, &value))
13602 FreeExpContents(exp);
13603 exp->__anon1.__anon1.constant = PrintUInt(value);
13611 long long value = 0;
13613 if(GetInt64(e, &value))
13615 FreeExpContents(exp);
13616 exp->__anon1.__anon1.constant = PrintInt64(value);
13624 if(GetUInt64(e, &value))
13626 FreeExpContents(exp);
13627 exp->__anon1.__anon1.constant = PrintUInt64(value);
13635 intptr_t value = 0;
13637 if(GetIntPtr(e, &value))
13639 FreeExpContents(exp);
13640 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13646 uintptr_t value = 0;
13648 if(GetUIntPtr(e, &value))
13650 FreeExpContents(exp);
13651 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13661 if(GetIntSize(e, &value))
13663 FreeExpContents(exp);
13664 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13672 if(GetUIntSize(e, &value))
13674 FreeExpContents(exp);
13675 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13684 if(GetFloat(e, &value))
13686 FreeExpContents(exp);
13687 exp->__anon1.__anon1.constant = PrintFloat(value);
13696 if(GetDouble(e, &value))
13698 FreeExpContents(exp);
13699 exp->__anon1.__anon1.constant = PrintDouble(value);
13710 struct Operand op1 =
13717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13720 struct Operand op2 =
13727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13730 struct Operand op3 =
13737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13741 if(exp->__anon1.cond.exp)
13742 ComputeExpression((*exp->__anon1.cond.exp).last);
13743 if(exp->__anon1.cond.elseExp)
13744 ComputeExpression(exp->__anon1.cond.elseExp);
13745 if(exp->__anon1.cond.cond)
13746 ComputeExpression(exp->__anon1.cond.cond);
13747 op1 = GetOperand(exp->__anon1.cond.cond);
13749 op1.type->refCount++;
13750 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13752 op2.type->refCount++;
13753 op3 = GetOperand(exp->__anon1.cond.elseExp);
13755 op3.type->refCount++;
13758 FreeExpContents(exp);
13759 op1.ops.Cond(exp, &op1, &op2, &op3);
13762 FreeType(op1.type);
13764 FreeType(op2.type);
13766 FreeType(op3.type);
13772 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13774 struct __ecereNameSpace__ecere__com__Instance * module;
13776 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))
13778 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))
13780 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))
13782 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)
13784 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13790 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13792 struct Type * source;
13793 struct Type * realDest = dest;
13794 struct Type * backupSourceExpType = (((void *)0));
13795 struct Expression * computedExp = sourceExp;
13798 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)
13800 computedExp = CopyExpression(sourceExp);
13801 ComputeExpression(computedExp);
13803 source = sourceExp->expType;
13804 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13806 if(computedExp != sourceExp)
13808 FreeExpression(computedExp);
13809 computedExp = sourceExp;
13814 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13816 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13818 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13820 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13822 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13824 if(sourceBase == destBase)
13826 if(computedExp != sourceExp)
13828 FreeExpression(computedExp);
13829 computedExp = sourceExp;
13838 struct __ecereNameSpace__ecere__sys__OldList * specs;
13839 unsigned int flag = 0;
13840 long long value = (((int)0x7fffffff));
13842 source->refCount++;
13843 if(computedExp->type == 2)
13845 if(source->isSigned)
13846 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13848 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13850 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13852 if(source->isSigned)
13853 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13855 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13857 if(computedExp != sourceExp)
13859 FreeExpression(computedExp);
13860 computedExp = sourceExp;
13862 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13865 source = __extension__ ({
13866 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13868 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13871 if(dest->kind == 8)
13873 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13875 if(_class && _class->type == 3)
13877 if(source->kind != 8)
13879 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13880 struct Type * tempDest, * tempSource;
13882 for(; _class->base->type != 1000; _class = _class->base)
13885 tempDest = tempType;
13886 tempType->kind = 8;
13887 if(!_class->symbol)
13888 _class->symbol = FindClass(_class->fullName);
13889 tempType->__anon1._class = _class->symbol;
13890 tempType->truth = dest->truth;
13891 if(tempType->__anon1._class)
13892 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13893 backupSourceExpType = sourceExp->expType;
13894 if(dest->passAsTemplate)
13896 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13897 CopyTypeInto(sourceExp->expType, dest);
13898 sourceExp->expType->passAsTemplate = 0;
13902 sourceExp->expType = dest;
13906 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13909 if(_class && _class->type == 2 && source->kind != 8)
13911 if(!dest->__anon1._class->__anon1.registered->dataType)
13912 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13913 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13916 FreeType(sourceExp->expType);
13917 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13918 source->refCount++;
13921 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13923 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13924 struct Declarator * decl;
13927 ReadString(string, sourceExp->__anon1.__anon2.string);
13928 decl = SpecDeclFromString(string, specs, (((void *)0)));
13929 FreeExpContents(sourceExp);
13930 FreeType(sourceExp->expType);
13931 sourceExp->type = 24;
13932 sourceExp->__anon1._classExp.specifiers = specs;
13933 sourceExp->__anon1._classExp.decl = decl;
13934 sourceExp->expType = dest;
13938 if(backupSourceExpType)
13939 FreeType(backupSourceExpType);
13943 else if(source->kind == 8)
13945 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13947 if(_class && (_class->type == 3 || _class->type == 2))
13949 if(dest->kind != 8)
13951 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13952 struct Type * tempDest, * tempSource;
13954 if(!source->__anon1._class->__anon1.registered->dataType)
13955 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13956 for(; _class->base->type != 1000; _class = _class->base)
13959 tempSource = tempType;
13960 tempType->kind = 8;
13961 tempType->__anon1._class = FindClass(_class->fullName);
13962 tempType->truth = source->truth;
13963 tempType->classObjectType = source->classObjectType;
13964 if(tempType->__anon1._class)
13965 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13966 if(conversions && conversions->last)
13968 ((struct Conversion *)conversions->last)->resultType = dest;
13971 FreeType(sourceExp->expType);
13972 sourceExp->expType = MkClassType(_class->fullName);
13973 sourceExp->expType->truth = source->truth;
13974 sourceExp->expType->classObjectType = source->classObjectType;
13975 if(!sourceExp->destType)
13977 FreeType(sourceExp->destType);
13978 sourceExp->destType = sourceExp->expType;
13979 if(sourceExp->expType)
13980 sourceExp->expType->refCount++;
13982 if(!_class->dataType)
13983 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13985 dest = MkClassType(source->__anon1._class->string);
13986 dest->truth = source->truth;
13987 dest->classObjectType = source->classObjectType;
13989 source = _class->dataType;
13990 source->refCount++;
13991 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13997 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14004 if(dest->kind == 8)
14006 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14007 unsigned int fittingValue = 0;
14009 if(_class && _class->type == 4)
14011 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14012 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14014 if(c && value >= 0 && value <= c->largest)
14017 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14019 if(_class->type == 0 || _class->type == 5)
14021 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14023 *newExp = *sourceExp;
14024 if(sourceExp->destType)
14025 sourceExp->destType->refCount++;
14026 if(sourceExp->expType)
14027 sourceExp->expType->refCount++;
14028 sourceExp->type = 11;
14029 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14030 sourceExp->__anon1.cast.exp = newExp;
14031 FreeType(sourceExp->expType);
14032 sourceExp->expType = (((void *)0));
14033 ProcessExpressionType(sourceExp);
14036 FreeType(sourceExp->expType);
14037 sourceExp->expType = dest;
14042 if(backupSourceExpType)
14043 FreeType(backupSourceExpType);
14046 if(!_class->dataType)
14047 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14049 dest = _class->dataType;
14052 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))
14054 specs = MkListOne(MkSpecifier(DOUBLE));
14056 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))
14058 specs = MkListOne(MkSpecifier(FLOAT));
14060 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))
14063 if(!dest->isSigned)
14064 ListAdd(specs, MkSpecifier(UNSIGNED));
14065 ListAdd(specs, MkSpecifier(INT64));
14067 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14070 if(!dest->isSigned)
14071 ListAdd(specs, MkSpecifier(UNSIGNED));
14072 ListAdd(specs, MkSpecifier(INT));
14074 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14077 if(!dest->isSigned)
14078 ListAdd(specs, MkSpecifier(UNSIGNED));
14079 ListAdd(specs, MkSpecifier(SHORT));
14081 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14084 if(!dest->isSigned)
14085 ListAdd(specs, MkSpecifier(UNSIGNED));
14086 ListAdd(specs, MkSpecifier(CHAR));
14092 if(backupSourceExpType)
14094 if(sourceExp->expType)
14095 FreeType(sourceExp->expType);
14096 sourceExp->expType = backupSourceExpType;
14101 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))
14103 specs = MkListOne(MkSpecifier(DOUBLE));
14105 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))
14107 specs = MkListOne(MkSpecifier(FLOAT));
14109 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14112 ListAdd(specs, MkSpecifier(BOOL));
14114 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)))
14117 if(!dest->isSigned)
14118 ListAdd(specs, MkSpecifier(UNSIGNED));
14119 ListAdd(specs, MkSpecifier(CHAR));
14121 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)))))
14124 if(!dest->isSigned)
14125 ListAdd(specs, MkSpecifier(UNSIGNED));
14126 ListAdd(specs, MkSpecifier(SHORT));
14128 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14131 if(!dest->isSigned)
14132 ListAdd(specs, MkSpecifier(UNSIGNED));
14133 ListAdd(specs, MkSpecifier(INT));
14135 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14138 if(!dest->isSigned)
14139 ListAdd(specs, MkSpecifier(UNSIGNED));
14140 ListAdd(specs, MkSpecifier(INT64));
14142 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14144 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14150 if(backupSourceExpType)
14152 if(sourceExp->expType)
14153 FreeType(sourceExp->expType);
14154 sourceExp->expType = backupSourceExpType;
14158 if(!flag && !sourceExp->opDestType)
14160 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14162 *newExp = *sourceExp;
14163 newExp->prev = (((void *)0));
14164 newExp->next = (((void *)0));
14165 if(sourceExp->destType)
14166 sourceExp->destType->refCount++;
14167 if(sourceExp->expType)
14168 sourceExp->expType->refCount++;
14169 sourceExp->type = 11;
14170 if(realDest->kind == 8)
14172 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14173 FreeList(specs, (void *)(FreeSpecifier));
14176 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14177 if(newExp->type == 4)
14179 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14182 sourceExp->__anon1.cast.exp = newExp;
14183 FreeType(sourceExp->expType);
14184 sourceExp->expType = (((void *)0));
14185 ProcessExpressionType(sourceExp);
14188 FreeList(specs, (void *)(FreeSpecifier));
14191 if(backupSourceExpType)
14192 FreeType(backupSourceExpType);
14197 if(computedExp != sourceExp)
14199 FreeExpression(computedExp);
14200 computedExp = sourceExp;
14202 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14203 sourceExp = (*sourceExp->__anon1.list).last;
14204 if(sourceExp->type == 0)
14206 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14208 if(dest->kind == 8)
14210 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14212 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14213 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14217 for(; _class && _class->type == 4; _class = _class->base)
14219 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14220 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14222 for(value = e->values.first; value; value = value->next)
14224 if(!strcmp(value->name, id->string))
14229 FreeType(sourceExp->expType);
14230 sourceExp->isConstant = 1;
14231 sourceExp->expType = MkClassType(_class->fullName);
14232 if(inCompiler || inPreCompiler || inDebugger)
14234 FreeExpContents(sourceExp);
14235 sourceExp->type = 2;
14236 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14237 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14239 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14248 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14259 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14261 unsigned int result = 1;
14265 struct __ecereNameSpace__ecere__sys__OldList converts =
14269 struct Conversion * convert;
14271 if(destType->kind == 0)
14273 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14277 for(convert = converts.first; convert; convert = convert->next)
14279 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14283 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14284 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14287 newExp->prev = (((void *)0));
14288 newExp->next = (((void *)0));
14289 newExp->destType = (((void *)0));
14293 exp->addedThis = 1;
14294 exp->__anon1.member.exp = newExp;
14295 FreeType(exp->__anon1.member.exp->expType);
14296 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14297 exp->__anon1.member.exp->expType->classObjectType = objectType;
14298 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14299 exp->__anon1.member.memberType = 1;
14300 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14303 exp->expType->refCount++;
14304 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14310 exp->addedThis = 1;
14311 exp->__anon1.member.exp = newExp;
14312 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)
14314 newExp->byReference = 1;
14316 FreeType(exp->__anon1.member.exp->expType);
14317 exp->__anon1.member.exp->expType = (((void *)0));
14318 if(convert->convert->dataType)
14320 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14321 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14322 exp->__anon1.member.exp->expType->refCount = 1;
14323 exp->__anon1.member.exp->expType->classObjectType = objectType;
14324 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14326 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14327 exp->__anon1.member.memberType = 4;
14328 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14330 if(convert->resultType)
14331 convert->resultType->refCount++;
14337 FreeType(exp->expType);
14340 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14341 if(exp->destType->casted)
14344 exp->expType->refCount++;
14348 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14349 if(exp->destType->casted)
14351 if(convert->resultType)
14352 convert->resultType->refCount++;
14356 if(exp->isConstant && inCompiler)
14357 ComputeExpression(exp);
14358 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14360 if(!result && exp->expType && converts.count)
14362 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14364 if(!result && exp->expType && exp->destType)
14366 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))
14373 static void ProcessFunction(struct FunctionDefinition * function);
14375 void ProcessInstantiationType(struct Instantiation * inst)
14377 yylloc = inst->loc;
14380 struct MembersInit * members;
14381 struct Symbol * classSym;
14382 struct __ecereNameSpace__ecere__com__Class * _class;
14384 classSym = inst->_class->__anon1.__anon1.symbol;
14385 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14386 if(!_class || _class->type != 5)
14387 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14388 afterExternal = afterExternal ? afterExternal : curExternal;
14390 ProcessExpressionType(inst->exp);
14391 inst->isConstant = 1;
14394 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14395 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14396 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14397 int subMemberStackPos = 0;
14399 for(members = (*inst->members).first; members; members = members->next)
14401 switch(members->type)
14406 static unsigned int instMethodID = 0;
14407 struct External * external = curExternal;
14408 struct Context * context = curContext;
14409 struct Declarator * declarator = members->__anon1.function->declarator;
14410 struct Identifier * nameID = GetDeclId(declarator);
14411 char * unmangled = nameID ? nameID->string : (((void *)0));
14412 struct Expression * exp;
14413 struct External * createdExternal = (((void *)0));
14419 strcpy(name, "__ecereInstMeth_");
14420 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14422 strcat(name, nameID->string);
14424 sprintf(number, "_%08d", instMethodID++);
14425 strcat(name, number);
14426 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14430 struct Symbol * symbol = declarator->symbol;
14431 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14433 if(method && method->type == 1)
14435 symbol->__anon1.method = method;
14436 ProcessMethodType(method);
14437 if(!symbol->type->__anon1.__anon2.thisClass)
14439 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14441 if(!currentClass->symbol)
14442 currentClass->symbol = FindClass(currentClass->fullName);
14443 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14447 if(!_class->symbol)
14448 _class->symbol = FindClass(_class->fullName);
14449 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14452 DeclareType(curExternal, symbol->type, 1, 1);
14456 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14459 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14462 FreeSpecifier(nameID->_class);
14463 nameID->_class = (((void *)0));
14465 curExternal = createdExternal;
14468 if(createdExternal->__anon1.function)
14469 ProcessFunction(createdExternal->__anon1.function);
14471 else if(declarator)
14473 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14474 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14476 curExternal = external;
14477 curContext = context;
14480 FreeClassFunction(members->__anon1.function);
14481 exp = QMkExpId(name);
14483 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14484 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14490 if(members->__anon1.dataMembers && classSym)
14492 struct MemberInit * member;
14493 struct Location oldyyloc = yylloc;
14495 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14497 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14498 if(member->initializer && !member->initializer->isConstant)
14499 inst->isConstant = 0;
14511 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14513 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14519 if(spec->__anon1.specifier == THISCLASS)
14524 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14525 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14526 ProcessSpecifier(spec, declareStruct, 0);
14533 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14536 DeclareType(curExternal, symbol->type, 1, 1);
14537 else if(spec->__anon1.__anon1.symbol)
14539 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14541 if(warnClasses && !c)
14542 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14543 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14549 struct Enumerator * e;
14551 if(spec->__anon1.__anon2.list)
14553 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14556 ProcessExpressionType(e->exp);
14565 if(spec->__anon1.__anon2.definitions)
14567 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14569 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14576 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14581 if(decl->__anon1.identifier->classSym)
14583 FreeSpecifier(decl->__anon1.identifier->_class);
14584 decl->__anon1.identifier->_class = (((void *)0));
14588 if(decl->__anon1.array.exp)
14589 ProcessExpressionType(decl->__anon1.array.exp);
14597 struct Identifier * id = (((void *)0));
14598 struct Specifier * classSpec = (((void *)0));
14600 if(decl->type == 4)
14602 id = GetDeclId(decl);
14603 if(id && id->_class)
14605 classSpec = id->_class;
14606 id->_class = (((void *)0));
14609 if(decl->declarator)
14610 ProcessDeclarator(decl->declarator, isFunction);
14611 if(decl->type == 4)
14615 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14617 if(!decl->__anon1.function.parameters)
14618 decl->__anon1.function.parameters = MkList();
14619 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14621 if(decl->__anon1.function.parameters)
14623 struct TypeName * param;
14625 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14627 if(param->qualifiers)
14629 struct Specifier * spec;
14631 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14633 if(spec->type == 0)
14635 if(spec->__anon1.specifier == TYPED_OBJECT)
14637 struct Declarator * d = param->declarator;
14638 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);
14641 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14642 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14643 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14644 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14645 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14646 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14650 else if(spec->__anon1.specifier == ANY_OBJECT)
14652 struct Declarator * d = param->declarator;
14654 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14655 param->qualifiers = MkListOne(MkSpecifier(VOID));
14657 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14658 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14661 else if(spec->__anon1.specifier == THISCLASS)
14666 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14667 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14668 ProcessSpecifier(spec, 0, 0);
14673 else if(spec->type == 1)
14675 ProcessSpecifier(spec, isFunction, 1);
14679 if(param->declarator)
14680 ProcessDeclarator(param->declarator, 0);
14689 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14691 yylloc = decl->loc;
14696 unsigned int declareStruct = 0;
14698 if(decl->__anon1.__anon1.declarators)
14700 struct InitDeclarator * d;
14702 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14704 struct Type * type, * subType;
14706 ProcessDeclarator(d->declarator, 0);
14707 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14710 ProcessInitializer(d->initializer, type);
14711 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14713 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14715 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14717 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14718 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14719 if(decl->__anon1.__anon1.specifiers)
14720 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14721 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14724 decl->__anon1.inst = inst;
14728 for(subType = type; subType; )
14730 if(subType->kind == 8)
14735 else if(subType->kind == 13)
14737 else if(subType->kind == 12)
14738 subType = subType->__anon1.__anon4.arrayType;
14747 if(decl->__anon1.__anon1.specifiers)
14749 struct Specifier * s;
14751 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14753 ProcessSpecifier(s, declareStruct, 1);
14760 ProcessInstantiationType(decl->__anon1.inst);
14765 struct Specifier * spec;
14766 struct Declarator * d;
14767 unsigned int declareStruct = 0;
14769 if(decl->__anon1.__anon1.declarators)
14771 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14773 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14774 struct Type * subType;
14776 ProcessDeclarator(d, 0);
14777 for(subType = type; subType; )
14779 if(subType->kind == 8)
14784 else if(subType->kind == 13)
14786 else if(subType->kind == 12)
14787 subType = subType->__anon1.__anon4.arrayType;
14794 if(decl->__anon1.__anon1.specifiers)
14796 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14797 ProcessSpecifier(spec, declareStruct, warnClasses);
14804 static void ProcessStatement(struct Statement * stmt)
14806 yylloc = stmt->loc;
14810 ProcessStatement(stmt->__anon1.labeled.stmt);
14813 if(stmt->__anon1.caseStmt.exp)
14815 FreeType(stmt->__anon1.caseStmt.exp->destType);
14816 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14818 curSwitchType->refCount++;
14819 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14820 ComputeExpression(stmt->__anon1.caseStmt.exp);
14822 if(stmt->__anon1.caseStmt.stmt)
14823 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14827 if(stmt->__anon1.compound.context)
14829 struct Declaration * decl;
14830 struct Statement * s;
14831 struct Statement * prevCompound = curCompound;
14832 struct Context * prevContext = curContext;
14834 if(!stmt->__anon1.compound.isSwitch)
14835 curCompound = stmt;
14836 curContext = stmt->__anon1.compound.context;
14837 if(stmt->__anon1.compound.declarations)
14839 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14840 ProcessDeclaration(decl, 1);
14842 if(stmt->__anon1.compound.statements)
14844 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14845 ProcessStatement(s);
14847 curContext = prevContext;
14848 curCompound = prevCompound;
14854 struct Expression * exp;
14856 if(stmt->__anon1.expressions)
14858 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14859 ProcessExpressionType(exp);
14865 struct Expression * exp;
14867 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14868 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14869 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14870 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14872 ProcessExpressionType(exp);
14874 if(stmt->__anon1.ifStmt.stmt)
14875 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14876 if(stmt->__anon1.ifStmt.elseStmt)
14877 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14882 struct Type * oldSwitchType = curSwitchType;
14884 if(stmt->__anon1.switchStmt.exp)
14886 struct Expression * exp;
14888 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14892 ProcessExpressionType(exp);
14895 curSwitchType = exp->expType;
14898 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14899 curSwitchType = oldSwitchType;
14904 if(stmt->__anon1.whileStmt.exp)
14906 struct Expression * exp;
14908 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14909 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14910 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14911 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14913 ProcessExpressionType(exp);
14916 if(stmt->__anon1.whileStmt.stmt)
14917 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14922 if(stmt->__anon1.doWhile.exp)
14924 struct Expression * exp;
14926 if((*stmt->__anon1.doWhile.exp).last)
14928 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14929 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14930 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14932 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14934 ProcessExpressionType(exp);
14937 if(stmt->__anon1.doWhile.stmt)
14938 ProcessStatement(stmt->__anon1.doWhile.stmt);
14943 struct Expression * exp;
14945 if(stmt->__anon1.forStmt.init)
14946 ProcessStatement(stmt->__anon1.forStmt.init);
14947 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14949 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14950 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14951 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14953 if(stmt->__anon1.forStmt.check)
14954 ProcessStatement(stmt->__anon1.forStmt.check);
14955 if(stmt->__anon1.forStmt.increment)
14957 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14958 ProcessExpressionType(exp);
14960 if(stmt->__anon1.forStmt.stmt)
14961 ProcessStatement(stmt->__anon1.forStmt.stmt);
14966 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14967 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14968 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14969 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14970 char iteratorType[1024];
14971 struct Type * source;
14972 struct Expression * e;
14973 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));
14974 struct Expression * arrayExp;
14975 const char * typeString = (((void *)0));
14976 int builtinCount = 0;
14978 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14982 FreeType(e->destType);
14983 e->destType = ProcessTypeString("Container", 0);
14985 if(!isBuiltin || e->next)
14986 ProcessExpressionType(e);
14988 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
14989 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)))
14991 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
14992 struct Symbol * symbol;
14993 struct Expression * expIt = (((void *)0));
14994 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
14995 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
14996 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
14997 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15002 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15003 stmt->__anon1.compound.context->parent = curContext;
15004 curContext = stmt->__anon1.compound.context;
15006 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15008 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15010 isCustomAVLTree = 1;
15011 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15014 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15016 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15018 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15021 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15023 if(inCompiler && isArray)
15025 struct Declarator * decl;
15026 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15028 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15029 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15030 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15034 struct Type * type = (((void *)0));
15035 char typeStringBuf[1024];
15037 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15038 if(((struct Expression *)(*exp).last)->type == 11)
15040 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15043 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15045 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)
15047 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15049 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15051 else if(arrayExp->__anon1.list)
15053 struct Expression * e;
15055 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15057 ProcessExpressionType(e);
15067 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15071 e->expType = (((void *)0));
15072 e = (*arrayExp->__anon1.list).first;
15073 ProcessExpressionType(e);
15076 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15078 FreeType(e->expType);
15079 e->expType = (((void *)0));
15081 type = (((void *)0));
15089 FreeType(e->expType);
15090 e->expType = (((void *)0));
15096 typeStringBuf[0] = '\0';
15097 PrintType(type, typeStringBuf, 0, 1);
15098 typeString = typeStringBuf;
15106 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15107 struct Declarator * decl;
15108 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15110 if(arrayExp->__anon1.list)
15112 struct Expression * e;
15114 builtinCount = (*arrayExp->__anon1.list).count;
15115 type = ProcessTypeString(typeString, 0);
15116 while((e = (*arrayExp->__anon1.list).first))
15118 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15119 e->destType = type;
15121 ProcessExpressionType(e);
15123 ListAdd(initializers, MkInitializerAssignment(e));
15126 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15128 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15129 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15130 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15131 FreeList(exp, (void *)(FreeExpression));
15133 else if(arrayExp->__anon1.list)
15135 struct Expression * e;
15137 type = ProcessTypeString(typeString, 0);
15138 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15140 e->destType = type;
15142 ProcessExpressionType(e);
15149 arrayExp->expType = ProcessTypeString("Container", 0);
15150 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15153 else if(inCompiler && isLinkList && !isList)
15155 struct Declarator * decl;
15156 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15158 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15159 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15160 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15162 else if(inCompiler && _class->templateArgs)
15165 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15167 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15168 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)))))))));
15172 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15175 switch(block->type)
15178 if(block->__anon1.compound.context)
15179 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15182 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15183 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15184 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15185 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15188 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15189 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15192 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15193 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15196 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15197 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15200 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15201 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15204 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15205 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15211 block = MkIfStmt(filter, block, (((void *)0)));
15215 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));
15216 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15217 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15218 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15224 sprintf(count, "%d", builtinCount);
15225 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));
15226 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15227 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15228 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15230 else if(isLinkList && !isList)
15232 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15233 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15235 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15237 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));
15241 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15242 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15244 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));
15246 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15247 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15248 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15252 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15254 ProcessExpressionType(expIt);
15255 if((*stmt->__anon1.compound.declarations).first)
15256 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15258 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15259 ProcessStatement(stmt);
15262 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15264 curContext = stmt->__anon1.compound.context->parent;
15269 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15281 struct Expression * exp;
15283 if(stmt->__anon1.expressions)
15285 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15289 if(curFunction && !curFunction->type)
15290 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15291 FreeType(exp->destType);
15292 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15294 exp->destType->refCount++;
15296 ProcessExpressionType(exp);
15303 ProcessDeclaration(stmt->__anon1.decl, 1);
15308 struct AsmField * field;
15310 if(stmt->__anon1.asmStmt.inputFields)
15312 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15313 if(field->expression)
15314 ProcessExpressionType(field->expression);
15316 if(stmt->__anon1.asmStmt.outputFields)
15318 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15319 if(field->expression)
15320 ProcessExpressionType(field->expression);
15322 if(stmt->__anon1.asmStmt.clobberedFields)
15324 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15326 if(field->expression)
15327 ProcessExpressionType(field->expression);
15334 struct PropertyWatch * propWatch;
15335 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15336 struct Expression * object = stmt->__anon1._watch.object;
15337 struct Expression * watcher = stmt->__anon1._watch.watcher;
15340 ProcessExpressionType(watcher);
15342 ProcessExpressionType(object);
15345 if(watcher || thisClass)
15347 struct External * external = curExternal;
15348 struct Context * context = curContext;
15351 stmt->__anon1.expressions = MkList();
15352 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15354 struct ClassFunction * func;
15355 char watcherName[1024];
15356 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;
15357 struct External * createdExternal;
15359 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15360 if(propWatch->deleteWatch)
15361 strcat(watcherName, "_delete");
15364 struct Identifier * propID;
15366 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15368 strcat(watcherName, "_");
15369 strcat(watcherName, propID->string);
15372 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15374 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)));
15375 ProcessClassFunctionBody(func, propWatch->compound);
15376 propWatch->compound = (((void *)0));
15377 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15378 FreeClassFunction(func);
15379 curExternal = createdExternal;
15380 ProcessFunction(createdExternal->__anon1.function);
15381 if(propWatch->deleteWatch)
15383 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15385 ListAdd(args, CopyExpression(object));
15386 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15387 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15388 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15392 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15393 struct Identifier * propID;
15395 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15397 char propName[1024];
15398 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15402 char getName[1024], setName[1024];
15403 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15405 DeclareProperty(createdExternal, prop, setName, getName);
15406 strcpy(propName, "__ecereProp_");
15407 FullClassNameCat(propName, prop->_class->fullName, 0);
15408 strcat(propName, "_");
15409 FullClassNameCat(propName, prop->name, 1);
15410 ListAdd(args, CopyExpression(object));
15411 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15412 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15413 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15414 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15415 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15418 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15423 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15425 curExternal = external;
15426 curContext = context;
15428 FreeExpression(watcher);
15430 FreeExpression(object);
15431 FreeList(watches, (void *)(FreePropertyWatch));
15434 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15438 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15440 ProcessStatement(propWatch->compound);
15447 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15448 struct Expression * object = stmt->__anon1._watch.object;
15449 struct __ecereNameSpace__ecere__com__Class * _class;
15452 ProcessExpressionType(object);
15455 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15458 struct Identifier * propID;
15461 stmt->__anon1.expressions = MkList();
15462 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15464 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15471 for(propID = (*watches).first; propID; propID = propID->next)
15473 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15477 CreateFireWatcher(prop, object, stmt);
15480 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15485 struct __ecereNameSpace__ecere__com__Property * prop;
15486 struct __ecereNameSpace__ecere__com__Class * base;
15488 for(base = _class; base; base = base->base)
15490 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15492 if(prop->isProperty && prop->isWatchable)
15494 CreateFireWatcher(prop, object, stmt);
15500 FreeExpression(object);
15501 FreeList(watches, (void *)(FreeIdentifier));
15504 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15510 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15511 struct Expression * object = stmt->__anon1._watch.object;
15512 struct Expression * watcher = stmt->__anon1._watch.watcher;
15513 struct __ecereNameSpace__ecere__com__Class * _class;
15516 ProcessExpressionType(object);
15518 ProcessExpressionType(watcher);
15521 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15522 if(watcher || thisClass)
15526 struct Identifier * propID;
15529 stmt->__anon1.expressions = MkList();
15532 struct __ecereNameSpace__ecere__sys__OldList * args;
15535 ListAdd(args, CopyExpression(object));
15536 ListAdd(args, MkExpConstant("0"));
15537 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15538 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15542 for(propID = (*watches).first; propID; propID = propID->next)
15544 char propName[1024];
15545 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15549 char getName[1024], setName[1024];
15550 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15552 DeclareProperty(curExternal, prop, setName, getName);
15553 strcpy(propName, "__ecereProp_");
15554 FullClassNameCat(propName, prop->_class->fullName, 0);
15555 strcat(propName, "_");
15556 FullClassNameCat(propName, prop->name, 1);
15557 ListAdd(args, CopyExpression(object));
15558 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15559 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15560 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15563 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15567 FreeExpression(object);
15569 FreeExpression(watcher);
15570 FreeList(watches, (void *)(FreeIdentifier));
15573 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15576 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15583 void ComputeDataTypes()
15585 struct External * external;
15587 currentClass = (((void *)0));
15588 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15589 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15590 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15591 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15592 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15593 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15594 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15595 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15596 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15597 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15598 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15599 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15600 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15601 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15602 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15603 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15604 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15605 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15606 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15607 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15608 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15609 for(external = (*ast).first; external; external = external->next)
15611 afterExternal = curExternal = external;
15612 if(external->type == 0)
15616 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15617 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15619 currentClass = external->__anon1.function->_class;
15620 ProcessFunction(external->__anon1.function);
15622 else if(external->type == 1)
15624 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15626 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15627 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15629 currentClass = (((void *)0));
15630 if(external->__anon1.declaration)
15631 ProcessDeclaration(external->__anon1.declaration, 1);
15633 else if(external->type == 2)
15635 struct ClassDefinition * _class = external->__anon1._class;
15637 currentClass = external->symbol->__anon1.registered;
15640 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15641 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15643 if(_class->definitions)
15645 ProcessClass(_class->definitions, _class->symbol);
15649 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15650 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15653 else if(external->type == 4)
15655 thisNameSpace = external->__anon1.id->string;
15658 currentClass = (((void *)0));
15659 thisNameSpace = (((void *)0));
15660 curExternal = (((void *)0));
15663 void ProcessExpressionType(struct Expression * exp)
15665 unsigned int unresolved = 0;
15666 struct Location oldyylloc = yylloc;
15667 unsigned int notByReference = 0;
15669 if(!exp || exp->expType)
15676 struct Identifier * id = exp->__anon1.__anon1.identifier;
15678 if(!id || !topContext)
15680 if(id->_class && id->_class->__anon1.__anon1.name)
15682 id->classSym = id->_class->__anon1.__anon1.symbol;
15684 if(!strcmp(id->string, "__runtimePlatform"))
15686 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15689 else if(strstr(id->string, "__ecereClass") == id->string)
15691 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15694 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15696 ReplaceClassMembers(exp, thisClass);
15699 ProcessExpressionType(exp);
15702 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15707 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15711 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15717 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15720 ProcessExpressionType(exp);
15724 else if(currentClass && !id->_class)
15726 if(ResolveIdWithClass(exp, currentClass, 1))
15729 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15734 struct Type * type = symbol->type;
15735 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15737 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15739 struct Context * context = SetupTemplatesContext(_class);
15741 type = ReplaceThisClassType(_class);
15742 FinishTemplatesContext(context);
15744 type->refCount = 0;
15746 FreeSpecifier(id->_class);
15747 id->_class = (((void *)0));
15748 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15749 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15750 id->classSym = (((void *)0));
15751 exp->expType = type;
15754 if(type && (type->kind == 15))
15755 exp->isConstant = 1;
15756 if(symbol->isParam || !strcmp(id->string, "this"))
15758 if(_class && _class->type == 1 && !type->declaredWithStruct)
15759 exp->byReference = 1;
15761 if(symbol->isIterator)
15763 if(symbol->isIterator == 3)
15766 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15767 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15768 exp->expType = (((void *)0));
15769 ProcessExpressionType(exp);
15771 else if(symbol->isIterator != 4)
15774 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15775 exp->__anon1.member.exp->expType = exp->expType;
15776 exp->__anon1.member.member = MkIdentifier("data");
15777 exp->expType = (((void *)0));
15778 ProcessExpressionType(exp);
15785 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15787 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15791 strcpy(name, thisNameSpace);
15792 strcat(name, "::");
15793 strcat(name, id->string);
15794 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15797 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15802 for(c = 0; c < definedExpStackPos; c++)
15803 if(definedExpStack[c] == definedExp)
15805 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15807 struct Location backupYylloc = yylloc;
15808 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15810 definedExpStack[definedExpStackPos++] = definedExp;
15811 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15812 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15813 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15815 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15816 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15817 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15818 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15820 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15821 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15823 parsedExpression = (((void *)0));
15825 expression_yyparse();
15826 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15828 fileInput = backInput;
15829 yylloc = backupYylloc;
15830 if(parsedExpression)
15832 FreeIdentifier(id);
15834 exp->__anon1.list = MkListOne(parsedExpression);
15835 ApplyLocation(parsedExpression, &yylloc);
15836 ProcessExpressionType(exp);
15837 definedExpStackPos--;
15840 definedExpStackPos--;
15846 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15852 struct GlobalData * data = (((void *)0));
15854 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15858 strcpy(name, thisNameSpace);
15859 strcat(name, "::");
15860 strcat(name, id->string);
15861 data = FindGlobalData(name);
15864 data = FindGlobalData(id->string);
15867 DeclareGlobalData(curExternal, data);
15868 exp->expType = data->dataType;
15870 data->dataType->refCount++;
15871 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15872 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15873 FreeSpecifier(id->_class);
15874 id->_class = (((void *)0));
15879 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15881 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15885 strcpy(name, thisNameSpace);
15886 strcat(name, "::");
15887 strcat(name, id->string);
15888 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15891 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15896 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15897 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15899 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15900 strcpy(name, "__ecereFunction_");
15901 FullClassNameCat(name, id->string, 0);
15902 if(DeclareFunction(curExternal, function, name))
15904 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15905 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15907 exp->expType = function->dataType;
15908 if(function->dataType)
15909 function->dataType->refCount++;
15910 FreeSpecifier(id->_class);
15911 id->_class = (((void *)0));
15923 if(!exp->__anon1.instance->_class)
15925 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15927 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15930 ProcessInstantiationType(exp->__anon1.instance);
15931 exp->isConstant = exp->__anon1.instance->isConstant;
15932 if(exp->__anon1.instance->_class)
15934 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15942 char * constant = exp->__anon1.__anon1.constant;
15943 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15945 exp->expType = type;
15946 if(constant[0] == '\'')
15948 if((int)((unsigned char *)constant)[1] > 127)
15951 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15955 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15956 exp->__anon1.__anon1.constant = PrintUInt(ch);
15958 type->__anon1._class = FindClass("unichar");
15959 type->isSigned = 0;
15964 type->isSigned = 1;
15969 char * dot = strchr(constant, '.');
15970 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15975 exponent = strchr(constant, 'p');
15977 exponent = strchr(constant, 'P');
15981 exponent = strchr(constant, 'e');
15983 exponent = strchr(constant, 'E');
15985 if(dot || exponent)
15987 if(strchr(constant, 'f') || strchr(constant, 'F'))
15991 type->isSigned = 1;
15995 unsigned int isSigned = constant[0] == '-';
15996 char * endP = (((void *)0));
15997 long long i64 = strtoll(constant, &endP, 0);
15998 uint64 ui64 = strtoull(constant, &endP, 0);
15999 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16000 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16004 if(i64 < (((int)0x80000000)))
16009 if(ui64 > (((int)0x7fffffff)))
16011 if(ui64 > (0xffffffff))
16014 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16018 else if(constant[0] != '0' || !constant[1])
16023 type->kind = is64Bit ? 4 : 3;
16024 type->isSigned = isSigned;
16027 exp->isConstant = 1;
16028 if(exp->destType && exp->destType->kind == 7)
16030 else if(exp->destType && exp->destType->kind == 6)
16032 else if(exp->destType && exp->destType->kind == 4)
16039 exp->isConstant = 1;
16040 exp->expType = __extension__ ({
16041 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16043 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16044 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16046 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16047 }), __ecereInstance2;
16053 ProcessExpressionType(exp->__anon1._new.size);
16054 exp->expType = __extension__ ({
16055 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16057 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16059 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16063 ProcessExpressionType(exp->__anon1._renew.size);
16064 ProcessExpressionType(exp->__anon1._renew.exp);
16065 exp->expType = __extension__ ({
16066 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16068 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16070 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16074 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16075 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16076 unsigned int useDestType = 0, useSideType = 0;
16077 struct Location oldyylloc = yylloc;
16078 unsigned int useSideUnit = 0;
16079 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16080 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16082 switch(exp->__anon1.op.op)
16136 if(exp->__anon1.op.exp1)
16143 if(exp->__anon1.op.op == '&')
16145 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16147 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16148 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16150 if(symbol && symbol->isIterator == 2)
16153 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16154 exp->__anon1.member.member = MkIdentifier("key");
16155 exp->expType = (((void *)0));
16156 exp->__anon1.op.exp2->expType = symbol->type;
16157 symbol->type->refCount++;
16158 ProcessExpressionType(exp);
16164 if(exp->__anon1.op.exp1)
16166 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16168 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16170 if(exp->__anon1.op.exp1->destType)
16171 FreeType(exp->__anon1.op.exp1->destType);
16172 exp->__anon1.op.exp1->destType = exp->destType;
16173 exp->__anon1.op.exp1->opDestType = 1;
16175 exp->destType->refCount++;
16179 if(exp->__anon1.op.exp1->destType)
16180 FreeType(exp->__anon1.op.exp1->destType);
16181 exp->__anon1.op.exp1->destType = dummy;
16184 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16185 exp->__anon1.op.exp1->destType->count++;
16186 ProcessExpressionType(exp->__anon1.op.exp1);
16187 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16188 exp->__anon1.op.exp1->destType->count--;
16189 exp->__anon1.op.exp1->opDestType = 0;
16190 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)
16192 exp->__anon1.op.exp2 = MkExpConstant("1");
16193 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16196 if(exp->__anon1.op.exp1->destType == dummy)
16199 exp->__anon1.op.exp1->destType = (((void *)0));
16201 type1 = exp->__anon1.op.exp1->expType;
16203 if(exp->__anon1.op.exp2)
16205 char expString[10240];
16207 expString[0] = '\0';
16208 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16210 if(exp->__anon1.op.exp1)
16212 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16213 if(exp->__anon1.op.exp1->expType)
16214 exp->__anon1.op.exp1->expType->refCount++;
16218 exp->__anon1.op.exp2->destType = exp->destType;
16219 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16220 exp->__anon1.op.exp2->opDestType = 1;
16222 exp->destType->refCount++;
16226 exp->expType = type1;
16231 PrintExpression(exp->__anon1.op.exp2, expString);
16232 if(type1 && type1->kind == 13)
16234 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)
16235 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16236 else if(exp->__anon1.op.op == '=')
16238 if(exp->__anon1.op.exp2->destType)
16239 FreeType(exp->__anon1.op.exp2->destType);
16240 exp->__anon1.op.exp2->destType = type1;
16247 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)
16251 if(exp->__anon1.op.exp2->destType)
16252 FreeType(exp->__anon1.op.exp2->destType);
16253 exp->__anon1.op.exp2->destType = type1;
16260 exp->expType = type1;
16262 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16264 if(exp->__anon1.op.exp2->destType)
16265 FreeType(exp->__anon1.op.exp2->destType);
16266 exp->__anon1.op.exp2->destType = exp->destType;
16267 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16268 exp->__anon1.op.exp2->opDestType = 1;
16270 exp->destType->refCount++;
16274 if(exp->__anon1.op.exp2->destType)
16275 FreeType(exp->__anon1.op.exp2->destType);
16276 exp->__anon1.op.exp2->destType = dummy;
16279 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))
16281 FreeType(exp->__anon1.op.exp2->destType);
16282 exp->__anon1.op.exp2->destType = type1;
16285 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16286 exp->__anon1.op.exp2->destType->count++;
16287 if(exp->__anon1.op.op == SIZEOF)
16289 struct Expression * e = exp->__anon1.op.exp2;
16291 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16293 if(e->type == 5 || e->type == 32 || e->type == 23)
16296 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16298 e = (*e->__anon1.list).last;
16301 if(e->type == 11 && e->__anon1.cast.exp)
16302 e->__anon1.cast.exp->needCast = 1;
16304 ProcessExpressionType(exp->__anon1.op.exp2);
16305 exp->__anon1.op.exp2->opDestType = 0;
16306 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16307 exp->__anon1.op.exp2->destType->count--;
16308 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16310 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)
16312 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16313 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16315 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)))
16317 if(exp->__anon1.op.op == ADD_ASSIGN)
16318 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16320 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))
16322 if(exp->__anon1.op.op == ADD_ASSIGN)
16323 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16325 else if(inCompiler)
16327 char type1String[1024];
16328 char type2String[1024];
16330 type1String[0] = '\0';
16331 type2String[0] = '\0';
16332 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16333 PrintType(type1, type2String, 0, 1);
16334 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16335 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16338 if(exp->__anon1.op.exp2->destType == dummy)
16341 exp->__anon1.op.exp2->destType = (((void *)0));
16343 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16345 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16346 type2->refCount = 1;
16347 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16348 type2->isSigned = 1;
16350 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))
16352 type2 = __extension__ ({
16353 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16355 __ecereInstance1->kind = 3, __ecereInstance1;
16357 type2->refCount = 1;
16358 type2->isSigned = 1;
16362 type2 = exp->__anon1.op.exp2->expType;
16368 if(exp->__anon1.op.op == SIZEOF)
16370 exp->expType = __extension__ ({
16371 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16373 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16375 exp->isConstant = 1;
16377 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16379 exp->expType = Dereference(type2);
16380 if(type2 && type2->kind == 8)
16381 notByReference = 1;
16383 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16384 exp->expType = Reference(type2);
16389 if(exp->__anon1.op.exp1)
16391 if(exp->__anon1.op.exp1->destType)
16392 FreeType(exp->__anon1.op.exp1->destType);
16393 exp->__anon1.op.exp1->destType = MkClassType("bool");
16394 exp->__anon1.op.exp1->destType->truth = 1;
16395 if(!exp->__anon1.op.exp1->expType)
16396 ProcessExpressionType(exp->__anon1.op.exp1);
16398 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16399 FreeType(exp->__anon1.op.exp1->expType);
16400 exp->__anon1.op.exp1->expType = MkClassType("bool");
16401 exp->__anon1.op.exp1->expType->truth = 1;
16403 if(exp->__anon1.op.exp2)
16405 if(exp->__anon1.op.exp2->destType)
16406 FreeType(exp->__anon1.op.exp2->destType);
16407 exp->__anon1.op.exp2->destType = MkClassType("bool");
16408 exp->__anon1.op.exp2->destType->truth = 1;
16409 if(!exp->__anon1.op.exp2->expType)
16410 ProcessExpressionType(exp->__anon1.op.exp2);
16412 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16413 FreeType(exp->__anon1.op.exp2->expType);
16414 exp->__anon1.op.exp2->expType = MkClassType("bool");
16415 exp->__anon1.op.exp2->expType->truth = 1;
16418 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")))))
16420 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"))))
16422 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)))
16424 struct Type * intType;
16426 if(!type1->__anon1._class->__anon1.registered->dataType)
16427 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16428 if(!type2->__anon1._class->__anon1.registered->dataType)
16429 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16430 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16431 if(exp->__anon1.op.exp1->destType)
16432 FreeType(exp->__anon1.op.exp1->destType);
16433 if(exp->__anon1.op.exp2->destType)
16434 FreeType(exp->__anon1.op.exp2->destType);
16435 exp->__anon1.op.exp1->destType = intType;
16436 exp->__anon1.op.exp2->destType = intType;
16437 intType->refCount++;
16441 if(exp->__anon1.op.exp2->destType)
16442 FreeType(exp->__anon1.op.exp2->destType);
16443 exp->__anon1.op.exp2->destType = type1;
16445 if(exp->__anon1.op.exp1->destType)
16446 FreeType(exp->__anon1.op.exp1->destType);
16447 exp->__anon1.op.exp1->destType = type2;
16450 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)
16451 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);
16452 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16454 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16458 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16460 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16461 ProcessExpressionType(exp->__anon1.op.exp1);
16462 if(type2->kind != 13)
16464 ProcessExpressionType(classExp);
16465 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16466 if(!exp->__anon1.op.exp2->expType)
16470 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16473 ProcessExpressionType(exp->__anon1.op.exp2);
16477 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)))
16479 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16480 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16481 exp->expType = type1;
16485 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)))
16487 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16488 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16489 exp->expType = type2;
16493 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))
16495 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16499 unsigned int success = 0;
16501 if(type1->kind == 13 && type2->kind == 13)
16503 if(exp->__anon1.op.op == '+')
16504 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16505 else if(exp->__anon1.op.op == '-')
16507 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16509 exp->expType = __extension__ ({
16510 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16512 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16515 if(type1->__anon1.type->kind == 20)
16517 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16521 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16523 ProcessExpressionType(classExp);
16525 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"))));
16526 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16534 if(!success && exp->__anon1.op.exp1->type == 2)
16536 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16539 FreeType(exp->expType);
16540 exp->expType = exp->__anon1.op.exp1->destType;
16541 if(exp->__anon1.op.exp1->destType)
16542 exp->__anon1.op.exp1->destType->refCount++;
16545 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16548 FreeType(exp->expType);
16549 exp->expType = exp->__anon1.op.exp2->destType;
16550 if(exp->__anon1.op.exp2->destType)
16551 exp->__anon1.op.exp2->destType->refCount++;
16557 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16560 FreeType(exp->expType);
16561 exp->expType = exp->__anon1.op.exp2->destType;
16562 if(exp->__anon1.op.exp2->destType)
16563 exp->__anon1.op.exp2->destType->refCount++;
16566 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16569 FreeType(exp->expType);
16570 exp->expType = exp->__anon1.op.exp1->destType;
16571 if(exp->__anon1.op.exp1->destType)
16572 exp->__anon1.op.exp1->destType->refCount++;
16578 char expString1[10240];
16579 char expString2[10240];
16583 expString1[0] = '\0';
16584 expString2[0] = '\0';
16589 PrintExpression(exp->__anon1.op.exp1, expString1);
16590 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16591 PrintExpression(exp->__anon1.op.exp2, expString2);
16592 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16593 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16594 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16596 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16600 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)
16602 if(exp->__anon1.op.exp1->destType)
16603 FreeType(exp->__anon1.op.exp1->destType);
16604 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16605 if(type2->__anon1._class->__anon1.registered->dataType)
16606 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16607 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16608 exp->expType = type2;
16612 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)
16614 if(exp->__anon1.op.exp2->destType)
16615 FreeType(exp->__anon1.op.exp2->destType);
16616 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16617 if(type1->__anon1._class->__anon1.registered->dataType)
16618 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16619 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16620 exp->expType = type1;
16626 unsigned int valid = 0;
16628 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16630 if(exp->__anon1.op.exp2->destType)
16631 FreeType(exp->__anon1.op.exp2->destType);
16632 if(!type1->__anon1._class->__anon1.registered->dataType)
16633 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16634 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16635 exp->__anon1.op.exp2->destType->refCount++;
16636 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16639 type2 = exp->__anon1.op.exp2->destType;
16642 exp->expType = type2;
16645 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16647 if(exp->__anon1.op.exp1->destType)
16648 FreeType(exp->__anon1.op.exp1->destType);
16649 if(!type2->__anon1._class->__anon1.registered->dataType)
16650 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16651 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16652 exp->__anon1.op.exp1->destType->refCount++;
16653 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16654 type1 = exp->__anon1.op.exp1->destType;
16655 exp->expType = type1;
16658 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16660 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16661 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16663 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16665 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16667 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16670 FreeType(exp->expType);
16671 exp->expType = exp->__anon1.op.exp2->expType;
16672 if(exp->__anon1.op.exp2->expType)
16673 exp->__anon1.op.exp2->expType->refCount++;
16677 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16679 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16682 FreeType(exp->expType);
16683 exp->expType = exp->__anon1.op.exp1->expType;
16684 if(exp->__anon1.op.exp1->expType)
16685 exp->__anon1.op.exp1->expType->refCount++;
16692 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16694 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16697 FreeType(exp->expType);
16698 exp->expType = exp->__anon1.op.exp1->expType;
16699 if(exp->__anon1.op.exp1->expType)
16700 exp->__anon1.op.exp1->expType->refCount++;
16704 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16706 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16709 FreeType(exp->expType);
16710 exp->expType = exp->__anon1.op.exp2->expType;
16711 if(exp->__anon1.op.exp2->expType)
16712 exp->__anon1.op.exp2->expType->refCount++;
16720 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))
16722 if(exp->__anon1.op.exp1->destType)
16723 FreeType(exp->__anon1.op.exp1->destType);
16724 exp->__anon1.op.exp1->destType = type2;
16726 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16729 FreeType(exp->expType);
16730 exp->expType = exp->__anon1.op.exp1->destType;
16731 if(exp->__anon1.op.exp1->destType)
16732 exp->__anon1.op.exp1->destType->refCount++;
16737 if(exp->__anon1.op.exp2->destType)
16738 FreeType(exp->__anon1.op.exp2->destType);
16739 exp->__anon1.op.exp2->destType = type1;
16741 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16744 FreeType(exp->expType);
16745 exp->expType = exp->__anon1.op.exp2->destType;
16746 if(exp->__anon1.op.exp2->destType)
16747 exp->__anon1.op.exp2->destType->refCount++;
16749 else if(type1 && type2)
16751 char expString1[10240];
16752 char expString2[10240];
16753 char type1String[1024];
16754 char type2String[1024];
16756 expString1[0] = '\0';
16757 expString2[0] = '\0';
16758 type1String[0] = '\0';
16759 type2String[0] = '\0';
16762 PrintExpression(exp->__anon1.op.exp1, expString1);
16763 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16764 PrintExpression(exp->__anon1.op.exp2, expString2);
16765 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16766 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16767 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16769 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16770 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16772 exp->expType = exp->__anon1.op.exp1->expType;
16773 if(exp->__anon1.op.exp1->expType)
16774 exp->__anon1.op.exp1->expType->refCount++;
16776 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16778 exp->expType = exp->__anon1.op.exp2->expType;
16779 if(exp->__anon1.op.exp2->expType)
16780 exp->__anon1.op.exp2->expType->refCount++;
16788 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16790 struct Type * oldType = exp->__anon1.op.exp1->expType;
16792 exp->__anon1.op.exp1->expType = (((void *)0));
16793 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16796 exp->__anon1.op.exp1->expType = oldType;
16798 if(exp->__anon1.op.exp1->destType)
16799 FreeType(exp->__anon1.op.exp1->destType);
16800 exp->__anon1.op.exp1->destType = type2;
16802 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16805 FreeType(exp->expType);
16806 exp->expType = exp->__anon1.op.exp1->destType;
16807 if(exp->__anon1.op.exp1->destType)
16808 exp->__anon1.op.exp1->destType->refCount++;
16812 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16814 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16816 if(exp->__anon1.op.exp1->destType)
16817 FreeType(exp->__anon1.op.exp1->destType);
16818 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16819 if(type2->__anon1._class->__anon1.registered->dataType)
16820 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16821 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16823 if(exp->__anon1.op.op == '!')
16825 exp->expType = MkClassType("bool");
16826 exp->expType->truth = 1;
16830 exp->expType = type2;
16835 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16837 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16839 if(exp->__anon1.op.exp2->destType)
16840 FreeType(exp->__anon1.op.exp2->destType);
16841 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16842 if(type1->__anon1._class->__anon1.registered->dataType)
16843 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16844 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16846 exp->expType = type1;
16852 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16854 char expString[10000];
16856 expString[0] = '\0';
16859 PrintExpression(exp->__anon1.op.exp1, expString);
16860 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16863 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16865 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16867 char expString[10240];
16869 expString[0] = '\0';
16872 PrintExpression(exp->__anon1.op.exp2, expString);
16873 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16876 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16880 FreeType(exp->expType);
16881 exp->expType = MkClassType("bool");
16882 exp->expType->truth = 1;
16884 if(exp->__anon1.op.op != SIZEOF)
16885 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16886 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16888 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16890 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16891 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16892 yylloc = oldyylloc;
16901 struct Expression * e;
16903 exp->isConstant = 1;
16904 for(e = (*exp->__anon1.list).first; e; e = e->next)
16908 FreeType(e->destType);
16909 e->opDestType = exp->opDestType;
16910 e->destType = exp->destType;
16913 exp->destType->refCount++;
16916 ProcessExpressionType(e);
16917 if(!exp->expType && !e->next)
16919 exp->expType = e->expType;
16921 e->expType->refCount++;
16924 exp->isConstant = 0;
16926 e = (*exp->__anon1.list).first;
16927 if(!e->next && e->type == 8)
16929 struct Expression * next = exp->next, * prev = exp->prev;
16931 FreeType(exp->expType);
16932 FreeType(exp->destType);
16933 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16937 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16938 ProcessExpressionType(exp);
16944 struct Expression * e;
16946 exp->isConstant = 1;
16947 ProcessExpressionType(exp->__anon1.index.exp);
16948 if(!exp->__anon1.index.exp->isConstant)
16949 exp->isConstant = 0;
16950 if(exp->__anon1.index.exp->expType)
16952 struct Type * source = exp->__anon1.index.exp->expType;
16954 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16956 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16957 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16959 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
16961 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
16962 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
16964 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
16966 if(type->kind == 8)
16967 type->constant = 1;
16968 else if(type->kind == 13)
16970 struct Type * t = type;
16972 while(t->kind == 13)
16973 t = t->__anon1.type;
16976 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
16981 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
16983 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
16986 FreeType(e->destType);
16987 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
16989 ProcessExpressionType(e);
16994 exp->isConstant = 0;
16997 exp->expType = Dereference(exp->__anon1.index.exp->expType);
16999 DeclareType(curExternal, exp->expType, 1, 0);
17004 struct Expression * e;
17005 struct Type * functionType;
17006 struct Type * methodType = (((void *)0));
17012 PrintExpression(exp->__anon1.call.exp, name);
17013 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17015 PrintExpression(exp->__anon1.call.exp, name);
17018 if(exp->__anon1.call.exp->type == 0)
17020 struct Expression * idExp = exp->__anon1.call.exp;
17021 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17023 if(!strcmp(id->string, "__builtin_frame_address"))
17025 exp->expType = ProcessTypeString("void *", 1);
17026 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17027 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17030 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17032 exp->expType = ProcessTypeString("int", 1);
17033 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17034 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17037 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17039 struct Expression * a = (((void *)0));
17040 struct Expression * b = (((void *)0));
17041 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17043 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17045 a = (*exp->__anon1.call.arguments).first;
17046 b = (*exp->__anon1.call.arguments).last;
17050 else if((*exp->__anon1.call.arguments).count == 1)
17052 a = (*exp->__anon1.call.arguments).first;
17057 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17058 idExp->__anon1.__anon1.identifier = (((void *)0));
17059 FreeExpContents(exp);
17060 ProcessExpressionType(a);
17062 ProcessExpressionType(b);
17064 exp->__anon1.list = MkList();
17065 if(a->expType && (!b || b->expType))
17067 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17071 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17072 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17073 struct Declaration * decl;
17074 char temp1[1024], temp2[1024];
17076 GetTypeSpecs(a->expType, specs);
17077 if(a && !a->isConstant && a->type != 0)
17079 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17080 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17081 tempExp1 = QMkExpId(temp1);
17082 tempExp1->expType = a->expType;
17084 a->expType->refCount++;
17085 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17087 if(b && !b->isConstant && b->type != 0)
17089 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17090 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17091 tempExp2 = QMkExpId(temp2);
17092 tempExp2->expType = b->expType;
17094 b->expType->refCount++;
17095 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17097 decl = MkDeclaration(specs, decls);
17098 if(!curCompound->__anon1.compound.declarations)
17099 curCompound->__anon1.compound.declarations = MkList();
17100 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17104 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17106 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17108 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17109 exp->expType = a->expType;
17111 a->expType->refCount++;
17113 else if(!strcmp(id->string, "Abs"))
17115 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17116 exp->expType = a->expType;
17118 a->expType->refCount++;
17120 else if(!strcmp(id->string, "Sgn"))
17122 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"))))));
17123 exp->expType = ProcessTypeString("int", 0);
17125 FreeExpression(tempExp1);
17127 FreeExpression(tempExp2);
17128 FreeIdentifier(id);
17134 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17136 if(!exp->__anon1.call.exp->destType)
17138 exp->__anon1.call.exp->destType = dummy;
17141 ProcessExpressionType(exp->__anon1.call.exp);
17142 if(exp->__anon1.call.exp->destType == dummy)
17145 exp->__anon1.call.exp->destType = (((void *)0));
17149 functionType = exp->__anon1.call.exp->expType;
17150 if(functionType && functionType->kind == 16)
17152 methodType = functionType;
17153 functionType = methodType->__anon1.__anon3.method->dataType;
17154 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17156 char typeString[1024];
17158 typeString[0] = '\0';
17160 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17162 functionType->__anon1.__anon2.thisClass = (((void *)0));
17163 PrintType(functionType, typeString, 1, 1);
17164 functionType->__anon1.__anon2.thisClass = back;
17166 if(strstr(typeString, "thisclass"))
17168 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17169 struct Declarator * decl;
17172 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17174 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17175 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))
17176 thisClassParams = 0;
17177 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17179 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17181 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17182 ProcessDeclarator(decl, 1);
17183 thisClass = backupThisClass;
17185 thisClassParams = 1;
17186 functionType = ProcessType(specs, decl);
17187 functionType->refCount = 0;
17188 FinishTemplatesContext(context);
17190 struct Type * p, * op;
17192 for(p = functionType->__anon1.__anon2.params.first, op = methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.params.first; p && op; p = p->next, op = op->next)
17195 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17198 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17200 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17203 FreeList(specs, (void *)(FreeSpecifier));
17204 FreeDeclarator(decl);
17208 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17210 struct Type * type = functionType->__anon1.type;
17212 if(!functionType->refCount)
17214 functionType->__anon1.type = (((void *)0));
17215 FreeType(functionType);
17217 functionType = type;
17219 if(functionType && functionType->kind != 11)
17221 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17223 else if(functionType)
17225 unsigned int emptyParams = 0, noParams = 0;
17226 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17227 struct Type * type = functionType->__anon1.__anon2.params.first;
17228 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17230 struct Location oldyylloc = yylloc;
17234 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17236 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17239 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17241 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)
17243 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17246 e->destType = type;
17248 type = functionType->__anon1.__anon2.params.first;
17251 type->refCount = 0;
17253 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17255 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17256 type->byReference = functionType->byReference;
17257 type->typedByReference = functionType->typedByReference;
17260 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17262 e->destType = type;
17264 type = functionType->__anon1.__anon2.params.first;
17267 type->refCount = 0;
17270 if(type && type->kind == 0)
17273 if(!type->refCount)
17275 type = (((void *)0));
17277 for(; e; e = e->next)
17279 if(!type && !emptyParams)
17282 if(methodType && methodType->__anon1.__anon3.methodClass)
17283 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);
17285 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);
17288 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17290 struct Type * templatedType = (((void *)0));
17291 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17292 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17295 if(_class && _class->templateArgs)
17297 struct __ecereNameSpace__ecere__com__Class * sClass;
17299 for(sClass = _class; sClass; sClass = sClass->base)
17301 if(sClass->templateClass)
17302 sClass = sClass->templateClass;
17304 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17306 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17308 struct __ecereNameSpace__ecere__com__Class * nextClass;
17310 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17312 if(nextClass->templateClass)
17313 nextClass = nextClass->templateClass;
17314 id += nextClass->templateParams.count;
17324 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17326 unsigned int constant = type->constant;
17327 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17330 struct Context * context = SetupTemplatesContext(_class);
17332 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17333 FinishTemplatesContext(context);
17335 if(templatedType->kind == 8 && constant)
17336 templatedType->constant = 1;
17337 else if(templatedType->kind == 13)
17339 struct Type * t = templatedType->__anon1.type;
17341 while(t->kind == 13)
17342 t = t->__anon1.type;
17344 t->constant = constant;
17346 e->destType = templatedType;
17349 templatedType->passAsTemplate = 1;
17354 e->destType = type;
17361 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17363 e->destType = type->prev;
17364 e->destType->refCount++;
17368 e->destType = type;
17373 if(type && type->kind != 14)
17375 struct Type * next = type->next;
17377 if(!type->refCount)
17382 if(type && type->kind != 14)
17384 if(methodType && methodType->__anon1.__anon3.methodClass)
17385 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);
17387 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);
17389 yylloc = oldyylloc;
17390 if(type && !type->refCount)
17395 functionType = __extension__ ({
17396 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17398 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17400 if(exp->__anon1.call.exp->type == 0)
17402 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17406 struct Symbol * symbol;
17407 struct Location oldyylloc = yylloc;
17409 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17410 if(strstr(string, "__builtin_") == string)
17414 functionType->__anon1.__anon2.returnType = exp->destType;
17415 exp->destType->refCount++;
17419 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17420 symbol = __extension__ ({
17421 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17423 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17425 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17426 if(strstr(symbol->string, "::"))
17427 globalContext->hasNameSpace = 1;
17428 yylloc = oldyylloc;
17431 else if(exp->__anon1.call.exp->type == 8)
17435 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17436 if(!functionType->__anon1.__anon2.returnType)
17438 functionType->__anon1.__anon2.returnType = __extension__ ({
17439 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17441 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17445 if(functionType && functionType->kind == 11)
17447 exp->expType = functionType->__anon1.__anon2.returnType;
17448 if(functionType->__anon1.__anon2.returnType)
17449 functionType->__anon1.__anon2.returnType->refCount++;
17450 if(!functionType->refCount)
17451 FreeType(functionType);
17453 if(exp->__anon1.call.arguments)
17455 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17456 ProcessExpressionType(e);
17462 struct Type * type;
17463 struct Location oldyylloc = yylloc;
17464 unsigned int thisPtr;
17465 struct Expression * checkExp = exp->__anon1.member.exp;
17469 if(checkExp->type == 11)
17470 checkExp = checkExp->__anon1.cast.exp;
17471 else if(checkExp->type == 5)
17472 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17476 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17477 exp->thisPtr = thisPtr;
17478 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17480 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17482 ProcessExpressionType(exp->__anon1.member.exp);
17483 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)
17485 exp->isConstant = 0;
17488 exp->isConstant = exp->__anon1.member.exp->isConstant;
17489 type = exp->__anon1.member.exp->expType;
17491 if(type && (type->kind == 20))
17493 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17494 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17498 for(param = _class->templateParams.first; param; param = param->next)
17500 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17504 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17506 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17510 struct Expression * expMember = exp->__anon1.member.exp;
17511 struct Declarator * decl;
17512 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17513 char thisClassTypeString[1024];
17515 FreeIdentifier(exp->__anon1.member.member);
17516 ProcessExpressionType(argExp);
17518 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17522 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17523 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17526 strcpy(thisClassTypeString, _class->fullName);
17528 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17529 exp->expType = ProcessType(specs, decl);
17530 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17532 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17533 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17534 int paramCount = 0;
17535 int lastParam = -1;
17536 char templateString[1024];
17537 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17539 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17540 for(cClass = expClass; cClass; cClass = cClass->base)
17544 for(param = cClass->templateParams.first; param; param = param->next)
17547 struct __ecereNameSpace__ecere__com__Class * sClass;
17548 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17550 for(sClass = cClass->base; sClass; sClass = sClass->base)
17551 id += sClass->templateParams.count;
17552 arg = expClass->templateArgs[id];
17553 for(sClass = _class; sClass; sClass = sClass->base)
17555 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17557 struct __ecereNameSpace__ecere__com__Class * nextClass;
17559 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17560 p += nextClass->templateParams.count;
17561 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17563 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17565 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17567 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17568 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17575 char argument[256];
17577 argument[0] = '\0';
17578 switch(param->type)
17582 char expString[1024];
17583 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17584 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17585 struct Expression * exp;
17586 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17588 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17589 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17590 ProcessExpressionType(exp);
17591 ComputeExpression(exp);
17592 expString[0] = '\0';
17593 PrintExpression(exp, expString);
17594 strcat(argument, expString);
17595 FreeExpression(exp);
17600 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17605 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17607 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17608 strcat(argument, thisClassTypeString);
17610 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17618 strcat(templateString, ", ");
17619 if(lastParam != p - 1)
17621 strcat(templateString, param->name);
17622 strcat(templateString, " = ");
17624 strcat(templateString, argument);
17633 int len = strlen(templateString);
17635 if(templateString[len - 1] == '>')
17636 templateString[len++] = ' ';
17637 templateString[len++] = '>';
17638 templateString[len++] = '\0';
17641 struct Context * context = SetupTemplatesContext(_class);
17643 FreeType(exp->expType);
17644 exp->expType = ProcessTypeString(templateString, 0);
17645 FinishTemplatesContext(context);
17648 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17649 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17651 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")))))))));
17654 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17656 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17659 if(type && (type->kind == 20))
17661 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)))
17663 struct Identifier * id = exp->__anon1.member.member;
17664 int typeKind = type->kind;
17665 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));
17667 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17669 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17674 if(typeKind == 3 || typeKind == 15)
17675 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17678 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17680 _class = type->__anon1._class->__anon1.registered;
17682 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17684 _class = FindClass("char *")->__anon1.registered;
17686 else if(type->kind == 13)
17688 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17689 FreeType(exp->expType);
17690 exp->expType = ProcessTypeString("uintptr", 0);
17691 exp->byReference = 1;
17695 char string[1024] = "";
17696 struct Symbol * classSym;
17698 PrintTypeNoConst(type, string, 0, 1);
17699 classSym = FindClass(string);
17701 _class = classSym->__anon1.registered;
17707 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17708 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17709 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17710 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17711 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17713 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17714 exp->__anon1.member.memberType = 1;
17715 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17716 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17719 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17721 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17722 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17724 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17726 member = (((void *)0));
17728 if(!member && !prop)
17729 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17730 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17731 exp->__anon1.member.thisPtr = 1;
17735 unsigned int useMemberForNonConst = 0;
17739 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17740 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);
17741 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17742 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17744 if((!prop || useMemberForNonConst) && !member)
17746 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17749 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17750 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);
17751 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17752 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17757 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17758 prop = (((void *)0));
17760 member = (((void *)0));
17764 if(!prop && !member && !method)
17765 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17766 if(!prop && !member && !method)
17770 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17773 exp->__anon1.member.memberType = 5;
17774 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17778 char structName[1024];
17779 struct Identifier * id = exp->__anon1.member.member;
17780 struct Expression * classExp = exp->__anon1.member.exp;
17783 FreeType(classExp->expType);
17784 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17785 strcpy(structName, "__ecereClassData_");
17786 FullClassNameCat(structName, type->__anon1._class->string, 0);
17788 exp->__anon1.member.member = id;
17789 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"))))))));
17791 ProcessExpressionType(exp);
17797 struct Symbol * classSym = FindClass(id->string);
17801 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17804 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17808 if(exp->__anon1.member.exp->destType)
17809 FreeType(exp->__anon1.member.exp->destType);
17811 if(method && !method->_class->symbol)
17812 method->_class->symbol = FindClass(method->_class->fullName);
17813 if(prop && !prop->_class->symbol)
17814 prop->_class->symbol = FindClass(prop->_class->fullName);
17815 exp->__anon1.member.exp->destType = __extension__ ({
17816 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17818 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1->thisClassFrom = type ? type->thisClassFrom : (((void *)0)), __ecereInstance1;
17823 exp->__anon1.member.memberType = 1;
17824 if(!prop->dataType)
17825 ProcessPropertyType(prop);
17826 exp->expType = prop->dataType;
17827 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17829 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17831 CopyTypeInto(type, exp->expType);
17832 type->refCount = 1;
17833 type->constant = 1;
17834 exp->expType = type;
17836 else if(prop->dataType)
17837 prop->dataType->refCount++;
17841 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17843 FreeExpContents(exp);
17845 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17846 ProcessExpressionType(exp);
17849 exp->__anon1.member.memberType = 3;
17850 DeclareStruct(curExternal, _class->fullName, 0, 1);
17851 if(member->_class != _class)
17852 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17853 if(!member->dataType)
17855 struct Context * context = SetupTemplatesContext(_class);
17857 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17858 FinishTemplatesContext(context);
17860 exp->expType = member->dataType;
17861 if(member->dataType)
17862 member->dataType->refCount++;
17864 else if(revConvert)
17866 exp->__anon1.member.memberType = 4;
17867 exp->expType = MkClassType(revConvert->_class->fullName);
17872 exp->__anon1.member.memberType = 2;
17874 if(!method->dataType)
17875 ProcessMethodType(method);
17876 exp->expType = __extension__ ({
17877 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17879 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17881 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17882 exp->expType->__anon1.__anon3.usedClass = _class;
17884 else if(!classProp)
17886 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17888 FreeExpContents(exp);
17890 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17891 FreeType(exp->expType);
17892 exp->expType = MkClassType("ecere::com::Class");
17895 yylloc = exp->__anon1.member.member->loc;
17896 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17898 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17900 if(_class && exp->expType)
17902 struct __ecereNameSpace__ecere__com__Class * tClass;
17904 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17905 while(tClass && !tClass->templateClass)
17906 tClass = tClass->base;
17907 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17910 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17911 struct __ecereNameSpace__ecere__com__Class * sClass;
17913 for(sClass = tClass; sClass; sClass = sClass->base)
17916 if(sClass->templateClass)
17917 sClass = sClass->templateClass;
17918 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17920 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17922 for(sClass = sClass->base; sClass; sClass = sClass->base)
17923 id += sClass->templateParams.count;
17931 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17933 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17934 struct Context * context = SetupTemplatesContext(tClass);
17935 unsigned int constant = exp->expType->constant;
17936 unsigned int passAsTemplate = 0;
17937 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17938 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17940 if(t && t->kind == 8 && t->__anon1._class)
17941 thisClassFrom = t->__anon1._class->__anon1.registered;
17943 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
17945 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17946 FreeType(exp->expType);
17947 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17948 exp->expType->thisClassFrom = thisClassFrom;
17949 if(exp->expType->kind == 8 && constant)
17950 exp->expType->constant = 1;
17951 else if(exp->expType->kind == 13)
17953 struct Type * t = exp->expType->__anon1.type;
17955 while(t->kind == 13)
17956 t = t->__anon1.type;
17958 t->constant = constant;
17962 if(exp->expType->kind == 21)
17964 FreeType(exp->expType);
17965 exp->expType = ReplaceThisClassType(_class);
17968 exp->expType->passAsTemplate = 1;
17971 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17972 if(exp->destType->kind == 8 && constant)
17973 exp->destType->constant = 1;
17974 else if(exp->destType->kind == 13)
17976 struct Type * t = exp->destType->__anon1.type;
17978 while(t->kind == 13)
17979 t = t->__anon1.type;
17981 t->constant = constant;
17983 if(exp->destType->kind == 21)
17985 FreeType(exp->destType);
17986 exp->destType = ReplaceThisClassType(_class);
17990 FinishTemplatesContext(context);
17993 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)
17996 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17997 struct __ecereNameSpace__ecere__com__Class * sClass;
17999 for(sClass = tClass; sClass; sClass = sClass->base)
18002 if(sClass->templateClass)
18003 sClass = sClass->templateClass;
18004 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18006 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18008 for(sClass = sClass->base; sClass; sClass = sClass->base)
18009 id += sClass->templateParams.count;
18019 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18020 struct Context * context = SetupTemplatesContext(tClass);
18021 struct Type * basicType;
18023 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18026 if(basicType->kind == 21)
18028 FreeType(basicType);
18029 basicType = ReplaceThisClassType(_class);
18031 FreeType(exp->expType);
18032 exp->expType = __extension__ ({
18033 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18035 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18039 exp->destType = exp->expType;
18040 exp->destType->refCount++;
18043 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18044 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18045 struct Declarator * decl;
18047 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18050 exp->destType->refCount++;
18052 exp->expType->refCount++;
18054 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18055 exp->__anon1.cast.exp = newExp;
18058 FinishTemplatesContext(context);
18061 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18063 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18067 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18069 int paramCount = 0;
18070 int lastParam = -1;
18071 char templateString[1024];
18072 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18074 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18075 while(cClass != expClass)
18077 struct __ecereNameSpace__ecere__com__Class * sClass;
18079 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18082 for(param = cClass->templateParams.first; param; param = param->next)
18084 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18086 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18087 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18089 while(cClassCur != tClass && !paramCur)
18091 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18093 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18095 cClassCur = sClassCur;
18096 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18098 if(!strcmp(paramCur->name, param->name))
18105 if(paramCur && paramCur->type == 0)
18106 arg = tClass->templateArgs[cp];
18108 arg = expClass->templateArgs[p];
18110 char argument[256];
18112 argument[0] = '\0';
18113 switch(param->type)
18117 char expString[1024];
18118 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18119 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18120 struct Expression * exp;
18121 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18123 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18124 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18125 ProcessExpressionType(exp);
18126 ComputeExpression(exp);
18127 expString[0] = '\0';
18128 PrintExpression(exp, expString);
18129 strcat(argument, expString);
18130 FreeExpression(exp);
18135 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18140 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18141 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18148 strcat(templateString, ", ");
18149 if(lastParam != p - 1)
18151 strcat(templateString, param->name);
18152 strcat(templateString, " = ");
18154 strcat(templateString, argument);
18163 int len = strlen(templateString);
18165 if(templateString[len - 1] == '>')
18166 templateString[len++] = ' ';
18167 templateString[len++] = '>';
18168 templateString[len++] = '\0';
18170 FreeType(exp->expType);
18172 struct Context * context = SetupTemplatesContext(tClass);
18174 exp->expType = ProcessTypeString(templateString, 0);
18175 FinishTemplatesContext(context);
18182 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)");
18184 else if(type && (type->kind == 9 || type->kind == 10))
18186 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18190 exp->expType = memberType;
18192 memberType->refCount++;
18197 char expString[10240];
18199 expString[0] = '\0';
18202 PrintExpression(exp, expString);
18203 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18205 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18207 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18209 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18211 struct Identifier * id = exp->__anon1.member.member;
18212 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));
18216 FreeType(exp->expType);
18217 exp->expType = ReplaceThisClassType(_class);
18221 yylloc = oldyylloc;
18226 struct Type * destType = exp->destType;
18228 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18230 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18232 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18236 ProcessExpressionType(exp);
18243 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18245 if(classSym && classSym->__anon1.registered)
18247 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18250 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18253 DeclareStruct(curExternal, classSym->string, 0, 1);
18254 FreeSpecifier(exp->__anon1._class);
18255 FullClassNameCat(name, classSym->string, 0);
18259 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18263 struct Expression * e;
18266 if(b->structSize == b->offset)
18267 exp->__anon1.op.exp1 = MkExpConstant("0");
18269 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18270 exp->__anon1.op.op = '+';
18272 while(b->offset != 0)
18274 struct Symbol * sym;
18275 struct Expression * typeSize;
18278 sym = FindClass(b->fullName);
18280 DeclareStruct(curExternal, sym->string, 0, 1);
18281 FullClassNameCat(name, sym->string, 0);
18282 if(b->structSize == b->offset)
18283 typeSize = MkExpConstant("0");
18285 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18286 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18287 e = e->__anon1.op.exp2;
18293 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18295 FreeSpecifier(exp->__anon1._class);
18296 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18301 char className[1024];
18303 strcpy(className, "__ecereClass_");
18304 FullClassNameCat(className, classSym->string, 1);
18305 DeclareClass(curExternal, classSym, className);
18306 FreeExpContents(exp);
18308 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18309 exp->__anon1.member.member = MkIdentifier("structSize");
18313 exp->expType = __extension__ ({
18314 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18316 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18322 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18324 exp->expType = __extension__ ({
18325 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18327 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18329 exp->isConstant = 1;
18330 DeclareType(curExternal, type, 1, 0);
18336 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18339 FreeType(exp->__anon1.cast.exp->destType);
18340 exp->__anon1.cast.exp->destType = type;
18343 ProcessExpressionType(exp->__anon1.cast.exp);
18346 exp->expType = type;
18347 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18349 void * prev = exp->prev, * next = exp->next;
18350 struct Type * expType = exp->__anon1.cast.exp->destType;
18351 struct Expression * castExp = exp->__anon1.cast.exp;
18352 struct Type * destType = exp->destType;
18355 expType->refCount++;
18356 FreeType(exp->expType);
18357 FreeTypeName(exp->__anon1.cast.typeName);
18359 FreeType(exp->expType);
18360 FreeType(exp->destType);
18361 exp->expType = expType;
18362 exp->destType = destType;
18363 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18369 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18375 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18377 exp->expType = type;
18382 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18384 ProcessExpressionType(exp->__anon1.vaArg.exp);
18385 exp->expType = type;
18390 struct Expression * e;
18391 struct Type * t = exp->destType;
18393 if(t && !exp->destType->casted)
18395 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18396 CopyTypeInto(t, exp->destType);
18401 exp->isConstant = 1;
18402 FreeType(exp->__anon1.cond.cond->destType);
18403 exp->__anon1.cond.cond->destType = MkClassType("bool");
18404 exp->__anon1.cond.cond->destType->truth = 1;
18405 ProcessExpressionType(exp->__anon1.cond.cond);
18406 if(!exp->__anon1.cond.cond->isConstant)
18407 exp->isConstant = 0;
18408 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18412 FreeType(e->destType);
18415 e->destType->refCount++;
18417 ProcessExpressionType(e);
18420 exp->expType = e->expType;
18422 e->expType->refCount++;
18425 exp->isConstant = 0;
18427 FreeType(exp->__anon1.cond.elseExp->destType);
18428 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18429 if(exp->__anon1.cond.elseExp->destType)
18430 exp->__anon1.cond.elseExp->destType->refCount++;
18431 ProcessExpressionType(exp->__anon1.cond.elseExp);
18432 if(!exp->__anon1.cond.elseExp->isConstant)
18433 exp->isConstant = 0;
18439 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18441 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18443 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18445 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18447 exp->destType->refCount++;
18449 ProcessStatement(exp->__anon1.compound);
18450 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18452 exp->expType->refCount++;
18458 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18460 if(spec && spec->type == 1)
18462 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18463 exp->expType->kind = 19;
18464 exp->byReference = 1;
18468 exp->expType = MkClassType("ecere::com::Class");
18469 exp->byReference = 1;
18475 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18479 struct Identifier * id = exp->__anon1.classData.id;
18480 char structName[1024];
18481 struct Expression * classExp;
18483 strcpy(structName, "__ecereClassData_");
18484 FullClassNameCat(structName, _class->fullName, 0);
18486 exp->__anon1.member.member = id;
18487 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18488 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18490 classExp = MkExpIdentifier(MkIdentifier("class"));
18491 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"))))))));
18492 ProcessExpressionType(exp);
18499 struct Type * type = (((void *)0));
18500 const char * typeString = (((void *)0));
18501 char typeStringBuf[1024];
18503 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))
18505 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18507 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18509 else if(exp->__anon1.list)
18511 struct Expression * e;
18513 for(e = (*exp->__anon1.list).first; e; e = e->next)
18515 ProcessExpressionType(e);
18525 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18529 e->expType = (((void *)0));
18530 e = (*exp->__anon1.list).first;
18531 ProcessExpressionType(e);
18534 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18536 FreeType(e->expType);
18537 e->expType = (((void *)0));
18539 type = (((void *)0));
18547 FreeType(e->expType);
18548 e->expType = (((void *)0));
18554 typeStringBuf[0] = '\0';
18555 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18556 typeString = typeStringBuf;
18558 type = (((void *)0));
18563 char templateString[1024];
18564 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18565 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18566 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18567 struct Expression * expExt;
18568 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18570 sprintf(templateString, "Container<%s>", typeString);
18571 if(exp->__anon1.list)
18573 struct Expression * e;
18575 type = ProcessTypeString(typeString, 0);
18576 while((e = (*exp->__anon1.list).first))
18578 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18579 e->destType = type;
18581 ProcessExpressionType(e);
18582 ListAdd(initializers, MkInitializerAssignment(e));
18585 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18587 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18588 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18589 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18590 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18591 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18592 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18593 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18594 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18595 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18596 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18597 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18599 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18601 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18602 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18603 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18604 exp->expType = ProcessTypeString(templateString, 0);
18606 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18607 ProcessExpressionType(expExt);
18611 exp->expType = ProcessTypeString("Container", 0);
18612 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18617 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18619 FreeType(exp->expType);
18620 exp->expType = ReplaceThisClassType(thisClass);
18622 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)
18624 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18628 if(exp->expType->kind != 15)
18630 struct Type * member;
18631 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18633 FreeType(exp->expType);
18634 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18635 exp->expType->kind = symbol->type->kind;
18636 exp->expType->refCount++;
18637 exp->expType->__anon1.__anon1.enumName = enumName;
18638 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18639 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18640 member->refCount++;
18644 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18646 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18648 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);
18650 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18656 if(exp->destType && (exp->destType->kind == 18))
18658 else if(exp->destType && !exp->destType->keepCast)
18660 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18661 exp->needTemplateCast = 1;
18662 if(exp->destType->kind == 0)
18664 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18666 unsigned int invalidCast = 0;
18668 if(inCompiler && exp->destType->count && exp->expType)
18670 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18671 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18673 if(c1 && c1->type != 1)
18674 c1 = (((void *)0));
18675 if(c2 && c2->type != 1)
18676 c2 = (((void *)0));
18677 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18680 if(!exp->destType->count || unresolved || invalidCast)
18685 if(exp->destType->kind != 14)
18692 char expString[10240];
18694 expString[0] = '\0';
18695 PrintType(exp->destType, type2, 0, 1);
18698 PrintExpression(exp, expString);
18699 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18702 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18703 else if(exp->type != 16)
18704 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18709 char expString[10240];
18711 expString[0] = '\0';
18714 PrintExpression(exp, expString);
18715 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18718 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18719 else if(exp->type != 16)
18720 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18732 PrintType(exp->expType, type1, 0, 1);
18733 PrintType(exp->destType, type2, 0, 1);
18735 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)))
18739 char expString[10240];
18741 expString[0] = '\0';
18744 PrintExpression(exp, expString);
18745 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18747 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")))
18750 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18752 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18756 FreeType(exp->expType);
18757 exp->destType->refCount++;
18758 exp->expType = exp->destType;
18764 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))
18766 struct Expression * nbExp = GetNonBracketsExp(exp);
18768 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18770 struct Expression * e = MoveExpContents(exp);
18772 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18774 exp->__anon1.cast.exp->destType = exp->destType;
18776 exp->destType->refCount++;
18777 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18781 else if(unresolved)
18783 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18784 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);
18785 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18786 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18788 else if(!exp->expType && exp->type != 16)
18790 char expString[10240];
18792 expString[0] = '\0';
18795 PrintExpression(exp, expString);
18796 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18798 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18801 ApplyAnyObjectLogic(exp);
18802 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)))
18804 exp->byReference = 1;
18806 yylloc = oldyylloc;
18809 static void ProcessFunction(struct FunctionDefinition * function)
18811 struct Identifier * id = GetDeclId(function->declarator);
18812 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18813 struct Type * type = symbol ? symbol->type : (((void *)0));
18814 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18815 struct Context * oldTopContext = topContext;
18817 yylloc = function->loc;
18818 if(type && type->__anon1.__anon2.thisClass)
18820 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18821 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18822 char className[1024];
18823 char structName[1024];
18824 struct Declarator * funcDecl;
18825 struct Symbol * thisSymbol;
18826 unsigned int typedObject = 0;
18828 if(_class && !_class->base)
18830 _class = currentClass;
18831 if(_class && !_class->symbol)
18832 _class->symbol = FindClass(_class->fullName);
18833 classSym = _class ? _class->symbol : (((void *)0));
18836 thisClass = _class;
18837 if(inCompiler && _class)
18839 if(type->kind == 11)
18841 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18843 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18845 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18848 if(type->classObjectType != 1)
18850 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18851 symbol->type->__anon1.__anon2.staticMethod = 1;
18852 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18853 symbol->type->extraParam = 0;
18856 strcpy(className, "__ecereClass_");
18857 FullClassNameCat(className, _class->fullName, 1);
18858 structName[0] = (char)0;
18859 FullClassNameCat(structName, _class->fullName, 0);
18860 funcDecl = GetFuncDecl(function->declarator);
18863 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18865 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18867 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18869 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18870 FreeTypeName(param);
18873 if(!function->propertyNoThis)
18875 struct TypeName * thisParam = (((void *)0));
18877 if(type->classObjectType != 1)
18879 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18880 if(!funcDecl->__anon1.function.parameters)
18881 funcDecl->__anon1.function.parameters = MkList();
18882 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18886 if(type->classObjectType != 1)
18888 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18889 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18891 thisParam = __extension__ ({
18892 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18894 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18896 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18897 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18901 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18903 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18905 funcDecl = GetFuncDecl(initDecl->declarator);
18908 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18910 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18912 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18914 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18915 FreeTypeName(param);
18918 if(type->classObjectType != 1)
18920 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18922 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18924 if(!funcDecl->__anon1.function.parameters)
18925 funcDecl->__anon1.function.parameters = MkList();
18926 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18934 if(type->classObjectType != 1)
18936 thisSymbol = __extension__ ({
18937 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18939 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18941 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18942 if(typedObject && thisSymbol->type)
18944 thisSymbol->type->classObjectType = 2;
18945 thisSymbol->type->byReference = type->byReference;
18946 thisSymbol->type->typedByReference = type->byReference;
18950 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
18952 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18955 struct __ecereNameSpace__ecere__com__Class * base;
18957 for(base = _class; base && base->type != 1000; base = base->next)
18959 for(member = base->membersAndProperties.first; member; member = member->next)
18960 if(!member->isProperty)
18966 for(member = _class->membersAndProperties.first; member; member = member->next)
18967 if(!member->isProperty)
18971 char pointerName[1024];
18972 struct Declaration * decl;
18973 struct Initializer * initializer;
18974 struct Expression * exp, * bytePtr;
18976 strcpy(pointerName, "__ecerePointer_");
18977 FullClassNameCat(pointerName, _class->fullName, 0);
18979 char className[1024];
18981 strcpy(className, "__ecereClass_");
18982 FullClassNameCat(className, classSym->string, 1);
18983 DeclareClass(curExternal, classSym, className);
18985 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18988 struct Expression * e;
18990 if(_class->offset && _class->offset == _class->base->structSize)
18992 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
18993 ProcessExpressionType(e);
18999 sprintf(string, "%d", _class->offset);
19000 e = MkExpConstant(string);
19002 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19006 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19008 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19009 exp->expType = __extension__ ({
19010 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19012 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19013 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19015 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19016 }), __ecereInstance2;
19020 yylloc = function->body->loc;
19021 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19023 struct Context * prevContext = curContext;
19024 struct __ecereNameSpace__ecere__sys__OldList * list;
19026 curContext = function->body->__anon1.compound.context;
19027 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19028 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19029 curContext = prevContext;
19031 decl->symbol = (((void *)0));
19032 if(!function->body->__anon1.compound.declarations)
19033 function->body->__anon1.compound.declarations = MkList();
19034 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19040 thisClass = (((void *)0));
19043 FreeSpecifier(id->_class);
19044 id->_class = (((void *)0));
19045 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19047 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19049 id = GetDeclId(initDecl->declarator);
19050 FreeSpecifier(id->_class);
19051 id->_class = (((void *)0));
19055 topContext = function->body->__anon1.compound.context;
19057 struct FunctionDefinition * oldFunction = curFunction;
19059 curFunction = function;
19061 ProcessStatement(function->body);
19062 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19064 struct Statement * prevCompound = curCompound;
19065 struct Context * prevContext = curContext;
19066 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19068 if(!function->body->__anon1.compound.statements)
19069 function->body->__anon1.compound.statements = MkList();
19070 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19071 curCompound = function->body;
19072 curContext = function->body->__anon1.compound.context;
19073 ProcessStatement(fireWatchers);
19074 curContext = prevContext;
19075 curCompound = prevCompound;
19077 curFunction = oldFunction;
19079 if(function->declarator)
19081 ProcessDeclarator(function->declarator, 1);
19083 topContext = oldTopContext;
19084 thisClass = oldThisClass;
19087 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19089 struct ClassDef * def;
19090 struct External * external = curExternal;
19091 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19093 for(def = definitions->first; def; def = def->next)
19097 if(def->__anon1.function->declarator)
19098 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19100 curExternal = external;
19101 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19103 else if(def->type == 2)
19105 if(def->__anon1.decl->type == 2)
19107 thisClass = regClass;
19108 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19109 thisClass = (((void *)0));
19113 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19116 thisClass = regClass;
19117 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19118 thisClass = backThisClass;
19121 else if(def->type == 1 && def->__anon1.defProperties)
19123 struct MemberInit * defProperty;
19124 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);
19126 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19127 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19129 thisClass = regClass;
19130 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19131 thisClass = (((void *)0));
19133 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19134 FreeSymbol(thisSymbol);
19136 else if(def->type == 3 && def->__anon1.propertyDef)
19138 struct PropertyDef * prop = def->__anon1.propertyDef;
19140 thisClass = regClass;
19145 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19147 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19149 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19150 ProcessStatement(prop->setStmt);
19156 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19158 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19160 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19161 ProcessStatement(prop->getStmt);
19163 if(prop->issetStmt)
19167 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19169 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19171 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19172 ProcessStatement(prop->issetStmt);
19174 thisClass = (((void *)0));
19176 else if(def->type == 4 && def->__anon1.propertyWatch)
19178 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19180 thisClass = regClass;
19181 if(propertyWatch->compound)
19183 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);
19185 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19186 curExternal = (((void *)0));
19187 ProcessStatement(propertyWatch->compound);
19189 thisClass = (((void *)0));
19194 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19196 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19198 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19199 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19200 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19201 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19202 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19203 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19204 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19205 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19206 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19207 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19208 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19209 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19210 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19211 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19212 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19213 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19214 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19215 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19216 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19217 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19218 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19219 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19220 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19221 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19222 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19223 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19229 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19232 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19240 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19244 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19246 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19247 __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);
19248 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19249 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19250 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19251 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19252 __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);
19253 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19254 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19255 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19256 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19257 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19258 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19259 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19260 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19261 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19262 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19263 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19264 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19265 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19266 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19267 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19268 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)
19269 __ecereClass_Conversion = class;
19270 __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);
19271 __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);
19272 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19273 __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);
19274 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19275 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19276 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19277 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19278 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19279 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19280 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19281 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19282 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19283 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19284 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19285 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19286 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19287 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19288 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19289 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19290 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19291 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19292 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19293 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19294 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19295 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);