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)
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 > 0 && isprint(result))
559 sprintf(temp, "'%c'", result);
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;
1829 int classObjectType;
1831 unsigned int offset;
1835 unsigned int isSigned : 1;
1836 unsigned int constant : 1;
1837 unsigned int truth : 1;
1838 unsigned int byReference : 1;
1839 unsigned int extraParam : 1;
1840 unsigned int directClassAccess : 1;
1841 unsigned int computing : 1;
1842 unsigned int keepCast : 1;
1843 unsigned int passAsTemplate : 1;
1844 unsigned int dllExport : 1;
1845 unsigned int attrStdcall : 1;
1846 unsigned int declaredWithStruct : 1;
1847 unsigned int typedByReference : 1;
1848 unsigned int casted : 1;
1849 unsigned int pointerAlignment : 1;
1850 unsigned int isLong : 1;
1851 unsigned int signedBeforePromotion : 1;
1856 struct Specifier * prev;
1857 struct Specifier * next;
1858 struct Location loc;
1865 struct ExtDecl * extDecl;
1867 struct Symbol * symbol;
1868 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1869 struct Specifier * nsSpec;
1870 } ecere_gcc_struct __anon1;
1873 struct Identifier * id;
1874 struct __ecereNameSpace__ecere__sys__OldList * list;
1875 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1876 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1877 unsigned int addNameSpace;
1878 struct Context * ctx;
1879 struct ExtDecl * extDeclStruct;
1880 } ecere_gcc_struct __anon2;
1881 struct Expression * expression;
1882 struct Specifier * _class;
1883 struct TemplateParameter * templateParameter;
1884 } ecere_gcc_struct __anon1;
1887 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1889 struct TemplatedType
1892 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1893 struct __ecereNameSpace__ecere__sys__BTNode * left;
1894 struct __ecereNameSpace__ecere__sys__BTNode * right;
1896 struct TemplateParameter * param;
1899 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1901 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1903 if(!param->baseType)
1905 if(param->dataTypeString)
1906 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1908 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1910 return param->baseType;
1912 return (((void *)0));
1915 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1917 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1919 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1923 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1934 if(type1->passAsTemplate && !type2->passAsTemplate)
1936 return type1->isSigned != type2->isSigned;
1938 return type1->__anon1._class != type2->__anon1._class;
1940 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1948 unsigned int GetOpInt(struct Operand * op2, int * value2)
1950 if(op2->kind == 3 && op2->type->isSigned)
1951 *value2 = op2->__anon1.i;
1952 else if(op2->kind == 3)
1953 *value2 = (int)op2->__anon1.ui;
1954 else if(op2->kind == 4 && op2->type->isSigned)
1955 *value2 = (int)op2->__anon1.i64;
1956 else if(op2->kind == 4)
1957 *value2 = (int)op2->__anon1.ui64;
1958 else if(op2->kind == 23 && op2->type->isSigned)
1959 *value2 = (int)op2->__anon1.i64;
1960 else if(op2->kind == 23)
1961 *value2 = (int)op2->__anon1.ui64;
1962 else if(op2->kind == 22 && op2->type->isSigned)
1963 *value2 = (int)op2->__anon1.i64;
1964 else if(op2->kind == 22)
1965 *value2 = (int)op2->__anon1.ui64;
1966 else if(op2->kind == 2 && op2->type->isSigned)
1967 *value2 = (int)op2->__anon1.s;
1968 else if(op2->kind == 2)
1969 *value2 = (int)op2->__anon1.us;
1970 else if(op2->kind == 1 && op2->type->isSigned)
1971 *value2 = (int)op2->__anon1.c;
1972 else if(op2->kind == 24 || op2->kind == 1)
1973 *value2 = (int)op2->__anon1.uc;
1974 else if(op2->kind == 6)
1975 *value2 = (int)op2->__anon1.f;
1976 else if(op2->kind == 7)
1977 *value2 = (int)op2->__anon1.d;
1978 else if(op2->kind == 13)
1979 *value2 = (int)op2->__anon1.ui64;
1985 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1987 if(op2->kind == 3 && op2->type->isSigned)
1988 *value2 = (unsigned int)op2->__anon1.i;
1989 else if(op2->kind == 3)
1990 *value2 = op2->__anon1.ui;
1991 else if(op2->kind == 4 && op2->type->isSigned)
1992 *value2 = (unsigned int)op2->__anon1.i64;
1993 else if(op2->kind == 4)
1994 *value2 = (unsigned int)op2->__anon1.ui64;
1995 else if(op2->kind == 23 && op2->type->isSigned)
1996 *value2 = (unsigned int)op2->__anon1.i64;
1997 else if(op2->kind == 23)
1998 *value2 = (unsigned int)op2->__anon1.ui64;
1999 else if(op2->kind == 22 && op2->type->isSigned)
2000 *value2 = (unsigned int)op2->__anon1.i64;
2001 else if(op2->kind == 22)
2002 *value2 = (unsigned int)op2->__anon1.ui64;
2003 else if(op2->kind == 2 && op2->type->isSigned)
2004 *value2 = (unsigned int)op2->__anon1.s;
2005 else if(op2->kind == 2)
2006 *value2 = (unsigned int)op2->__anon1.us;
2007 else if(op2->kind == 1 && op2->type->isSigned)
2008 *value2 = (unsigned int)op2->__anon1.c;
2009 else if(op2->kind == 24 || op2->kind == 1)
2010 *value2 = (unsigned int)op2->__anon1.uc;
2011 else if(op2->kind == 6)
2012 *value2 = (unsigned int)op2->__anon1.f;
2013 else if(op2->kind == 7)
2014 *value2 = (unsigned int)op2->__anon1.d;
2015 else if(op2->kind == 13)
2016 *value2 = (unsigned int)op2->__anon1.ui64;
2022 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2024 if(op2->kind == 3 && op2->type->isSigned)
2025 *value2 = (long long)op2->__anon1.i;
2026 else if(op2->kind == 3)
2027 *value2 = (long long)op2->__anon1.ui;
2028 else if(op2->kind == 4 && op2->type->isSigned)
2029 *value2 = op2->__anon1.i64;
2030 else if(op2->kind == 4)
2031 *value2 = (long long)op2->__anon1.ui64;
2032 else if(op2->kind == 23 && op2->type->isSigned)
2033 *value2 = op2->__anon1.i64;
2034 else if(op2->kind == 23)
2035 *value2 = (long long)op2->__anon1.ui64;
2036 else if(op2->kind == 22 && op2->type->isSigned)
2037 *value2 = op2->__anon1.i64;
2038 else if(op2->kind == 22)
2039 *value2 = (long long)op2->__anon1.ui64;
2040 else if(op2->kind == 2 && op2->type->isSigned)
2041 *value2 = (long long)op2->__anon1.s;
2042 else if(op2->kind == 2)
2043 *value2 = (long long)op2->__anon1.us;
2044 else if(op2->kind == 1 && op2->type->isSigned)
2045 *value2 = (long long)op2->__anon1.c;
2046 else if(op2->kind == 24 || op2->kind == 1)
2047 *value2 = (long long)op2->__anon1.uc;
2048 else if(op2->kind == 6)
2049 *value2 = (long long)op2->__anon1.f;
2050 else if(op2->kind == 7)
2051 *value2 = (long long)op2->__anon1.d;
2052 else if(op2->kind == 13)
2053 *value2 = (long long)op2->__anon1.ui64;
2059 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2061 if(op2->kind == 3 && op2->type->isSigned)
2062 *value2 = (uint64)op2->__anon1.i;
2063 else if(op2->kind == 3)
2064 *value2 = (uint64)op2->__anon1.ui;
2065 else if(op2->kind == 4 && op2->type->isSigned)
2066 *value2 = (uint64)op2->__anon1.i64;
2067 else if(op2->kind == 4)
2068 *value2 = op2->__anon1.ui64;
2069 else if(op2->kind == 23 && op2->type->isSigned)
2070 *value2 = (uint64)op2->__anon1.i64;
2071 else if(op2->kind == 23)
2072 *value2 = op2->__anon1.ui64;
2073 else if(op2->kind == 22 && op2->type->isSigned)
2074 *value2 = (uint64)op2->__anon1.i64;
2075 else if(op2->kind == 22)
2076 *value2 = op2->__anon1.ui64;
2077 else if(op2->kind == 2 && op2->type->isSigned)
2078 *value2 = (uint64)op2->__anon1.s;
2079 else if(op2->kind == 2)
2080 *value2 = (uint64)op2->__anon1.us;
2081 else if(op2->kind == 1 && op2->type->isSigned)
2082 *value2 = (uint64)op2->__anon1.c;
2083 else if(op2->kind == 24 || op2->kind == 1)
2084 *value2 = (uint64)op2->__anon1.uc;
2085 else if(op2->kind == 6)
2086 *value2 = (uint64)op2->__anon1.f;
2087 else if(op2->kind == 7)
2088 *value2 = (uint64)op2->__anon1.d;
2089 else if(op2->kind == 13)
2090 *value2 = op2->__anon1.ui64;
2096 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2098 if(op2->kind == 3 && op2->type->isSigned)
2099 *value2 = (intptr_t)op2->__anon1.i;
2100 else if(op2->kind == 3)
2101 *value2 = (intptr_t)op2->__anon1.ui;
2102 else if(op2->kind == 4 && op2->type->isSigned)
2103 *value2 = (intptr_t)op2->__anon1.i64;
2104 else if(op2->kind == 4)
2105 *value2 = (intptr_t)op2->__anon1.ui64;
2106 else if(op2->kind == 23 && op2->type->isSigned)
2107 *value2 = (intptr_t)op2->__anon1.i64;
2108 else if(op2->kind == 23)
2109 *value2 = (intptr_t)op2->__anon1.ui64;
2110 else if(op2->kind == 22 && op2->type->isSigned)
2111 *value2 = (intptr_t)op2->__anon1.i64;
2112 else if(op2->kind == 22)
2113 *value2 = (intptr_t)op2->__anon1.ui64;
2114 else if(op2->kind == 2 && op2->type->isSigned)
2115 *value2 = (intptr_t)op2->__anon1.s;
2116 else if(op2->kind == 2)
2117 *value2 = (intptr_t)op2->__anon1.us;
2118 else if(op2->kind == 1 && op2->type->isSigned)
2119 *value2 = (intptr_t)op2->__anon1.c;
2120 else if(op2->kind == 24 || op2->kind == 1)
2121 *value2 = (intptr_t)op2->__anon1.uc;
2122 else if(op2->kind == 6)
2123 *value2 = (intptr_t)op2->__anon1.f;
2124 else if(op2->kind == 7)
2125 *value2 = (intptr_t)op2->__anon1.d;
2126 else if(op2->kind == 13)
2127 *value2 = (intptr_t)op2->__anon1.ui64;
2133 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2135 if(op2->kind == 3 && op2->type->isSigned)
2136 *value2 = (uintptr_t)op2->__anon1.i;
2137 else if(op2->kind == 3)
2138 *value2 = (uintptr_t)op2->__anon1.ui;
2139 else if(op2->kind == 4 && op2->type->isSigned)
2140 *value2 = (uintptr_t)op2->__anon1.i64;
2141 else if(op2->kind == 4)
2142 *value2 = (uintptr_t)op2->__anon1.ui64;
2143 else if(op2->kind == 23 && op2->type->isSigned)
2144 *value2 = (uintptr_t)op2->__anon1.i64;
2145 else if(op2->kind == 23)
2146 *value2 = (uintptr_t)op2->__anon1.ui64;
2147 else if(op2->kind == 22 && op2->type->isSigned)
2148 *value2 = (uintptr_t)op2->__anon1.i64;
2149 else if(op2->kind == 22)
2150 *value2 = (uintptr_t)op2->__anon1.ui64;
2151 else if(op2->kind == 2 && op2->type->isSigned)
2152 *value2 = (uintptr_t)op2->__anon1.s;
2153 else if(op2->kind == 2)
2154 *value2 = (uintptr_t)op2->__anon1.us;
2155 else if(op2->kind == 1 && op2->type->isSigned)
2156 *value2 = (uintptr_t)op2->__anon1.c;
2157 else if(op2->kind == 24 || op2->kind == 1)
2158 *value2 = (uintptr_t)op2->__anon1.uc;
2159 else if(op2->kind == 6)
2160 *value2 = (uintptr_t)op2->__anon1.f;
2161 else if(op2->kind == 7)
2162 *value2 = (uintptr_t)op2->__anon1.d;
2163 else if(op2->kind == 13)
2164 *value2 = (uintptr_t)op2->__anon1.ui64;
2170 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2172 if(op2->kind == 3 && op2->type->isSigned)
2173 *value2 = (ssize_t)op2->__anon1.i;
2174 else if(op2->kind == 3)
2175 *value2 = (ssize_t)op2->__anon1.ui;
2176 else if(op2->kind == 4 && op2->type->isSigned)
2177 *value2 = (ssize_t)op2->__anon1.i64;
2178 else if(op2->kind == 4)
2179 *value2 = (ssize_t)op2->__anon1.ui64;
2180 else if(op2->kind == 23 && op2->type->isSigned)
2181 *value2 = (ssize_t)op2->__anon1.i64;
2182 else if(op2->kind == 23)
2183 *value2 = (ssize_t)op2->__anon1.ui64;
2184 else if(op2->kind == 22 && op2->type->isSigned)
2185 *value2 = (ssize_t)op2->__anon1.i64;
2186 else if(op2->kind == 22)
2187 *value2 = (ssize_t)op2->__anon1.ui64;
2188 else if(op2->kind == 2 && op2->type->isSigned)
2189 *value2 = (ssize_t)op2->__anon1.s;
2190 else if(op2->kind == 2)
2191 *value2 = (ssize_t)op2->__anon1.us;
2192 else if(op2->kind == 1 && op2->type->isSigned)
2193 *value2 = (ssize_t)op2->__anon1.c;
2194 else if(op2->kind == 24 || op2->kind == 1)
2195 *value2 = (ssize_t)op2->__anon1.uc;
2196 else if(op2->kind == 6)
2197 *value2 = (ssize_t)op2->__anon1.f;
2198 else if(op2->kind == 7)
2199 *value2 = (ssize_t)op2->__anon1.d;
2200 else if(op2->kind == 13)
2201 *value2 = (ssize_t)op2->__anon1.ui64;
2207 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2209 if(op2->kind == 3 && op2->type->isSigned)
2210 *value2 = (size_t)op2->__anon1.i;
2211 else if(op2->kind == 3)
2212 *value2 = (size_t)op2->__anon1.ui;
2213 else if(op2->kind == 4 && op2->type->isSigned)
2214 *value2 = (size_t)op2->__anon1.i64;
2215 else if(op2->kind == 4)
2216 *value2 = (size_t)op2->__anon1.ui64;
2217 else if(op2->kind == 23 && op2->type->isSigned)
2218 *value2 = (size_t)op2->__anon1.i64;
2219 else if(op2->kind == 23)
2220 *value2 = (size_t)op2->__anon1.ui64;
2221 else if(op2->kind == 22 && op2->type->isSigned)
2222 *value2 = (size_t)op2->__anon1.i64;
2223 else if(op2->kind == 22)
2224 *value2 = (size_t)op2->__anon1.ui64;
2225 else if(op2->kind == 2 && op2->type->isSigned)
2226 *value2 = (size_t)op2->__anon1.s;
2227 else if(op2->kind == 2)
2228 *value2 = (size_t)op2->__anon1.us;
2229 else if(op2->kind == 1 && op2->type->isSigned)
2230 *value2 = (size_t)op2->__anon1.c;
2231 else if(op2->kind == 24 || op2->kind == 1)
2232 *value2 = (size_t)op2->__anon1.uc;
2233 else if(op2->kind == 6)
2234 *value2 = (size_t)op2->__anon1.f;
2235 else if(op2->kind == 7)
2236 *value2 = (size_t)op2->__anon1.d;
2237 else if(op2->kind == 13)
2238 *value2 = (size_t)op2->__anon1.ui64;
2244 unsigned int GetOpShort(struct Operand * op2, short * value2)
2246 if(op2->kind == 3 && op2->type->isSigned)
2247 *value2 = (short)op2->__anon1.i;
2248 else if(op2->kind == 3)
2249 *value2 = (short)op2->__anon1.ui;
2250 else if(op2->kind == 4 && op2->type->isSigned)
2251 *value2 = (short)op2->__anon1.i64;
2252 else if(op2->kind == 4)
2253 *value2 = (short)op2->__anon1.ui64;
2254 else if(op2->kind == 23 && op2->type->isSigned)
2255 *value2 = (short)op2->__anon1.i64;
2256 else if(op2->kind == 23)
2257 *value2 = (short)op2->__anon1.ui64;
2258 else if(op2->kind == 22 && op2->type->isSigned)
2259 *value2 = (short)op2->__anon1.i64;
2260 else if(op2->kind == 22)
2261 *value2 = (short)op2->__anon1.ui64;
2262 else if(op2->kind == 2 && op2->type->isSigned)
2263 *value2 = op2->__anon1.s;
2264 else if(op2->kind == 2)
2265 *value2 = (short)op2->__anon1.us;
2266 else if(op2->kind == 1 && op2->type->isSigned)
2267 *value2 = (short)op2->__anon1.c;
2268 else if(op2->kind == 24 || op2->kind == 1)
2269 *value2 = (short)op2->__anon1.uc;
2270 else if(op2->kind == 6)
2271 *value2 = (short)op2->__anon1.f;
2272 else if(op2->kind == 7)
2273 *value2 = (short)op2->__anon1.d;
2274 else if(op2->kind == 13)
2275 *value2 = (short)op2->__anon1.ui64;
2281 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2283 if(op2->kind == 3 && op2->type->isSigned)
2284 *value2 = (unsigned short)op2->__anon1.i;
2285 else if(op2->kind == 3)
2286 *value2 = (unsigned short)op2->__anon1.ui;
2287 else if(op2->kind == 4 && op2->type->isSigned)
2288 *value2 = (unsigned short)op2->__anon1.i64;
2289 else if(op2->kind == 4)
2290 *value2 = (unsigned short)op2->__anon1.ui64;
2291 else if(op2->kind == 23 && op2->type->isSigned)
2292 *value2 = (unsigned short)op2->__anon1.i64;
2293 else if(op2->kind == 23)
2294 *value2 = (unsigned short)op2->__anon1.ui64;
2295 else if(op2->kind == 22 && op2->type->isSigned)
2296 *value2 = (unsigned short)op2->__anon1.i64;
2297 else if(op2->kind == 22)
2298 *value2 = (unsigned short)op2->__anon1.ui64;
2299 else if(op2->kind == 2 && op2->type->isSigned)
2300 *value2 = (unsigned short)op2->__anon1.s;
2301 else if(op2->kind == 2)
2302 *value2 = op2->__anon1.us;
2303 else if(op2->kind == 1 && op2->type->isSigned)
2304 *value2 = (unsigned short)op2->__anon1.c;
2305 else if(op2->kind == 24 || op2->kind == 1)
2306 *value2 = (unsigned short)op2->__anon1.uc;
2307 else if(op2->kind == 6)
2308 *value2 = (unsigned short)op2->__anon1.f;
2309 else if(op2->kind == 7)
2310 *value2 = (unsigned short)op2->__anon1.d;
2311 else if(op2->kind == 13)
2312 *value2 = (unsigned short)op2->__anon1.ui64;
2318 unsigned int GetOpChar(struct Operand * op2, char * value2)
2320 if(op2->kind == 3 && op2->type->isSigned)
2321 *value2 = (char)op2->__anon1.i;
2322 else if(op2->kind == 3)
2323 *value2 = (char)op2->__anon1.ui;
2324 else if(op2->kind == 4 && op2->type->isSigned)
2325 *value2 = (char)op2->__anon1.i64;
2326 else if(op2->kind == 4)
2327 *value2 = (char)op2->__anon1.ui64;
2328 else if(op2->kind == 23 && op2->type->isSigned)
2329 *value2 = (char)op2->__anon1.i64;
2330 else if(op2->kind == 23)
2331 *value2 = (char)op2->__anon1.ui64;
2332 else if(op2->kind == 22 && op2->type->isSigned)
2333 *value2 = (char)op2->__anon1.i64;
2334 else if(op2->kind == 22)
2335 *value2 = (char)op2->__anon1.ui64;
2336 else if(op2->kind == 2 && op2->type->isSigned)
2337 *value2 = (char)op2->__anon1.s;
2338 else if(op2->kind == 2)
2339 *value2 = (char)op2->__anon1.us;
2340 else if(op2->kind == 1 && op2->type->isSigned)
2341 *value2 = op2->__anon1.c;
2342 else if(op2->kind == 24 || op2->kind == 1)
2343 *value2 = (char)op2->__anon1.uc;
2344 else if(op2->kind == 6)
2345 *value2 = (char)op2->__anon1.f;
2346 else if(op2->kind == 7)
2347 *value2 = (char)op2->__anon1.d;
2348 else if(op2->kind == 13)
2349 *value2 = (char)op2->__anon1.ui64;
2355 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2357 if(op2->kind == 3 && op2->type->isSigned)
2358 *value2 = (unsigned char)op2->__anon1.i;
2359 else if(op2->kind == 3)
2360 *value2 = (unsigned char)op2->__anon1.ui;
2361 else if(op2->kind == 4 && op2->type->isSigned)
2362 *value2 = (unsigned char)op2->__anon1.i64;
2363 else if(op2->kind == 4)
2364 *value2 = (unsigned char)op2->__anon1.ui64;
2365 else if(op2->kind == 23 && op2->type->isSigned)
2366 *value2 = (unsigned char)op2->__anon1.i64;
2367 else if(op2->kind == 23)
2368 *value2 = (unsigned char)op2->__anon1.ui64;
2369 else if(op2->kind == 22 && op2->type->isSigned)
2370 *value2 = (unsigned char)op2->__anon1.i64;
2371 else if(op2->kind == 22)
2372 *value2 = (unsigned char)op2->__anon1.ui64;
2373 else if(op2->kind == 2 && op2->type->isSigned)
2374 *value2 = (unsigned char)op2->__anon1.s;
2375 else if(op2->kind == 2)
2376 *value2 = (unsigned char)op2->__anon1.us;
2377 else if(op2->kind == 1 && op2->type->isSigned)
2378 *value2 = (unsigned char)op2->__anon1.c;
2379 else if(op2->kind == 24 || op2->kind == 1)
2380 *value2 = op2->__anon1.uc;
2381 else if(op2->kind == 6)
2382 *value2 = (unsigned char)op2->__anon1.f;
2383 else if(op2->kind == 7)
2384 *value2 = (unsigned char)op2->__anon1.d;
2385 else if(op2->kind == 13)
2386 *value2 = (unsigned char)op2->__anon1.ui64;
2392 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2394 if(op2->kind == 3 && op2->type->isSigned)
2395 *value2 = (float)(float)op2->__anon1.i;
2396 else if(op2->kind == 3)
2397 *value2 = (float)(float)op2->__anon1.ui;
2398 else if(op2->kind == 4 && op2->type->isSigned)
2399 *value2 = (float)(float)op2->__anon1.i64;
2400 else if(op2->kind == 4)
2401 *value2 = (float)(float)op2->__anon1.ui64;
2402 else if(op2->kind == 23 && op2->type->isSigned)
2403 *value2 = (float)(float)op2->__anon1.i64;
2404 else if(op2->kind == 23)
2405 *value2 = (float)(float)op2->__anon1.ui64;
2406 else if(op2->kind == 22 && op2->type->isSigned)
2407 *value2 = (float)(float)op2->__anon1.i64;
2408 else if(op2->kind == 22)
2409 *value2 = (float)(float)op2->__anon1.ui64;
2410 else if(op2->kind == 2 && op2->type->isSigned)
2411 *value2 = (float)(float)op2->__anon1.s;
2412 else if(op2->kind == 2)
2413 *value2 = (float)(float)op2->__anon1.us;
2414 else if(op2->kind == 1 && op2->type->isSigned)
2415 *value2 = (float)(float)op2->__anon1.c;
2416 else if(op2->kind == 24 || op2->kind == 1)
2417 *value2 = (float)(float)op2->__anon1.uc;
2418 else if(op2->kind == 6)
2419 *value2 = (float)op2->__anon1.f;
2420 else if(op2->kind == 7)
2421 *value2 = (float)op2->__anon1.d;
2422 else if(op2->kind == 13)
2423 *value2 = (float)(float)op2->__anon1.ui64;
2429 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2431 if(op2->kind == 3 && op2->type->isSigned)
2432 *value2 = (double)(double)op2->__anon1.i;
2433 else if(op2->kind == 3)
2434 *value2 = (double)(double)op2->__anon1.ui;
2435 else if(op2->kind == 4 && op2->type->isSigned)
2436 *value2 = (double)(double)op2->__anon1.i64;
2437 else if(op2->kind == 4)
2438 *value2 = (double)(double)op2->__anon1.ui64;
2439 else if(op2->kind == 23 && op2->type->isSigned)
2440 *value2 = (double)(double)op2->__anon1.i64;
2441 else if(op2->kind == 23)
2442 *value2 = (double)(double)op2->__anon1.ui64;
2443 else if(op2->kind == 22 && op2->type->isSigned)
2444 *value2 = (double)(double)op2->__anon1.i64;
2445 else if(op2->kind == 22)
2446 *value2 = (double)(double)op2->__anon1.ui64;
2447 else if(op2->kind == 2 && op2->type->isSigned)
2448 *value2 = (double)(double)op2->__anon1.s;
2449 else if(op2->kind == 2)
2450 *value2 = (double)(double)op2->__anon1.us;
2451 else if(op2->kind == 1 && op2->type->isSigned)
2452 *value2 = (double)(double)op2->__anon1.c;
2453 else if(op2->kind == 24 || op2->kind == 1)
2454 *value2 = (double)(double)op2->__anon1.uc;
2455 else if(op2->kind == 6)
2456 *value2 = (double)op2->__anon1.f;
2457 else if(op2->kind == 7)
2458 *value2 = (double)op2->__anon1.d;
2459 else if(op2->kind == 13)
2460 *value2 = (double)(double)op2->__anon1.ui64;
2466 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2468 int value2 = op2->__anon1.i;
2471 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2474 exp->expType = op1->type;
2476 op1->type->refCount++;
2481 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2483 unsigned int value2 = op2->__anon1.ui;
2486 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2489 exp->expType = op1->type;
2491 op1->type->refCount++;
2496 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2498 long long value2 = op2->__anon1.i64;
2501 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2504 exp->expType = op1->type;
2506 op1->type->refCount++;
2511 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2513 uint64 value2 = op2->__anon1.ui64;
2516 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2519 exp->expType = op1->type;
2521 op1->type->refCount++;
2526 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2528 short value2 = op2->__anon1.s;
2531 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
2534 exp->expType = op1->type;
2536 op1->type->refCount++;
2541 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2543 unsigned short value2 = op2->__anon1.us;
2546 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
2549 exp->expType = op1->type;
2551 op1->type->refCount++;
2556 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2558 char value2 = op2->__anon1.c;
2561 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
2564 exp->expType = op1->type;
2566 op1->type->refCount++;
2571 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2573 unsigned char value2 = op2->__anon1.uc;
2576 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
2579 exp->expType = op1->type;
2581 op1->type->refCount++;
2586 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2588 float value2 = op2->__anon1.f;
2591 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2594 exp->expType = op1->type;
2596 op1->type->refCount++;
2601 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2603 double value2 = op2->__anon1.d;
2606 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2609 exp->expType = op1->type;
2611 op1->type->refCount++;
2616 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2618 int value2 = op2->__anon1.i;
2621 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2624 exp->expType = op1->type;
2626 op1->type->refCount++;
2631 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2633 unsigned int value2 = op2->__anon1.ui;
2636 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2639 exp->expType = op1->type;
2641 op1->type->refCount++;
2646 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2648 long long value2 = op2->__anon1.i64;
2651 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2654 exp->expType = op1->type;
2656 op1->type->refCount++;
2661 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2663 uint64 value2 = op2->__anon1.ui64;
2666 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2669 exp->expType = op1->type;
2671 op1->type->refCount++;
2676 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2678 short value2 = op2->__anon1.s;
2681 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
2684 exp->expType = op1->type;
2686 op1->type->refCount++;
2691 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2693 unsigned short value2 = op2->__anon1.us;
2696 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
2699 exp->expType = op1->type;
2701 op1->type->refCount++;
2706 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2708 char value2 = op2->__anon1.c;
2711 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
2714 exp->expType = op1->type;
2716 op1->type->refCount++;
2721 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2723 unsigned char value2 = op2->__anon1.uc;
2726 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
2729 exp->expType = op1->type;
2731 op1->type->refCount++;
2736 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2738 float value2 = op2->__anon1.f;
2741 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2744 exp->expType = op1->type;
2746 op1->type->refCount++;
2751 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2753 double value2 = op2->__anon1.d;
2756 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2759 exp->expType = op1->type;
2761 op1->type->refCount++;
2766 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2768 int value2 = op2->__anon1.i;
2771 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2774 exp->expType = op1->type;
2776 op1->type->refCount++;
2781 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2783 unsigned int value2 = op2->__anon1.ui;
2786 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2789 exp->expType = op1->type;
2791 op1->type->refCount++;
2796 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2798 long long value2 = op2->__anon1.i64;
2801 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2804 exp->expType = op1->type;
2806 op1->type->refCount++;
2811 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2813 uint64 value2 = op2->__anon1.ui64;
2816 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2819 exp->expType = op1->type;
2821 op1->type->refCount++;
2826 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2828 short value2 = op2->__anon1.s;
2831 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
2834 exp->expType = op1->type;
2836 op1->type->refCount++;
2841 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2843 unsigned short value2 = op2->__anon1.us;
2846 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
2849 exp->expType = op1->type;
2851 op1->type->refCount++;
2856 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2858 char value2 = op2->__anon1.c;
2861 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
2864 exp->expType = op1->type;
2866 op1->type->refCount++;
2871 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2873 unsigned char value2 = op2->__anon1.uc;
2876 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
2879 exp->expType = op1->type;
2881 op1->type->refCount++;
2886 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2888 float value2 = op2->__anon1.f;
2891 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2894 exp->expType = op1->type;
2896 op1->type->refCount++;
2901 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2903 double value2 = op2->__anon1.d;
2906 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2909 exp->expType = op1->type;
2911 op1->type->refCount++;
2916 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2918 int value2 = op2->__anon1.i;
2921 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
2924 exp->expType = op1->type;
2926 op1->type->refCount++;
2931 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2933 unsigned int value2 = op2->__anon1.ui;
2936 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
2939 exp->expType = op1->type;
2941 op1->type->refCount++;
2946 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2948 long long value2 = op2->__anon1.i64;
2951 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
2954 exp->expType = op1->type;
2956 op1->type->refCount++;
2961 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2963 uint64 value2 = op2->__anon1.ui64;
2966 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
2969 exp->expType = op1->type;
2971 op1->type->refCount++;
2976 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2978 short value2 = op2->__anon1.s;
2981 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : (short)0);
2984 exp->expType = op1->type;
2986 op1->type->refCount++;
2991 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2993 unsigned short value2 = op2->__anon1.us;
2996 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : (unsigned short)0);
2999 exp->expType = op1->type;
3001 op1->type->refCount++;
3006 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3008 char value2 = op2->__anon1.c;
3011 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : (char)0);
3014 exp->expType = op1->type;
3016 op1->type->refCount++;
3021 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3023 unsigned char value2 = op2->__anon1.uc;
3026 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : (unsigned char)0);
3029 exp->expType = op1->type;
3031 op1->type->refCount++;
3036 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3038 float value2 = op2->__anon1.f;
3041 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
3044 exp->expType = op1->type;
3046 op1->type->refCount++;
3051 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3053 double value2 = op2->__anon1.d;
3056 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
3059 exp->expType = op1->type;
3061 op1->type->refCount++;
3066 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3068 int value2 = op2->__anon1.i;
3071 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
3074 exp->expType = op1->type;
3076 op1->type->refCount++;
3081 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3083 unsigned int value2 = op2->__anon1.ui;
3086 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
3089 exp->expType = op1->type;
3091 op1->type->refCount++;
3096 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3098 long long value2 = op2->__anon1.i64;
3101 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
3104 exp->expType = op1->type;
3106 op1->type->refCount++;
3111 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3113 uint64 value2 = op2->__anon1.ui64;
3116 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
3119 exp->expType = op1->type;
3121 op1->type->refCount++;
3126 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3128 short value2 = op2->__anon1.s;
3131 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : (short)0);
3134 exp->expType = op1->type;
3136 op1->type->refCount++;
3141 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3143 unsigned short value2 = op2->__anon1.us;
3146 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : (unsigned short)0);
3149 exp->expType = op1->type;
3151 op1->type->refCount++;
3156 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3158 char value2 = op2->__anon1.c;
3161 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : (char)0);
3164 exp->expType = op1->type;
3166 op1->type->refCount++;
3171 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3173 unsigned char value2 = op2->__anon1.uc;
3176 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : (unsigned char)0);
3179 exp->expType = op1->type;
3181 op1->type->refCount++;
3186 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3189 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3192 exp->expType = op1->type;
3194 op1->type->refCount++;
3199 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3202 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3205 exp->expType = op1->type;
3207 op1->type->refCount++;
3212 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3215 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3218 exp->expType = op1->type;
3220 op1->type->refCount++;
3225 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3228 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3231 exp->expType = op1->type;
3233 op1->type->refCount++;
3238 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3241 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3244 exp->expType = op1->type;
3246 op1->type->refCount++;
3251 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3254 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3257 exp->expType = op1->type;
3259 op1->type->refCount++;
3264 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3267 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3270 exp->expType = op1->type;
3272 op1->type->refCount++;
3277 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3280 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3283 exp->expType = op1->type;
3285 op1->type->refCount++;
3290 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3293 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3296 exp->expType = op1->type;
3298 op1->type->refCount++;
3303 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3306 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3309 exp->expType = op1->type;
3311 op1->type->refCount++;
3316 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3319 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3322 exp->expType = op1->type;
3324 op1->type->refCount++;
3329 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3332 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3335 exp->expType = op1->type;
3337 op1->type->refCount++;
3342 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3345 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3348 exp->expType = op1->type;
3350 op1->type->refCount++;
3355 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3358 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3361 exp->expType = op1->type;
3363 op1->type->refCount++;
3368 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3371 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3374 exp->expType = op1->type;
3376 op1->type->refCount++;
3381 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3384 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3387 exp->expType = op1->type;
3389 op1->type->refCount++;
3394 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3397 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3400 exp->expType = op1->type;
3402 op1->type->refCount++;
3407 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3410 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3413 exp->expType = op1->type;
3415 op1->type->refCount++;
3420 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3423 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3426 exp->expType = op1->type;
3428 op1->type->refCount++;
3433 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3436 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3439 exp->expType = op1->type;
3441 op1->type->refCount++;
3446 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3449 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3452 exp->expType = op1->type;
3454 op1->type->refCount++;
3459 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3462 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3465 exp->expType = op1->type;
3467 op1->type->refCount++;
3472 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3475 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3478 exp->expType = op1->type;
3480 op1->type->refCount++;
3485 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3488 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3491 exp->expType = op1->type;
3493 op1->type->refCount++;
3498 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3501 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3504 exp->expType = op1->type;
3506 op1->type->refCount++;
3511 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3514 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3517 exp->expType = op1->type;
3519 op1->type->refCount++;
3524 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3527 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3530 exp->expType = op1->type;
3532 op1->type->refCount++;
3537 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3540 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3543 exp->expType = op1->type;
3545 op1->type->refCount++;
3550 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3553 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3556 exp->expType = op1->type;
3558 op1->type->refCount++;
3563 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3566 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3569 exp->expType = op1->type;
3571 op1->type->refCount++;
3576 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3578 int value2 = op2->__anon1.i;
3581 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3584 exp->expType = op1->type;
3586 op1->type->refCount++;
3591 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3593 unsigned int value2 = op2->__anon1.ui;
3596 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3599 exp->expType = op1->type;
3601 op1->type->refCount++;
3606 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3608 long long value2 = op2->__anon1.i64;
3611 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3614 exp->expType = op1->type;
3616 op1->type->refCount++;
3621 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3623 uint64 value2 = op2->__anon1.ui64;
3626 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3629 exp->expType = op1->type;
3631 op1->type->refCount++;
3636 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3638 short value2 = op2->__anon1.s;
3641 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s = value2));
3644 exp->expType = op1->type;
3646 op1->type->refCount++;
3651 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3653 unsigned short value2 = op2->__anon1.us;
3656 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us = value2));
3659 exp->expType = op1->type;
3661 op1->type->refCount++;
3666 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3668 char value2 = op2->__anon1.c;
3671 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c = value2));
3674 exp->expType = op1->type;
3676 op1->type->refCount++;
3681 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3683 unsigned char value2 = op2->__anon1.uc;
3686 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc = value2));
3689 exp->expType = op1->type;
3691 op1->type->refCount++;
3696 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3698 float value2 = op2->__anon1.f;
3701 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3704 exp->expType = op1->type;
3706 op1->type->refCount++;
3711 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3713 double value2 = op2->__anon1.d;
3716 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3719 exp->expType = op1->type;
3721 op1->type->refCount++;
3726 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3728 int value2 = op2->__anon1.i;
3731 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3734 exp->expType = op1->type;
3736 op1->type->refCount++;
3741 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3743 unsigned int value2 = op2->__anon1.ui;
3746 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3749 exp->expType = op1->type;
3751 op1->type->refCount++;
3756 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3758 long long value2 = op2->__anon1.i64;
3761 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3764 exp->expType = op1->type;
3766 op1->type->refCount++;
3771 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3773 uint64 value2 = op2->__anon1.ui64;
3776 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3779 exp->expType = op1->type;
3781 op1->type->refCount++;
3786 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3788 short value2 = op2->__anon1.s;
3791 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s += value2));
3794 exp->expType = op1->type;
3796 op1->type->refCount++;
3801 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3803 unsigned short value2 = op2->__anon1.us;
3806 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us += value2));
3809 exp->expType = op1->type;
3811 op1->type->refCount++;
3816 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3818 char value2 = op2->__anon1.c;
3821 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c += value2));
3824 exp->expType = op1->type;
3826 op1->type->refCount++;
3831 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3833 unsigned char value2 = op2->__anon1.uc;
3836 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc += value2));
3839 exp->expType = op1->type;
3841 op1->type->refCount++;
3846 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3848 float value2 = op2->__anon1.f;
3851 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3854 exp->expType = op1->type;
3856 op1->type->refCount++;
3861 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3863 double value2 = op2->__anon1.d;
3866 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3869 exp->expType = op1->type;
3871 op1->type->refCount++;
3876 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3878 int value2 = op2->__anon1.i;
3881 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3884 exp->expType = op1->type;
3886 op1->type->refCount++;
3891 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3893 unsigned int value2 = op2->__anon1.ui;
3896 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3899 exp->expType = op1->type;
3901 op1->type->refCount++;
3906 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3908 long long value2 = op2->__anon1.i64;
3911 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3914 exp->expType = op1->type;
3916 op1->type->refCount++;
3921 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3923 uint64 value2 = op2->__anon1.ui64;
3926 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3929 exp->expType = op1->type;
3931 op1->type->refCount++;
3936 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3938 short value2 = op2->__anon1.s;
3941 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s -= value2));
3944 exp->expType = op1->type;
3946 op1->type->refCount++;
3951 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3953 unsigned short value2 = op2->__anon1.us;
3956 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us -= value2));
3959 exp->expType = op1->type;
3961 op1->type->refCount++;
3966 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3968 char value2 = op2->__anon1.c;
3971 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c -= value2));
3974 exp->expType = op1->type;
3976 op1->type->refCount++;
3981 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3983 unsigned char value2 = op2->__anon1.uc;
3986 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc -= value2));
3989 exp->expType = op1->type;
3991 op1->type->refCount++;
3996 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3998 float value2 = op2->__anon1.f;
4001 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4004 exp->expType = op1->type;
4006 op1->type->refCount++;
4011 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4013 double value2 = op2->__anon1.d;
4016 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4019 exp->expType = op1->type;
4021 op1->type->refCount++;
4026 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4028 int value2 = op2->__anon1.i;
4031 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4034 exp->expType = op1->type;
4036 op1->type->refCount++;
4041 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4043 unsigned int value2 = op2->__anon1.ui;
4046 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4049 exp->expType = op1->type;
4051 op1->type->refCount++;
4056 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4058 long long value2 = op2->__anon1.i64;
4061 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4064 exp->expType = op1->type;
4066 op1->type->refCount++;
4071 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4073 uint64 value2 = op2->__anon1.ui64;
4076 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4079 exp->expType = op1->type;
4081 op1->type->refCount++;
4086 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4088 short value2 = op2->__anon1.s;
4091 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s *= value2));
4094 exp->expType = op1->type;
4096 op1->type->refCount++;
4101 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4103 unsigned short value2 = op2->__anon1.us;
4106 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us *= value2));
4109 exp->expType = op1->type;
4111 op1->type->refCount++;
4116 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4118 char value2 = op2->__anon1.c;
4121 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c *= value2));
4124 exp->expType = op1->type;
4126 op1->type->refCount++;
4131 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4133 unsigned char value2 = op2->__anon1.uc;
4136 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc *= value2));
4139 exp->expType = op1->type;
4141 op1->type->refCount++;
4146 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4148 float value2 = op2->__anon1.f;
4151 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4154 exp->expType = op1->type;
4156 op1->type->refCount++;
4161 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4163 double value2 = op2->__anon1.d;
4166 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4169 exp->expType = op1->type;
4171 op1->type->refCount++;
4176 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4178 int value2 = op2->__anon1.i;
4181 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
4184 exp->expType = op1->type;
4186 op1->type->refCount++;
4191 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4193 unsigned int value2 = op2->__anon1.ui;
4196 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
4199 exp->expType = op1->type;
4201 op1->type->refCount++;
4206 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4208 long long value2 = op2->__anon1.i64;
4211 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
4214 exp->expType = op1->type;
4216 op1->type->refCount++;
4221 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4223 uint64 value2 = op2->__anon1.ui64;
4226 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
4229 exp->expType = op1->type;
4231 op1->type->refCount++;
4236 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4238 short value2 = op2->__anon1.s;
4241 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s /= value2)) : (short)0);
4244 exp->expType = op1->type;
4246 op1->type->refCount++;
4251 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4253 unsigned short value2 = op2->__anon1.us;
4256 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us /= value2)) : (unsigned short)0);
4259 exp->expType = op1->type;
4261 op1->type->refCount++;
4266 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4268 char value2 = op2->__anon1.c;
4271 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c /= value2)) : (char)0);
4274 exp->expType = op1->type;
4276 op1->type->refCount++;
4281 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4283 unsigned char value2 = op2->__anon1.uc;
4286 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc /= value2)) : (unsigned char)0);
4289 exp->expType = op1->type;
4291 op1->type->refCount++;
4296 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4298 float value2 = op2->__anon1.f;
4301 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
4304 exp->expType = op1->type;
4306 op1->type->refCount++;
4311 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4313 double value2 = op2->__anon1.d;
4316 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
4319 exp->expType = op1->type;
4321 op1->type->refCount++;
4326 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4328 int value2 = op2->__anon1.i;
4331 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
4334 exp->expType = op1->type;
4336 op1->type->refCount++;
4341 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4343 unsigned int value2 = op2->__anon1.ui;
4346 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
4349 exp->expType = op1->type;
4351 op1->type->refCount++;
4356 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4358 long long value2 = op2->__anon1.i64;
4361 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
4364 exp->expType = op1->type;
4366 op1->type->refCount++;
4371 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4373 uint64 value2 = op2->__anon1.ui64;
4376 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
4379 exp->expType = op1->type;
4381 op1->type->refCount++;
4386 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4388 short value2 = op2->__anon1.s;
4391 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s %= value2)) : (short)0);
4394 exp->expType = op1->type;
4396 op1->type->refCount++;
4401 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4403 unsigned short value2 = op2->__anon1.us;
4406 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us %= value2)) : (unsigned short)0);
4409 exp->expType = op1->type;
4411 op1->type->refCount++;
4416 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4418 char value2 = op2->__anon1.c;
4421 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c %= value2)) : (char)0);
4424 exp->expType = op1->type;
4426 op1->type->refCount++;
4431 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4433 unsigned char value2 = op2->__anon1.uc;
4436 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc %= value2)) : (unsigned char)0);
4439 exp->expType = op1->type;
4441 op1->type->refCount++;
4446 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4448 int value2 = op2->__anon1.i;
4451 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4454 exp->expType = op1->type;
4456 op1->type->refCount++;
4461 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4463 unsigned int value2 = op2->__anon1.ui;
4466 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4469 exp->expType = op1->type;
4471 op1->type->refCount++;
4476 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4478 long long value2 = op2->__anon1.i64;
4481 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4484 exp->expType = op1->type;
4486 op1->type->refCount++;
4491 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4493 uint64 value2 = op2->__anon1.ui64;
4496 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4499 exp->expType = op1->type;
4501 op1->type->refCount++;
4506 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4508 short value2 = op2->__anon1.s;
4511 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
4514 exp->expType = op1->type;
4516 op1->type->refCount++;
4521 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4523 unsigned short value2 = op2->__anon1.us;
4526 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
4529 exp->expType = op1->type;
4531 op1->type->refCount++;
4536 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4538 char value2 = op2->__anon1.c;
4541 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
4544 exp->expType = op1->type;
4546 op1->type->refCount++;
4551 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4553 unsigned char value2 = op2->__anon1.uc;
4556 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
4559 exp->expType = op1->type;
4561 op1->type->refCount++;
4566 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4568 int value2 = op2->__anon1.i;
4571 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4574 exp->expType = op1->type;
4576 op1->type->refCount++;
4581 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4583 unsigned int value2 = op2->__anon1.ui;
4586 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4589 exp->expType = op1->type;
4591 op1->type->refCount++;
4596 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4598 long long value2 = op2->__anon1.i64;
4601 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4604 exp->expType = op1->type;
4606 op1->type->refCount++;
4611 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4613 uint64 value2 = op2->__anon1.ui64;
4616 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4619 exp->expType = op1->type;
4621 op1->type->refCount++;
4626 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4628 short value2 = op2->__anon1.s;
4631 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
4634 exp->expType = op1->type;
4636 op1->type->refCount++;
4641 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4643 unsigned short value2 = op2->__anon1.us;
4646 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
4649 exp->expType = op1->type;
4651 op1->type->refCount++;
4656 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4658 char value2 = op2->__anon1.c;
4661 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
4664 exp->expType = op1->type;
4666 op1->type->refCount++;
4671 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4673 unsigned char value2 = op2->__anon1.uc;
4676 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
4679 exp->expType = op1->type;
4681 op1->type->refCount++;
4686 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4688 int value2 = op2->__anon1.i;
4691 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4694 exp->expType = op1->type;
4696 op1->type->refCount++;
4701 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4703 unsigned int value2 = op2->__anon1.ui;
4706 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4709 exp->expType = op1->type;
4711 op1->type->refCount++;
4716 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4718 long long value2 = op2->__anon1.i64;
4721 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4724 exp->expType = op1->type;
4726 op1->type->refCount++;
4731 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4733 uint64 value2 = op2->__anon1.ui64;
4736 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4739 exp->expType = op1->type;
4741 op1->type->refCount++;
4746 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4748 short value2 = op2->__anon1.s;
4751 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
4754 exp->expType = op1->type;
4756 op1->type->refCount++;
4761 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4763 unsigned short value2 = op2->__anon1.us;
4766 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
4769 exp->expType = op1->type;
4771 op1->type->refCount++;
4776 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4778 char value2 = op2->__anon1.c;
4781 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
4784 exp->expType = op1->type;
4786 op1->type->refCount++;
4791 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4793 unsigned char value2 = op2->__anon1.uc;
4796 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
4799 exp->expType = op1->type;
4801 op1->type->refCount++;
4806 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4808 int value2 = op2->__anon1.i;
4811 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4814 exp->expType = op1->type;
4816 op1->type->refCount++;
4821 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4823 unsigned int value2 = op2->__anon1.ui;
4826 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4829 exp->expType = op1->type;
4831 op1->type->refCount++;
4836 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4838 long long value2 = op2->__anon1.i64;
4841 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4844 exp->expType = op1->type;
4846 op1->type->refCount++;
4851 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4853 uint64 value2 = op2->__anon1.ui64;
4856 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4859 exp->expType = op1->type;
4861 op1->type->refCount++;
4866 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4868 short value2 = op2->__anon1.s;
4871 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
4874 exp->expType = op1->type;
4876 op1->type->refCount++;
4881 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4883 unsigned short value2 = op2->__anon1.us;
4886 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
4889 exp->expType = op1->type;
4891 op1->type->refCount++;
4896 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4898 char value2 = op2->__anon1.c;
4901 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
4904 exp->expType = op1->type;
4906 op1->type->refCount++;
4911 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4913 unsigned char value2 = op2->__anon1.uc;
4916 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
4919 exp->expType = op1->type;
4921 op1->type->refCount++;
4926 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4928 int value2 = op2->__anon1.i;
4931 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4934 exp->expType = op1->type;
4936 op1->type->refCount++;
4941 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4943 unsigned int value2 = op2->__anon1.ui;
4946 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4949 exp->expType = op1->type;
4951 op1->type->refCount++;
4956 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4958 long long value2 = op2->__anon1.i64;
4961 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4964 exp->expType = op1->type;
4966 op1->type->refCount++;
4971 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4973 uint64 value2 = op2->__anon1.ui64;
4976 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4979 exp->expType = op1->type;
4981 op1->type->refCount++;
4986 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4988 short value2 = op2->__anon1.s;
4991 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
4994 exp->expType = op1->type;
4996 op1->type->refCount++;
5001 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5003 unsigned short value2 = op2->__anon1.us;
5006 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
5009 exp->expType = op1->type;
5011 op1->type->refCount++;
5016 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5018 char value2 = op2->__anon1.c;
5021 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
5024 exp->expType = op1->type;
5026 op1->type->refCount++;
5031 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5033 unsigned char value2 = op2->__anon1.uc;
5036 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
5039 exp->expType = op1->type;
5041 op1->type->refCount++;
5046 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5049 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5052 exp->expType = op1->type;
5054 op1->type->refCount++;
5059 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5062 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5065 exp->expType = op1->type;
5067 op1->type->refCount++;
5072 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5075 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5078 exp->expType = op1->type;
5080 op1->type->refCount++;
5085 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5088 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5091 exp->expType = op1->type;
5093 op1->type->refCount++;
5098 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5101 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5104 exp->expType = op1->type;
5106 op1->type->refCount++;
5111 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5114 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5117 exp->expType = op1->type;
5119 op1->type->refCount++;
5124 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5127 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5130 exp->expType = op1->type;
5132 op1->type->refCount++;
5137 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5140 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5143 exp->expType = op1->type;
5145 op1->type->refCount++;
5150 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5152 int value2 = op2->__anon1.i;
5155 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5158 exp->expType = op1->type;
5160 op1->type->refCount++;
5165 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5167 unsigned int value2 = op2->__anon1.ui;
5170 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5173 exp->expType = op1->type;
5175 op1->type->refCount++;
5180 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5182 long long value2 = op2->__anon1.i64;
5185 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5188 exp->expType = op1->type;
5190 op1->type->refCount++;
5195 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5197 uint64 value2 = op2->__anon1.ui64;
5200 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5203 exp->expType = op1->type;
5205 op1->type->refCount++;
5210 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5212 short value2 = op2->__anon1.s;
5215 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s &= value2));
5218 exp->expType = op1->type;
5220 op1->type->refCount++;
5225 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5227 unsigned short value2 = op2->__anon1.us;
5230 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us &= value2));
5233 exp->expType = op1->type;
5235 op1->type->refCount++;
5240 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5242 char value2 = op2->__anon1.c;
5245 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c &= value2));
5248 exp->expType = op1->type;
5250 op1->type->refCount++;
5255 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5257 unsigned char value2 = op2->__anon1.uc;
5260 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc &= value2));
5263 exp->expType = op1->type;
5265 op1->type->refCount++;
5270 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5272 int value2 = op2->__anon1.i;
5275 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5278 exp->expType = op1->type;
5280 op1->type->refCount++;
5285 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5287 unsigned int value2 = op2->__anon1.ui;
5290 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5293 exp->expType = op1->type;
5295 op1->type->refCount++;
5300 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5302 long long value2 = op2->__anon1.i64;
5305 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5308 exp->expType = op1->type;
5310 op1->type->refCount++;
5315 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5317 uint64 value2 = op2->__anon1.ui64;
5320 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5323 exp->expType = op1->type;
5325 op1->type->refCount++;
5330 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5332 short value2 = op2->__anon1.s;
5335 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s |= value2));
5338 exp->expType = op1->type;
5340 op1->type->refCount++;
5345 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5347 unsigned short value2 = op2->__anon1.us;
5350 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us |= value2));
5353 exp->expType = op1->type;
5355 op1->type->refCount++;
5360 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5362 char value2 = op2->__anon1.c;
5365 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c |= value2));
5368 exp->expType = op1->type;
5370 op1->type->refCount++;
5375 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5377 unsigned char value2 = op2->__anon1.uc;
5380 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc |= value2));
5383 exp->expType = op1->type;
5385 op1->type->refCount++;
5390 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5392 int value2 = op2->__anon1.i;
5395 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5398 exp->expType = op1->type;
5400 op1->type->refCount++;
5405 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5407 unsigned int value2 = op2->__anon1.ui;
5410 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5413 exp->expType = op1->type;
5415 op1->type->refCount++;
5420 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5422 long long value2 = op2->__anon1.i64;
5425 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5428 exp->expType = op1->type;
5430 op1->type->refCount++;
5435 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5437 uint64 value2 = op2->__anon1.ui64;
5440 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5443 exp->expType = op1->type;
5445 op1->type->refCount++;
5450 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5452 short value2 = op2->__anon1.s;
5455 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^= value2));
5458 exp->expType = op1->type;
5460 op1->type->refCount++;
5465 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5467 unsigned short value2 = op2->__anon1.us;
5470 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^= value2));
5473 exp->expType = op1->type;
5475 op1->type->refCount++;
5480 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5482 char value2 = op2->__anon1.c;
5485 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^= value2));
5488 exp->expType = op1->type;
5490 op1->type->refCount++;
5495 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5497 unsigned char value2 = op2->__anon1.uc;
5500 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^= value2));
5503 exp->expType = op1->type;
5505 op1->type->refCount++;
5510 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5512 int value2 = op2->__anon1.i;
5515 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5518 exp->expType = op1->type;
5520 op1->type->refCount++;
5525 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5527 unsigned int value2 = op2->__anon1.ui;
5530 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5533 exp->expType = op1->type;
5535 op1->type->refCount++;
5540 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5542 long long value2 = op2->__anon1.i64;
5545 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5548 exp->expType = op1->type;
5550 op1->type->refCount++;
5555 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5557 uint64 value2 = op2->__anon1.ui64;
5560 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5563 exp->expType = op1->type;
5565 op1->type->refCount++;
5570 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5572 short value2 = op2->__anon1.s;
5575 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <<= value2));
5578 exp->expType = op1->type;
5580 op1->type->refCount++;
5585 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5587 unsigned short value2 = op2->__anon1.us;
5590 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <<= value2));
5593 exp->expType = op1->type;
5595 op1->type->refCount++;
5600 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5602 char value2 = op2->__anon1.c;
5605 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <<= value2));
5608 exp->expType = op1->type;
5610 op1->type->refCount++;
5615 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5617 unsigned char value2 = op2->__anon1.uc;
5620 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <<= value2));
5623 exp->expType = op1->type;
5625 op1->type->refCount++;
5630 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5632 int value2 = op2->__anon1.i;
5635 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5638 exp->expType = op1->type;
5640 op1->type->refCount++;
5645 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5647 unsigned int value2 = op2->__anon1.ui;
5650 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5653 exp->expType = op1->type;
5655 op1->type->refCount++;
5660 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5662 long long value2 = op2->__anon1.i64;
5665 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5668 exp->expType = op1->type;
5670 op1->type->refCount++;
5675 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5677 uint64 value2 = op2->__anon1.ui64;
5680 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5683 exp->expType = op1->type;
5685 op1->type->refCount++;
5690 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5692 short value2 = op2->__anon1.s;
5695 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >>= value2));
5698 exp->expType = op1->type;
5700 op1->type->refCount++;
5705 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5707 unsigned short value2 = op2->__anon1.us;
5710 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >>= value2));
5713 exp->expType = op1->type;
5715 op1->type->refCount++;
5720 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5722 char value2 = op2->__anon1.c;
5725 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >>= value2));
5728 exp->expType = op1->type;
5730 op1->type->refCount++;
5735 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5737 unsigned char value2 = op2->__anon1.uc;
5740 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >>= value2));
5743 exp->expType = op1->type;
5745 op1->type->refCount++;
5750 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5753 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5756 exp->expType = op1->type;
5758 op1->type->refCount++;
5763 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5766 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5769 exp->expType = op1->type;
5771 op1->type->refCount++;
5776 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5779 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5782 exp->expType = op1->type;
5784 op1->type->refCount++;
5789 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5792 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5795 exp->expType = op1->type;
5797 op1->type->refCount++;
5802 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5805 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5808 exp->expType = op1->type;
5810 op1->type->refCount++;
5815 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5818 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5821 exp->expType = op1->type;
5823 op1->type->refCount++;
5828 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5831 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5834 exp->expType = op1->type;
5836 op1->type->refCount++;
5841 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5844 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5847 exp->expType = op1->type;
5849 op1->type->refCount++;
5854 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5856 int value2 = op2->__anon1.i;
5859 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5862 exp->expType = op1->type;
5864 op1->type->refCount++;
5869 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5871 unsigned int value2 = op2->__anon1.ui;
5874 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5877 exp->expType = op1->type;
5879 op1->type->refCount++;
5884 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5886 long long value2 = op2->__anon1.i64;
5889 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5892 exp->expType = op1->type;
5894 op1->type->refCount++;
5899 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5901 uint64 value2 = op2->__anon1.ui64;
5904 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5907 exp->expType = op1->type;
5909 op1->type->refCount++;
5914 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5916 short value2 = op2->__anon1.s;
5919 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5922 exp->expType = op1->type;
5924 op1->type->refCount++;
5929 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5931 unsigned short value2 = op2->__anon1.us;
5934 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5937 exp->expType = op1->type;
5939 op1->type->refCount++;
5944 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5946 char value2 = op2->__anon1.c;
5949 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5952 exp->expType = op1->type;
5954 op1->type->refCount++;
5959 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5961 unsigned char value2 = op2->__anon1.uc;
5964 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5967 exp->expType = op1->type;
5969 op1->type->refCount++;
5974 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5976 float value2 = op2->__anon1.f;
5979 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5982 exp->expType = op1->type;
5984 op1->type->refCount++;
5989 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5991 double value2 = op2->__anon1.d;
5994 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5997 exp->expType = op1->type;
5999 op1->type->refCount++;
6004 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6006 int value2 = op2->__anon1.i;
6009 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6012 exp->expType = op1->type;
6014 op1->type->refCount++;
6019 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6021 unsigned int value2 = op2->__anon1.ui;
6024 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6027 exp->expType = op1->type;
6029 op1->type->refCount++;
6034 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6036 long long value2 = op2->__anon1.i64;
6039 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6042 exp->expType = op1->type;
6044 op1->type->refCount++;
6049 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6051 uint64 value2 = op2->__anon1.ui64;
6054 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6057 exp->expType = op1->type;
6059 op1->type->refCount++;
6064 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6066 short value2 = op2->__anon1.s;
6069 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6072 exp->expType = op1->type;
6074 op1->type->refCount++;
6079 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6081 unsigned short value2 = op2->__anon1.us;
6084 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6087 exp->expType = op1->type;
6089 op1->type->refCount++;
6094 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6096 char value2 = op2->__anon1.c;
6099 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6102 exp->expType = op1->type;
6104 op1->type->refCount++;
6109 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6111 unsigned char value2 = op2->__anon1.uc;
6114 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6117 exp->expType = op1->type;
6119 op1->type->refCount++;
6124 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6126 float value2 = op2->__anon1.f;
6129 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6132 exp->expType = op1->type;
6134 op1->type->refCount++;
6139 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6141 double value2 = op2->__anon1.d;
6144 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6147 exp->expType = op1->type;
6149 op1->type->refCount++;
6154 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6156 int value2 = op2->__anon1.i;
6159 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6162 exp->expType = op1->type;
6164 op1->type->refCount++;
6169 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6171 unsigned int value2 = op2->__anon1.ui;
6174 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6177 exp->expType = op1->type;
6179 op1->type->refCount++;
6184 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6186 long long value2 = op2->__anon1.i64;
6189 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6192 exp->expType = op1->type;
6194 op1->type->refCount++;
6199 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6201 uint64 value2 = op2->__anon1.ui64;
6204 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6207 exp->expType = op1->type;
6209 op1->type->refCount++;
6214 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6216 short value2 = op2->__anon1.s;
6219 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6222 exp->expType = op1->type;
6224 op1->type->refCount++;
6229 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6231 unsigned short value2 = op2->__anon1.us;
6234 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6237 exp->expType = op1->type;
6239 op1->type->refCount++;
6244 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6246 char value2 = op2->__anon1.c;
6249 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6252 exp->expType = op1->type;
6254 op1->type->refCount++;
6259 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6261 unsigned char value2 = op2->__anon1.uc;
6264 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6267 exp->expType = op1->type;
6269 op1->type->refCount++;
6274 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6276 float value2 = op2->__anon1.f;
6279 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6282 exp->expType = op1->type;
6284 op1->type->refCount++;
6289 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6291 double value2 = op2->__anon1.d;
6294 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6297 exp->expType = op1->type;
6299 op1->type->refCount++;
6304 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6306 int value2 = op2->__anon1.i;
6309 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6312 exp->expType = op1->type;
6314 op1->type->refCount++;
6319 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6321 unsigned int value2 = op2->__anon1.ui;
6324 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6327 exp->expType = op1->type;
6329 op1->type->refCount++;
6334 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6336 long long value2 = op2->__anon1.i64;
6339 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6342 exp->expType = op1->type;
6344 op1->type->refCount++;
6349 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6351 uint64 value2 = op2->__anon1.ui64;
6354 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6357 exp->expType = op1->type;
6359 op1->type->refCount++;
6364 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6366 short value2 = op2->__anon1.s;
6369 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6372 exp->expType = op1->type;
6374 op1->type->refCount++;
6379 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6381 unsigned short value2 = op2->__anon1.us;
6384 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6387 exp->expType = op1->type;
6389 op1->type->refCount++;
6394 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6396 char value2 = op2->__anon1.c;
6399 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6402 exp->expType = op1->type;
6404 op1->type->refCount++;
6409 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6411 unsigned char value2 = op2->__anon1.uc;
6414 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6417 exp->expType = op1->type;
6419 op1->type->refCount++;
6424 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6426 float value2 = op2->__anon1.f;
6429 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6432 exp->expType = op1->type;
6434 op1->type->refCount++;
6439 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6441 double value2 = op2->__anon1.d;
6444 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6447 exp->expType = op1->type;
6449 op1->type->refCount++;
6454 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6456 int value2 = op2->__anon1.i;
6459 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6462 exp->expType = op1->type;
6464 op1->type->refCount++;
6469 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6471 unsigned int value2 = op2->__anon1.ui;
6474 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6477 exp->expType = op1->type;
6479 op1->type->refCount++;
6484 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6486 long long value2 = op2->__anon1.i64;
6489 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6492 exp->expType = op1->type;
6494 op1->type->refCount++;
6499 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6501 uint64 value2 = op2->__anon1.ui64;
6504 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6507 exp->expType = op1->type;
6509 op1->type->refCount++;
6514 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6516 short value2 = op2->__anon1.s;
6519 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6522 exp->expType = op1->type;
6524 op1->type->refCount++;
6529 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6531 unsigned short value2 = op2->__anon1.us;
6534 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6537 exp->expType = op1->type;
6539 op1->type->refCount++;
6544 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6546 char value2 = op2->__anon1.c;
6549 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6552 exp->expType = op1->type;
6554 op1->type->refCount++;
6559 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6561 unsigned char value2 = op2->__anon1.uc;
6564 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6567 exp->expType = op1->type;
6569 op1->type->refCount++;
6574 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6576 float value2 = op2->__anon1.f;
6579 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6582 exp->expType = op1->type;
6584 op1->type->refCount++;
6589 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6591 double value2 = op2->__anon1.d;
6594 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6597 exp->expType = op1->type;
6599 op1->type->refCount++;
6604 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6606 int value2 = op2->__anon1.i;
6609 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6612 exp->expType = op1->type;
6614 op1->type->refCount++;
6619 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6621 unsigned int value2 = op2->__anon1.ui;
6624 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6627 exp->expType = op1->type;
6629 op1->type->refCount++;
6634 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6636 long long value2 = op2->__anon1.i64;
6639 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6642 exp->expType = op1->type;
6644 op1->type->refCount++;
6649 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6651 uint64 value2 = op2->__anon1.ui64;
6654 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6657 exp->expType = op1->type;
6659 op1->type->refCount++;
6664 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6666 short value2 = op2->__anon1.s;
6669 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6672 exp->expType = op1->type;
6674 op1->type->refCount++;
6679 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6681 unsigned short value2 = op2->__anon1.us;
6684 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6687 exp->expType = op1->type;
6689 op1->type->refCount++;
6694 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6696 char value2 = op2->__anon1.c;
6699 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6702 exp->expType = op1->type;
6704 op1->type->refCount++;
6709 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6711 unsigned char value2 = op2->__anon1.uc;
6714 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6717 exp->expType = op1->type;
6719 op1->type->refCount++;
6724 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6726 float value2 = op2->__anon1.f;
6729 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6732 exp->expType = op1->type;
6734 op1->type->refCount++;
6739 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6741 double value2 = op2->__anon1.d;
6744 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6747 exp->expType = op1->type;
6749 op1->type->refCount++;
6754 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6756 int value2 = op2->__anon1.i;
6759 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6762 exp->expType = op1->type;
6764 op1->type->refCount++;
6769 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6771 unsigned int value2 = op2->__anon1.ui;
6774 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6777 exp->expType = op1->type;
6779 op1->type->refCount++;
6784 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6786 long long value2 = op2->__anon1.i64;
6789 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6792 exp->expType = op1->type;
6794 op1->type->refCount++;
6799 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6801 uint64 value2 = op2->__anon1.ui64;
6804 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6807 exp->expType = op1->type;
6809 op1->type->refCount++;
6814 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6816 short value2 = op2->__anon1.s;
6819 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6822 exp->expType = op1->type;
6824 op1->type->refCount++;
6829 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6831 unsigned short value2 = op2->__anon1.us;
6834 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6837 exp->expType = op1->type;
6839 op1->type->refCount++;
6844 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6846 char value2 = op2->__anon1.c;
6849 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6852 exp->expType = op1->type;
6854 op1->type->refCount++;
6859 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6861 unsigned char value2 = op2->__anon1.uc;
6864 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6867 exp->expType = op1->type;
6869 op1->type->refCount++;
6874 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6876 float value2 = op2->__anon1.f;
6879 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6882 exp->expType = op1->type;
6884 op1->type->refCount++;
6889 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6891 double value2 = op2->__anon1.d;
6894 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6897 exp->expType = op1->type;
6899 op1->type->refCount++;
6904 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6906 int value2 = op2->__anon1.i;
6909 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6912 exp->expType = op1->type;
6914 op1->type->refCount++;
6919 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6921 unsigned int value2 = op2->__anon1.ui;
6924 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6927 exp->expType = op1->type;
6929 op1->type->refCount++;
6934 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6936 long long value2 = op2->__anon1.i64;
6939 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6942 exp->expType = op1->type;
6944 op1->type->refCount++;
6949 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6951 uint64 value2 = op2->__anon1.ui64;
6954 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6957 exp->expType = op1->type;
6959 op1->type->refCount++;
6964 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6966 short value2 = op2->__anon1.s;
6969 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6972 exp->expType = op1->type;
6974 op1->type->refCount++;
6979 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6981 unsigned short value2 = op2->__anon1.us;
6984 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6987 exp->expType = op1->type;
6989 op1->type->refCount++;
6994 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6996 char value2 = op2->__anon1.c;
6999 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
7002 exp->expType = op1->type;
7004 op1->type->refCount++;
7009 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7011 unsigned char value2 = op2->__anon1.uc;
7014 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7017 exp->expType = op1->type;
7019 op1->type->refCount++;
7024 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7026 float value2 = op2->__anon1.f;
7029 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7032 exp->expType = op1->type;
7034 op1->type->refCount++;
7039 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7041 double value2 = op2->__anon1.d;
7044 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7047 exp->expType = op1->type;
7049 op1->type->refCount++;
7054 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7057 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7060 exp->expType = op1->type;
7062 op1->type->refCount++;
7067 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7070 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7073 exp->expType = op1->type;
7075 op1->type->refCount++;
7080 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7083 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7086 exp->expType = op1->type;
7088 op1->type->refCount++;
7093 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7096 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7099 exp->expType = op1->type;
7101 op1->type->refCount++;
7106 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7109 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7112 exp->expType = op1->type;
7114 op1->type->refCount++;
7119 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7122 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7125 exp->expType = op1->type;
7127 op1->type->refCount++;
7132 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7135 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7138 exp->expType = op1->type;
7140 op1->type->refCount++;
7145 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7148 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7151 exp->expType = op1->type;
7153 op1->type->refCount++;
7158 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7160 if(type->name && type->name[0])
7163 strcat(string, type->name);
7166 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7172 strcat(string, name);
7177 static void PrintAttribs(struct Type * type, char * string)
7182 strcat(string, "dllexport ");
7183 if(type->attrStdcall)
7184 strcat(string, "stdcall ");
7188 static struct Type * FindMember(struct Type * type, char * string)
7190 struct Type * memberType;
7192 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7194 if(!memberType->name)
7196 struct Type * subType = FindMember(memberType, string);
7201 else if(!strcmp(memberType->name, string))
7204 return (((void *)0));
7207 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7209 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7211 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7213 unsigned int result = 0;
7218 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7219 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7223 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7224 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7227 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)
7228 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7231 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)
7232 result = GetOpFloat(op, &op->__anon1.f);
7235 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)
7236 result = GetOpDouble(op, &op->__anon1.d);
7239 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)
7240 result = GetOpUInt64(op, &op->__anon1.ui64);
7243 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)
7244 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7247 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7248 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7251 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7252 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7258 struct OpTable floatOps =
7260 (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)
7263 struct OpTable doubleOps =
7265 (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)
7268 struct OpTable intOps =
7270 (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)
7273 struct OpTable uintOps =
7275 (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)
7278 struct OpTable int64Ops =
7280 (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)
7283 struct OpTable uint64Ops =
7285 (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)
7288 struct OpTable shortOps =
7290 (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)
7293 struct OpTable ushortOps =
7295 (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)
7298 struct OpTable charOps =
7300 (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)
7303 struct OpTable ucharOps =
7305 (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)
7308 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7310 struct Type * memberType;
7312 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7314 if(!memberType->name)
7316 struct Type * subType = FindMember(memberType, string);
7320 *offset += memberType->offset;
7324 else if(!strcmp(memberType->name, string))
7326 *offset += memberType->offset;
7330 return (((void *)0));
7333 struct __ecereNameSpace__ecere__com__Module;
7335 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);
7337 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7339 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);
7341 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);
7343 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7345 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7350 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7351 struct __ecereNameSpace__ecere__sys__BTNode * left;
7352 struct __ecereNameSpace__ecere__sys__BTNode * right;
7354 struct __ecereNameSpace__ecere__com__Instance * module;
7355 char * dataTypeString;
7356 struct Type * dataType;
7361 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);
7363 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7365 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);
7367 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7369 struct __ecereNameSpace__ecere__com__DefinedExpression;
7371 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7373 struct __ecereNameSpace__ecere__com__DefinedExpression
7375 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7376 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7379 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7382 struct __ecereNameSpace__ecere__sys__BinaryTree;
7384 struct __ecereNameSpace__ecere__sys__BinaryTree
7386 struct __ecereNameSpace__ecere__sys__BTNode * root;
7388 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7389 void (* FreeKey)(void * key);
7392 struct __ecereNameSpace__ecere__com__Class
7394 struct __ecereNameSpace__ecere__com__Class * prev;
7395 struct __ecereNameSpace__ecere__com__Class * next;
7401 unsigned int (* Constructor)(void * );
7402 void (* Destructor)(void * );
7405 struct __ecereNameSpace__ecere__com__Class * base;
7406 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7407 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7408 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7409 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7410 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7411 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7415 struct __ecereNameSpace__ecere__com__Instance * module;
7416 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7417 const char * dataTypeString;
7418 struct Type * dataType;
7420 int defaultAlignment;
7421 void (* Initialize)();
7423 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7424 const char * designerClass;
7425 unsigned int noExpansion;
7426 const char * defaultProperty;
7427 unsigned int comRedefinition;
7430 unsigned int internalDecl;
7432 unsigned int computeSize;
7433 short structAlignment;
7434 short pointerAlignment;
7435 int destructionWatchOffset;
7437 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7438 int inheritanceAccess;
7439 const char * fullName;
7441 struct __ecereNameSpace__ecere__sys__OldList conversions;
7442 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7443 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7444 struct __ecereNameSpace__ecere__com__Class * templateClass;
7445 struct __ecereNameSpace__ecere__sys__OldList templatized;
7447 unsigned int isInstanceClass;
7448 unsigned int byValueSystemClass;
7451 struct __ecereNameSpace__ecere__com__NameSpace
7454 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7455 struct __ecereNameSpace__ecere__com__NameSpace * left;
7456 struct __ecereNameSpace__ecere__com__NameSpace * right;
7458 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7459 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7460 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7461 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7462 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7465 struct __ecereNameSpace__ecere__com__DataMember
7467 struct __ecereNameSpace__ecere__com__DataMember * prev;
7468 struct __ecereNameSpace__ecere__com__DataMember * next;
7470 unsigned int isProperty;
7473 struct __ecereNameSpace__ecere__com__Class * _class;
7474 const char * dataTypeString;
7475 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7476 struct Type * dataType;
7480 struct __ecereNameSpace__ecere__sys__OldList members;
7481 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7483 short structAlignment;
7484 short pointerAlignment;
7487 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7489 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7491 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7493 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7495 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7497 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7499 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7503 if(type->kind == 11)
7505 struct Type * param;
7507 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7508 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7509 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7511 else if(type->kind == 13)
7512 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7513 else if(type->kind == 8)
7515 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7517 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7519 else if(type->kind == 9 || type->kind == 10)
7521 struct Type * member;
7523 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7524 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7526 else if(type->kind == 12)
7527 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7531 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7533 unsigned int status = 1;
7535 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))
7537 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7538 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7540 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7542 struct Type * sourceType = source, * destType = dest;
7544 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7545 sourceType = sourceType->__anon1.type;
7546 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7547 destType = destType->__anon1.type;
7548 if(!destType->constant && sourceType->constant)
7552 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7559 struct Operand GetOperand(struct Expression * exp)
7568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7571 struct Type * type = exp->expType;
7575 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))
7577 if(!type->__anon1._class->__anon1.registered->dataType)
7578 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7579 type = type->__anon1._class->__anon1.registered->dataType;
7581 if(exp->type == 3 && op.kind == 13)
7583 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7587 else if(exp->isConstant && exp->type == 2)
7589 op.kind = type->kind;
7596 if(exp->__anon1.__anon1.constant[0] == '\'')
7598 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7601 else if(type->isSigned)
7603 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7608 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7614 if(exp->__anon1.__anon1.constant[0] == '\'')
7616 op.__anon1.s = exp->__anon1.__anon1.constant[1];
7619 else if(type->isSigned)
7621 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7626 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7632 if(exp->__anon1.__anon1.constant[0] == '\'')
7634 op.__anon1.i = exp->__anon1.__anon1.constant[1];
7637 else if(type->isSigned)
7639 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7644 op.__anon1.ui = (unsigned int)strtoul(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);
7678 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7683 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7689 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7690 op.__anon1.f = __ecereMethod_float_inf();
7691 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7692 op.__anon1.f = -__ecereMethod_float_inf();
7693 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7694 op.__anon1.f = __ecereMethod_float_nan();
7695 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7696 op.__anon1.f = -__ecereMethod_float_nan();
7698 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7702 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7703 op.__anon1.d = __ecereMethod_double_inf();
7704 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7705 op.__anon1.d = -__ecereMethod_double_inf();
7706 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7707 op.__anon1.d = __ecereMethod_double_nan();
7708 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7709 op.__anon1.d = -__ecereMethod_double_nan();
7711 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7717 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7727 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7731 switch(_class->typeSize)
7734 if(!strcmp(_class->dataTypeString, "uint64"))
7735 v = (long long)*(uint64 *)ptr;
7737 v = *(long long *)ptr;
7740 if(!strcmp(_class->dataTypeString, "uint"))
7741 v = (long long)*(unsigned int *)ptr;
7743 v = (long long)*(int *)ptr;
7746 if(!strcmp(_class->dataTypeString, "uint16"))
7747 v = (long long)*(unsigned short *)ptr;
7749 v = (long long)*(short *)ptr;
7752 if(!strcmp(_class->dataTypeString, "byte"))
7753 v = (long long)*(unsigned char *)ptr;
7755 v = (long long)*(char *)ptr;
7761 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7763 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7764 ListAdd(specs, MkSpecifier(UNSIGNED));
7769 if(type->__anon1._class->__anon1.registered)
7771 if(!type->__anon1._class->__anon1.registered->dataType)
7772 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7773 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7778 ListAdd(specs, MkSpecifier(DOUBLE));
7781 ListAdd(specs, MkSpecifier(FLOAT));
7784 ListAdd(specs, MkSpecifier(CHAR));
7787 ListAdd(specs, MkSpecifier(_BOOL));
7790 ListAdd(specs, MkSpecifier(SHORT));
7793 ListAdd(specs, MkSpecifier(INT64));
7796 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7799 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7803 ListAdd(specs, MkSpecifier(INT));
7808 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7812 if(printConst && type->constant)
7813 strcat(string, "const ");
7818 struct Symbol * c = type->__anon1._class;
7819 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7821 if(type->classObjectType == 2 && isObjectBaseClass)
7822 strcat(string, "typed_object");
7823 else if(type->classObjectType == 3 && isObjectBaseClass)
7824 strcat(string, "any_object");
7828 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7830 if(type->byReference)
7831 strcat(string, " &");
7835 strcat(string, "void");
7838 strcat(string, type->isSigned ? "int" : "uint");
7841 strcat(string, type->isSigned ? "int64" : "uint64");
7844 strcat(string, type->isSigned ? "intptr" : "uintptr");
7847 strcat(string, type->isSigned ? "intsize" : "uintsize");
7850 strcat(string, type->isSigned ? "char" : "byte");
7853 strcat(string, "_Bool");
7856 strcat(string, type->isSigned ? "short" : "uint16");
7859 strcat(string, "float");
7862 strcat(string, "double");
7865 if(type->__anon1.__anon1.enumName)
7867 strcat(string, "struct ");
7868 strcat(string, type->__anon1.__anon1.enumName);
7870 else if(type->typeName)
7871 strcat(string, type->typeName);
7874 struct Type * member;
7876 strcat(string, "struct { ");
7877 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7879 PrintType(member, string, 1, fullName);
7880 strcat(string, "; ");
7882 strcat(string, "}");
7886 if(type->__anon1.__anon1.enumName)
7888 strcat(string, "union ");
7889 strcat(string, type->__anon1.__anon1.enumName);
7891 else if(type->typeName)
7892 strcat(string, type->typeName);
7895 strcat(string, "union ");
7896 strcat(string, "(unnamed)");
7900 if(type->__anon1.__anon1.enumName)
7902 strcat(string, "enum ");
7903 strcat(string, type->__anon1.__anon1.enumName);
7905 else if(type->typeName)
7906 strcat(string, type->typeName);
7908 strcat(string, "int");
7911 strcat(string, "...");
7914 strcat(string, "subclass(");
7915 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7916 strcat(string, ")");
7919 strcat(string, type->__anon1.templateParameter->identifier->string);
7922 strcat(string, "thisclass");
7925 strcat(string, "__builtin_va_list");
7931 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7933 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7935 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7939 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7941 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7943 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7945 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7965 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7967 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7969 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7971 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7973 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7975 struct __ecereNameSpace__ecere__com__Application
7978 const char * * argv;
7980 unsigned int isGUIApp;
7981 struct __ecereNameSpace__ecere__sys__OldList allModules;
7982 char * parsedCommand;
7983 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7986 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)
7990 *curMember = (*curMember)->next;
7991 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7993 *curMember = subMemberStack[--(*subMemberStackPos)];
7994 *curMember = (*curMember)->next;
7996 while((*curMember) && (*curMember)->isProperty)
7997 *curMember = (*curMember)->next;
7998 if(subMemberStackPos)
8000 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8002 subMemberStack[(*subMemberStackPos)++] = *curMember;
8003 *curMember = (*curMember)->members.first;
8004 while(*curMember && (*curMember)->isProperty)
8005 *curMember = (*curMember)->next;
8013 if(subMemberStackPos && *subMemberStackPos)
8015 *curMember = subMemberStack[--(*subMemberStackPos)];
8016 *curMember = (*curMember)->next;
8020 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8022 if(*curClass == _class)
8024 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8026 *curMember = (*curClass)->membersAndProperties.first;
8028 while((*curMember) && (*curMember)->isProperty)
8029 *curMember = (*curMember)->next;
8030 if(subMemberStackPos)
8032 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8034 subMemberStack[(*subMemberStackPos)++] = *curMember;
8035 *curMember = (*curMember)->members.first;
8036 while(*curMember && (*curMember)->isProperty)
8037 *curMember = (*curMember)->next;
8044 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8046 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8047 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8048 struct __ecereNameSpace__ecere__com__NameSpace * child;
8052 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)))
8054 data = ScanGlobalData(child, name);
8062 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8064 int nsLen = strlen(nameSpace);
8065 struct Symbol * symbol;
8067 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)))
8069 char * s = symbol->string;
8071 if(!strncmp(s, nameSpace, nsLen))
8076 for(c = strlen(s) - 1; c >= 0; c--)
8079 namePart = s + c + 1;
8080 if(!strcmp(namePart, name))
8088 return (((void *)0));
8091 unsigned int GetInt(struct Expression * exp, int * value2)
8093 struct Operand op2 = GetOperand(exp);
8095 return GetOpInt(&op2, value2);
8098 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8100 struct Operand op2 = GetOperand(exp);
8102 return GetOpUInt(&op2, value2);
8105 unsigned int GetInt64(struct Expression * exp, long long * value2)
8107 struct Operand op2 = GetOperand(exp);
8109 return GetOpInt64(&op2, value2);
8112 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8114 struct Operand op2 = GetOperand(exp);
8116 return GetOpUInt64(&op2, value2);
8119 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8121 struct Operand op2 = GetOperand(exp);
8123 return GetOpIntPtr(&op2, value2);
8126 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8128 struct Operand op2 = GetOperand(exp);
8130 return GetOpUIntPtr(&op2, value2);
8133 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8135 struct Operand op2 = GetOperand(exp);
8137 return GetOpIntSize(&op2, value2);
8140 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8142 struct Operand op2 = GetOperand(exp);
8144 return GetOpUIntSize(&op2, value2);
8147 unsigned int GetShort(struct Expression * exp, short * value2)
8149 struct Operand op2 = GetOperand(exp);
8151 return GetOpShort(&op2, value2);
8154 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8156 struct Operand op2 = GetOperand(exp);
8158 return GetOpUShort(&op2, value2);
8161 unsigned int GetChar(struct Expression * exp, char * value2)
8163 struct Operand op2 = GetOperand(exp);
8165 return GetOpChar(&op2, value2);
8168 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8170 struct Operand op2 = GetOperand(exp);
8172 return GetOpUChar(&op2, value2);
8175 unsigned int GetFloat(struct Expression * exp, float * value2)
8177 struct Operand op2 = GetOperand(exp);
8179 return GetOpFloat(&op2, value2);
8182 unsigned int GetDouble(struct Expression * exp, double * value2)
8184 struct Operand op2 = GetOperand(exp);
8186 return GetOpDouble(&op2, value2);
8189 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8191 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8193 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8194 PrintAttribs(type, string);
8195 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8196 strcat(string, " const");
8197 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8198 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8199 strcat(string, " (");
8200 if(type->kind == 13)
8202 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8203 PrintAttribs(type->__anon1.type, string);
8205 if(type->kind == 13)
8207 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8208 strcat(string, "*");
8210 strcat(string, " *");
8212 if(printConst && type->constant && type->kind == 13)
8213 strcat(string, " const");
8216 PrintTypeSpecs(type, string, fullName, printConst);
8219 void PrintExpression(struct Expression * exp, char * string)
8222 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8224 unsigned int backOutputLineNumbers = outputLineNumbers;
8226 outputLineNumbers = 0;
8228 OutputExpression(exp, f);
8229 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8230 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8232 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8233 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8234 count = strlen(string);
8235 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8236 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8238 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8239 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8240 string[count] = '\0';
8241 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8242 outputLineNumbers = backOutputLineNumbers;
8246 struct Type * Dereference(struct Type * source)
8248 struct Type * type = (((void *)0));
8252 if(source->kind == 13 || source->kind == 12)
8254 type = source->__anon1.type;
8255 source->__anon1.type->refCount++;
8257 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8259 type = __extension__ ({
8260 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8262 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8265 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8271 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8276 static struct Type * Reference(struct Type * source)
8278 struct Type * type = (((void *)0));
8282 type = __extension__ ({
8283 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8285 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8292 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8294 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8296 FreeExpContents(checkedExp);
8297 FreeType(checkedExp->expType);
8298 FreeType(checkedExp->destType);
8299 *checkedExp = *newExp;
8300 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8301 checkedExp->prev = prev;
8302 checkedExp->next = next;
8305 void FinishTemplatesContext(struct Context * context)
8307 PopContext(context);
8308 FreeContext(context);
8309 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8312 static __attribute__((unused)) void UnusedFunction()
8316 ((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);
8319 struct Expression * ParseExpressionString(char * expression)
8322 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8323 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8324 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8326 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8327 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8328 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8329 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8331 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8332 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8334 parsedExpression = (((void *)0));
8336 expression_yyparse();
8337 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8338 return parsedExpression;
8341 struct __ecereNameSpace__ecere__com__Module
8343 struct __ecereNameSpace__ecere__com__Instance * application;
8344 struct __ecereNameSpace__ecere__sys__OldList classes;
8345 struct __ecereNameSpace__ecere__sys__OldList defines;
8346 struct __ecereNameSpace__ecere__sys__OldList functions;
8347 struct __ecereNameSpace__ecere__sys__OldList modules;
8348 struct __ecereNameSpace__ecere__com__Instance * prev;
8349 struct __ecereNameSpace__ecere__com__Instance * next;
8355 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8356 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8359 static struct GlobalData * FindGlobalData(char * name)
8362 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8364 nameSpace = globalData;
8365 for(c = 0; name[c]; c++)
8367 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8369 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8370 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8372 strncpy(spaceName, name + start, c - start);
8373 spaceName[c - start] = '\0';
8374 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8375 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8377 return (((void *)0));
8378 nameSpace = newSpace;
8386 return ScanGlobalData(nameSpace, name + start);
8388 return (((void *)0));
8391 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8394 char nameSpace[1024];
8395 const char * namePart;
8396 unsigned int gotColon = 0;
8398 nameSpace[0] = '\0';
8399 for(c = strlen(name) - 1; c >= 0; c--)
8405 namePart = name + c + 1;
8406 while(c >= 0 && name[c] == ':')
8410 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8414 memcpy(nameSpace, name, c + 1);
8415 nameSpace[c + 1] = 0;
8416 return ScanWithNameSpace(tree, nameSpace, namePart);
8420 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8426 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8430 return ScanWithNameSpace(tree, "", namePart);
8432 return (((void *)0));
8435 static void PrintArraySize(struct Type * arrayType, char * string)
8441 if(arrayType->__anon1.__anon4.enumClass)
8442 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8443 else if(arrayType->__anon1.__anon4.arraySizeExp)
8444 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8446 strcat(string, size);
8449 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8454 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8456 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8457 strcat(string, ")");
8458 if(type->kind == 12)
8459 PrintArraySize(type, string);
8460 else if(type->kind == 11)
8462 struct Type * param;
8464 strcat(string, "(");
8465 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8467 PrintType(param, string, 1, fullName);
8469 strcat(string, ", ");
8471 strcat(string, ")");
8473 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8474 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8477 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8479 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8480 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8481 strcat(string, " ");
8482 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8484 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8486 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8488 if(type->classObjectType == 1)
8489 strcat(string, "class");
8491 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8493 else if(_class && _class->string)
8495 char * s = _class->string;
8501 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8507 strcat(string, name);
8510 strcat(string, "::");
8512 if(printName && type->name)
8513 PrintName(type, string, fullName);
8514 PostPrintType(type, string, fullName);
8515 if(type->bitFieldCount)
8519 sprintf(count, ":%d", type->bitFieldCount);
8520 strcat(string, count);
8528 struct Conversion * prev, * next;
8529 struct __ecereNameSpace__ecere__com__Property * convert;
8531 struct Type * resultType;
8534 static void FreeConvert(struct Conversion * convert)
8536 if(convert->resultType)
8537 FreeType(convert->resultType);
8544 struct Enumerator * prev;
8545 struct Enumerator * next;
8546 struct Location loc;
8547 struct Identifier * id;
8548 struct Expression * exp;
8555 struct AsmField * prev;
8556 struct AsmField * next;
8557 struct Location loc;
8559 struct Expression * expression;
8560 struct Identifier * symbolic;
8563 struct ClassDefinition;
8567 struct Context * parent;
8568 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8569 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8570 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8571 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8574 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8575 struct ClassDefinition * classDef;
8576 unsigned int templateTypesOnly;
8577 unsigned int hasNameSpace;
8582 struct External * prev;
8583 struct External * next;
8584 struct Location loc;
8586 struct Symbol * symbol;
8589 struct FunctionDefinition * function;
8590 struct ClassDefinition * _class;
8591 struct Declaration * declaration;
8592 char * importString;
8593 struct Identifier * id;
8594 struct DBTableDef * table;
8595 } ecere_gcc_struct __anon1;
8597 struct External * fwdDecl;
8598 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8599 struct __ecereNameSpace__ecere__com__Instance * incoming;
8600 int nonBreakableIncoming;
8603 struct ClassDefinition
8605 struct ClassDefinition * prev;
8606 struct ClassDefinition * next;
8607 struct Location loc;
8608 struct Specifier * _class;
8609 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8610 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8611 struct Symbol * symbol;
8612 struct Location blockStart;
8613 struct Location nameLoc;
8615 unsigned int deleteWatchable;
8618 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8620 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8622 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8624 struct Symbol * symbol = data->symbol;
8626 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8631 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8634 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8637 struct Declaration * decl;
8638 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8639 struct Declarator * d;
8640 struct External * external;
8642 specifiers = MkList();
8643 declarators = MkList();
8644 ListAdd(specifiers, MkSpecifier(EXTERN));
8645 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8646 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8647 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8648 decl = MkDeclaration(specifiers, declarators);
8649 external = MkExternalDeclaration(decl);
8651 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8652 external->symbol = symbol;
8653 symbol->__anon2.__anon1.pointerExternal = external;
8654 DeclareType(external, data->dataType, 1, 1);
8657 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8658 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8661 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8663 struct Context * ctx;
8664 struct Symbol * symbol = (((void *)0));
8666 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8668 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8670 symbol = (((void *)0));
8675 strcpy(curName, thisNameSpace);
8676 strcat(curName, "::");
8677 strcat(curName, name);
8678 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8681 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8684 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8685 if(symbol || ctx == endContext)
8688 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8689 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8697 struct ClassDef * prev;
8698 struct ClassDef * next;
8699 struct Location loc;
8703 struct Declaration * decl;
8704 struct ClassFunction * function;
8705 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8706 struct PropertyDef * propertyDef;
8707 struct PropertyWatch * propertyWatch;
8709 struct Identifier * defaultProperty;
8712 struct Identifier * id;
8713 struct Initializer * initializer;
8714 } ecere_gcc_struct __anon1;
8715 } ecere_gcc_struct __anon1;
8722 struct PropertyDef * prev;
8723 struct PropertyDef * next;
8724 struct Location loc;
8725 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8726 struct Declarator * declarator;
8727 struct Identifier * id;
8728 struct Statement * getStmt;
8729 struct Statement * setStmt;
8730 struct Statement * issetStmt;
8731 struct Symbol * symbol;
8732 struct Expression * category;
8735 unsigned int conversion : 1;
8736 unsigned int isWatchable : 1;
8737 unsigned int isDBProp : 1;
8738 } ecere_gcc_struct __anon1;
8741 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8743 struct ClassDef * def;
8746 for(def = (*definitions).first; def; def = def->next)
8750 struct Declaration * decl = def->__anon1.decl;
8752 if(decl && decl->__anon1.__anon1.specifiers)
8754 struct Specifier * spec;
8755 unsigned int isStruct = 0;
8757 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8759 if(spec->type == 3 || spec->type == 4)
8761 if(spec->__anon1.__anon2.definitions)
8762 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8768 struct Declarator * d = (((void *)0));
8770 if(decl->__anon1.__anon1.declarators)
8772 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8774 struct Identifier * idDecl = GetDeclId(d);
8784 sprintf(id, "__anon%d", anonID++);
8785 if(!decl->__anon1.__anon1.declarators)
8786 decl->__anon1.__anon1.declarators = MkList();
8787 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8797 typedef union YYSTYPE
8802 struct Identifier * id;
8803 struct Expression * exp;
8804 struct Specifier * specifier;
8805 struct __ecereNameSpace__ecere__sys__OldList * list;
8806 struct Enumerator * enumerator;
8807 struct Declarator * declarator;
8808 struct Pointer * pointer;
8809 struct Initializer * initializer;
8810 struct InitDeclarator * initDeclarator;
8811 struct TypeName * typeName;
8812 struct Declaration * declaration;
8813 struct Statement * stmt;
8814 struct FunctionDefinition * function;
8815 struct External * external;
8816 struct Context * context;
8817 struct AsmField * asmField;
8818 struct Attrib * attrib;
8819 struct ExtDecl * extDecl;
8820 struct Attribute * attribute;
8821 struct Instantiation * instance;
8822 struct MembersInit * membersInit;
8823 struct MemberInit * memberInit;
8824 struct ClassFunction * classFunction;
8825 struct ClassDefinition * _class;
8826 struct ClassDef * classDef;
8827 struct PropertyDef * prop;
8829 struct Symbol * symbol;
8830 struct PropertyWatch * propertyWatch;
8831 struct TemplateParameter * templateParameter;
8832 struct TemplateArgument * templateArgument;
8833 struct TemplateDatatype * templateDatatype;
8834 struct DBTableEntry * dbtableEntry;
8835 struct DBIndexItem * dbindexItem;
8836 struct DBTableDef * dbtableDef;
8837 } ecere_gcc_struct YYSTYPE;
8839 extern YYSTYPE yylval;
8843 struct MemberInit * prev;
8844 struct MemberInit * next;
8845 struct Location loc;
8846 struct Location realLoc;
8847 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8848 struct Initializer * initializer;
8850 unsigned int variable;
8851 unsigned int takeOutExp;
8854 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8856 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8858 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8860 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8861 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8866 const char * dataTypeString;
8868 } ecere_gcc_struct __anon1;
8869 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8873 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8875 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8877 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8878 struct __ecereNameSpace__ecere__com__Class * sClass;
8880 for(sClass = _class; sClass; sClass = sClass->base)
8883 if(sClass->templateClass)
8884 sClass = sClass->templateClass;
8885 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8887 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8889 for(sClass = sClass->base; sClass; sClass = sClass->base)
8891 if(sClass->templateClass)
8892 sClass = sClass->templateClass;
8893 id += sClass->templateParams.count;
8904 arg = &_class->templateArgs[id];
8905 if(arg && param->type == 0)
8906 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8911 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8913 struct Context * context = PushContext();
8915 context->templateTypesOnly = 1;
8916 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8918 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8920 for(; param; param = param->next)
8922 if(param->type == 0 && param->identifier)
8924 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8926 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8932 struct __ecereNameSpace__ecere__com__Class * sClass;
8934 for(sClass = _class; sClass; sClass = sClass->base)
8936 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8938 for(p = sClass->templateParams.first; p; p = p->next)
8942 struct TemplateParameter * param = p->param;
8943 struct TemplatedType * type;
8947 p->param = param = __extension__ ({
8948 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8950 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8953 type = __extension__ ({
8954 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8956 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8958 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8966 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8968 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8970 unsigned int first = 1;
8972 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8974 char className[1024];
8976 strcpy(className, _class->fullName);
8977 for(param = _class->templateParams.first; param; param = param->next)
8981 strcat(className, "<");
8983 strcat(className, ", ");
8984 if(lastParam + 1 != p)
8986 strcat(className, param->name);
8987 strcat(className, " = ");
8989 strcat(className, param->name);
8997 int len = strlen(className);
8999 if(className[len - 1] == '>')
9000 className[len++] = ' ';
9001 className[len++] = '>';
9002 className[len++] = '\0';
9004 return __ecereNameSpace__ecere__sys__CopyString(className);
9007 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
9010 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9014 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9016 unsigned int first = 1;
9018 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9020 char className[1024];
9022 strcpy(className, _class->fullName);
9023 for(param = _class->templateParams.first; param; param = param->next)
9027 strcat(className, "<");
9029 strcat(className, ", ");
9030 if(lastParam + 1 != p)
9032 strcat(className, param->name);
9033 strcat(className, " = ");
9035 strcat(className, param->name);
9043 int len = strlen(className);
9045 if(className[len - 1] == '>')
9046 className[len++] = ' ';
9047 className[len++] = '>';
9048 className[len++] = '\0';
9050 type = MkClassType(className);
9054 type = MkClassType(_class->fullName);
9059 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9061 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9062 struct __ecereNameSpace__ecere__com__DataMember * member;
9063 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9065 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9066 DeclareMembers(neededBy, _class->base, 0);
9067 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9069 if(!member->isProperty)
9071 switch(member->type)
9075 if(!member->dataType && member->dataTypeString)
9076 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9077 if(member->dataType)
9078 DeclareType(neededBy, member->dataType, 1, 0);
9084 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9091 FinishTemplatesContext(context);
9092 return topMember ? topMember->memberID : _class->memberID;
9095 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9097 if(!method->dataType)
9099 struct Context * context = SetupTemplatesContext(method->_class);
9101 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9102 FinishTemplatesContext(context);
9103 if(method->type != 1 && method->dataType)
9105 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9107 if(!method->_class->symbol)
9108 method->_class->symbol = FindClass(method->_class->fullName);
9109 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9115 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9119 struct Context * context = SetupTemplatesContext(prop->_class);
9121 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9122 FinishTemplatesContext(context);
9126 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9128 if(specs != (((void *)0)) && _class)
9130 struct Specifier * spec;
9132 for(spec = specs->first; spec; spec = spec->next)
9134 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9137 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9138 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9144 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9146 struct Identifier * id = exp->__anon1.__anon1.identifier;
9147 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9148 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9149 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9150 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9152 if(_class && _class->type == 4)
9154 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9155 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9159 struct __ecereNameSpace__ecere__com__Class * baseClass;
9161 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9163 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9165 for(value = e->values.first; value; value = value->next)
9167 if(!strcmp(value->name, id->string))
9172 exp->isConstant = 1;
9173 if(inCompiler || inPreCompiler || inDebugger)
9177 FreeExpContents(exp);
9179 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9180 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9182 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9183 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9185 exp->expType = MkClassType(baseClass->fullName);
9193 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9195 ProcessMethodType(method);
9196 exp->expType = __extension__ ({
9197 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9199 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9203 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9206 ProcessPropertyType(prop);
9207 exp->expType = prop->dataType;
9209 prop->dataType->refCount++;
9212 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9214 if(!member->dataType)
9215 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9216 exp->expType = member->dataType;
9217 if(member->dataType)
9218 member->dataType->refCount++;
9221 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9223 if(!classProp->dataType)
9224 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9225 if(classProp->constant)
9227 FreeExpContents(exp);
9228 exp->isConstant = 1;
9229 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9232 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9239 sprintf(constant, "%d", (int)classProp->Get(_class));
9240 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9246 exp->expType = classProp->dataType;
9247 if(classProp->dataType)
9248 classProp->dataType->refCount++;
9254 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9256 struct Symbol * symbol = prop->symbol;
9257 unsigned int imported = 0;
9258 unsigned int dllImport = 0;
9259 struct External * structExternal = (((void *)0));
9260 struct External * instExternal = (((void *)0));
9262 strcpy(setName, "__ecereProp_");
9263 FullClassNameCat(setName, prop->_class->fullName, 0);
9264 strcat(setName, "_Set_");
9265 FullClassNameCat(setName, prop->name, 1);
9266 strcpy(getName, "__ecereProp_");
9267 FullClassNameCat(getName, prop->_class->fullName, 0);
9268 strcat(getName, "_Get_");
9269 FullClassNameCat(getName, prop->name, 1);
9270 if(!symbol || symbol->_import)
9274 struct Symbol * classSym;
9276 if(!prop->_class->symbol)
9277 prop->_class->symbol = FindClass(prop->_class->fullName);
9278 classSym = prop->_class->symbol;
9279 if(classSym && !classSym->_import)
9281 struct ModuleImport * module;
9283 if(prop->_class->module)
9284 module = FindModule(prop->_class->module);
9286 module = mainModule;
9287 classSym->_import = __extension__ ({
9288 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9290 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9292 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9294 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9295 symbol->_import = (struct ClassImport *)__extension__ ({
9296 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9298 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9301 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9304 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)
9309 struct Context * context = SetupTemplatesContext(prop->_class);
9311 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9312 FinishTemplatesContext(context);
9314 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9316 if(prop->_class->type == 0 && prop->_class->structSize)
9317 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9318 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9320 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9322 struct Declaration * decl;
9323 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9324 struct Declarator * d;
9325 struct __ecereNameSpace__ecere__sys__OldList * params;
9326 struct Specifier * spec = (((void *)0));
9327 struct External * external;
9328 struct Declarator * typeDecl;
9329 unsigned int simple = 0;
9330 unsigned int needReference;
9332 specifiers = MkList();
9333 declarators = MkList();
9335 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9336 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9338 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9340 struct Context * context = SetupTemplatesContext(prop->_class);
9342 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9343 FinishTemplatesContext(context);
9345 needReference = !typeDecl || typeDecl->type == 1;
9346 for(spec = (*specifiers).first; spec; spec = spec->next)
9350 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9354 symbol->_class = classSym->__anon1.registered;
9355 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9362 d = PlugDeclarator(typeDecl, d);
9365 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9366 specifiers = MkList();
9368 d = MkDeclaratorFunction(d, params);
9370 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9371 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9372 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9374 ListAdd(specifiers, MkSpecifier(VOID));
9375 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9376 decl = MkDeclaration(specifiers, declarators);
9377 external = MkExternalDeclaration(decl);
9379 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9381 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9383 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9384 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9385 external->symbol = symbol;
9386 symbol->__anon2.__anon2.externalGet = external;
9387 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9389 FreeDeclarator(typeDecl);
9391 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9393 struct Declaration * decl;
9394 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9395 struct Declarator * d;
9396 struct __ecereNameSpace__ecere__sys__OldList * params;
9397 struct Specifier * spec = (((void *)0));
9398 struct External * external;
9399 struct Declarator * typeDecl;
9400 unsigned int needReference;
9402 declarators = MkList();
9404 if(!prop->conversion || prop->_class->type == 1)
9406 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9408 specifiers = MkList();
9410 struct Context * context = SetupTemplatesContext(prop->_class);
9412 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9413 FinishTemplatesContext(context);
9415 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9416 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9417 ListAdd(params, MkTypeName(specifiers, d));
9418 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9420 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9421 d = MkDeclaratorFunction(d, params);
9422 needReference = !typeDecl || typeDecl->type == 1;
9423 for(spec = (*specifiers).first; spec; spec = spec->next)
9427 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9430 symbol->_class = classSym->__anon1.registered;
9434 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9435 specifiers = MkList();
9437 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9438 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9440 if(!prop->conversion || prop->_class->type == 1)
9441 ListAdd(specifiers, MkSpecifier(VOID));
9443 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9444 decl = MkDeclaration(specifiers, declarators);
9445 external = MkExternalDeclaration(decl);
9447 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9449 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9451 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9453 external->symbol = symbol;
9454 symbol->__anon2.__anon2.externalSet = external;
9455 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9457 if(!symbol->__anon2.__anon2.externalPtr)
9459 struct Declaration * decl;
9460 struct External * external;
9461 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9462 char propName[1024];
9465 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9468 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9469 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9471 ListAdd(specifiers, MkSpecifierName("Property"));
9472 strcpy(propName, "__ecereProp_");
9473 FullClassNameCat(propName, prop->_class->fullName, 0);
9474 strcat(propName, "_");
9475 FullClassNameCat(propName, prop->name, 1);
9477 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9479 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9482 strcpy(propName, "__ecerePropM_");
9483 FullClassNameCat(propName, prop->_class->fullName, 0);
9484 strcat(propName, "_");
9485 FullClassNameCat(propName, prop->name, 1);
9486 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9488 decl = MkDeclaration(specifiers, list);
9490 external = MkExternalDeclaration(decl);
9491 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9492 external->symbol = symbol;
9493 symbol->__anon2.__anon2.externalPtr = external;
9495 if(inCompiler && neededBy)
9497 if(symbol->__anon2.__anon2.externalPtr)
9498 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9499 if(symbol->__anon2.__anon2.externalGet)
9500 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9501 if(symbol->__anon2.__anon2.externalSet)
9502 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9506 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9508 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9510 struct Symbol * symbol = method->symbol;
9512 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9514 unsigned int dllImport = 0;
9516 if(!method->dataType)
9517 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9519 if(!symbol || method->type == 1)
9521 struct Symbol * classSym;
9523 if(!method->_class->symbol)
9524 method->_class->symbol = FindClass(method->_class->fullName);
9525 classSym = method->_class->symbol;
9526 if(!classSym->_import)
9528 struct ModuleImport * module;
9530 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9531 module = FindModule(method->_class->module);
9533 module = mainModule;
9534 classSym->_import = __extension__ ({
9535 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9537 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9543 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9545 if(!symbol->_import)
9547 symbol->_import = (struct ClassImport *)__extension__ ({
9548 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9550 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9552 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9556 symbol->type = method->dataType;
9558 symbol->type->refCount++;
9561 if(!method->dataType->dllExport)
9563 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)
9569 struct Declaration * decl;
9570 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9571 struct Declarator * d;
9572 struct Declarator * funcDecl;
9573 struct External * external;
9575 specifiers = MkList();
9576 declarators = MkList();
9578 ListAdd(specifiers, MkSpecifier(EXTERN));
9579 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9580 ListAdd(specifiers, MkSpecifier(STATIC));
9581 if(method->type == 1)
9583 ListAdd(specifiers, MkSpecifier(INT));
9584 d = MkDeclaratorIdentifier(MkIdentifier(name));
9588 d = MkDeclaratorIdentifier(MkIdentifier(name));
9590 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9592 struct Context * context = SetupTemplatesContext(method->_class);
9594 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9595 FinishTemplatesContext(context);
9597 funcDecl = GetFuncDecl(d);
9600 struct Specifier * spec, * next;
9602 for(spec = (*specifiers).first; spec; spec = next)
9607 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9608 FreeSpecifier(spec);
9612 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9614 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9616 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9617 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")));
9618 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9619 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9621 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9623 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9625 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9626 FreeTypeName(param);
9628 if(!funcDecl->__anon1.function.parameters)
9629 funcDecl->__anon1.function.parameters = MkList();
9630 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9634 ProcessDeclarator(d, 1);
9635 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9636 decl = MkDeclaration(specifiers, declarators);
9637 ReplaceThisClassSpecifiers(specifiers, method->_class);
9638 external = MkExternalDeclaration(decl);
9639 external->symbol = symbol;
9640 symbol->__anon2.__anon1.pointerExternal = external;
9641 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9642 DeclareStruct(external, method->_class->fullName, 1, 1);
9643 if(method->dataType)
9644 DeclareType(external, method->dataType, 1, 1);
9647 if(inCompiler && neededFor)
9649 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9651 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9655 struct __ecereNameSpace__ecere__com__GlobalFunction;
9657 struct __ecereNameSpace__ecere__com__GlobalFunction
9659 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9660 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9663 struct __ecereNameSpace__ecere__com__Instance * module;
9664 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9665 const char * dataTypeString;
9666 struct Type * dataType;
9670 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9672 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);
9674 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9676 struct Symbol * symbol = function->symbol;
9678 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9680 unsigned int imported = 0;
9681 unsigned int dllImport = 0;
9683 if(!function->dataType)
9685 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9686 if(!function->dataType->__anon1.__anon2.thisClass)
9687 function->dataType->__anon1.__anon2.staticMethod = 1;
9693 struct ModuleImport * module = FindModule(function->module);
9695 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9698 if(!function->dataType->dllExport)
9700 symbol->_import = (struct ClassImport *)__extension__ ({
9701 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9703 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9705 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9709 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9710 if(!symbol->type->__anon1.__anon2.thisClass)
9711 symbol->type->__anon1.__anon2.staticMethod = 1;
9714 imported = symbol->_import ? 1 : 0;
9715 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9721 struct Declaration * decl;
9722 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9723 struct Declarator * d;
9724 struct Declarator * funcDecl;
9725 struct External * external;
9727 specifiers = MkList();
9728 declarators = MkList();
9729 ListAdd(specifiers, MkSpecifier(EXTERN));
9730 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9732 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9733 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9734 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9736 struct Specifier * spec;
9738 for(spec = (*specifiers).first; spec; spec = spec->next)
9739 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9741 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9742 FreeSpecifier(spec);
9746 funcDecl = GetFuncDecl(d);
9747 if(funcDecl && !funcDecl->__anon1.function.parameters)
9749 funcDecl->__anon1.function.parameters = MkList();
9750 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9752 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9754 struct Context * oldCtx = curContext;
9756 curContext = globalContext;
9757 decl = MkDeclaration(specifiers, declarators);
9758 curContext = oldCtx;
9760 external = MkExternalDeclaration(decl);
9761 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9762 external->symbol = symbol;
9763 symbol->__anon2.__anon1.pointerExternal = external;
9764 DeclareType(external, function->dataType, 1, 1);
9768 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9769 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9770 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;
9773 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9775 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9782 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9783 strcpy(name, "__ecereFunction_");
9784 FullClassNameCat(name, s, 0);
9785 DeclareFunction(neededBy, function, name);
9788 FindSymbol(s, globalContext, globalContext, 0, 0);
9791 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9793 char propName[1024], propNameM[1024];
9794 char getName[1024], setName[1024];
9795 struct __ecereNameSpace__ecere__sys__OldList * args;
9797 DeclareProperty(curExternal, prop, setName, getName);
9798 strcpy(propName, "__ecereProp_");
9799 FullClassNameCat(propName, prop->_class->fullName, 0);
9800 strcat(propName, "_");
9801 FullClassNameCat(propName, prop->name, 1);
9802 strcpy(propNameM, "__ecerePropM_");
9803 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9804 strcat(propNameM, "_");
9805 FullClassNameCat(propNameM, prop->name, 1);
9806 if(prop->isWatchable)
9809 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9810 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9811 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9813 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9814 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9815 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9816 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9820 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9821 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9822 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9824 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9825 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9826 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9827 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9829 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9830 curFunction->propSet->fireWatchersDone = 1;
9833 struct __ecereNameSpace__ecere__com__SubModule;
9835 struct __ecereNameSpace__ecere__com__SubModule
9837 struct __ecereNameSpace__ecere__com__SubModule * prev;
9838 struct __ecereNameSpace__ecere__com__SubModule * next;
9839 struct __ecereNameSpace__ecere__com__Instance * module;
9843 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9845 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9847 if(searchFor == searchIn)
9849 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9851 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9853 if(ModuleVisibility(subModule->module, searchFor))
9860 void ProcessExpressionType(struct Expression * exp);
9862 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9864 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9866 struct Identifier * id = exp->__anon1.__anon1.identifier;
9867 struct Context * ctx;
9868 struct Symbol * symbol = (((void *)0));
9870 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9872 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9874 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9879 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))))
9881 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9882 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9883 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9884 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9888 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9890 if(!prop && !method)
9891 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9892 if(!prop && !method && !member)
9894 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9896 if(prop || method || member || classProp)
9899 exp->__anon1.member.member = id;
9900 exp->__anon1.member.memberType = 0;
9901 exp->__anon1.member.exp = QMkExpId("this");
9904 else if(_class && _class->templateParams.first)
9906 struct __ecereNameSpace__ecere__com__Class * sClass;
9908 for(sClass = _class; sClass; sClass = sClass->base)
9910 if(sClass->templateParams.first)
9912 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9914 for(param = sClass->templateParams.first; param; param = param->next)
9916 if(param->type == 2 && !strcmp(param->name, id->string))
9918 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9922 struct Declarator * decl;
9923 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9925 FreeIdentifier(exp->__anon1.member.member);
9926 ProcessExpressionType(argExp);
9927 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9928 exp->expType = ProcessType(specs, decl);
9930 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9941 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9943 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9945 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9947 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9948 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9951 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9952 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9954 void * ptr = inst->data + dataMember->offset + offset;
9955 char * result = (((void *)0));
9957 exp->loc = member->loc = inst->loc;
9958 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9959 if(!dataMember->dataType)
9960 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9961 type = dataMember->dataType;
9964 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9966 if(_class->type == 4)
9968 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9972 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9973 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9975 for(item = e->values.first; item; item = item->next)
9977 if(item->data == GetEnumValue(_class, ptr))
9979 result = item->name;
9985 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9987 exp->destType = MkClassType(_class->fullName);
9988 ProcessExpressionType(exp);
9992 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9994 if(!_class->dataType)
9995 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9996 type = _class->dataType;
10005 FreeExpContents(exp);
10006 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10012 FreeExpContents(exp);
10013 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10019 FreeExpContents(exp);
10020 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10026 FreeExpContents(exp);
10027 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10033 FreeExpContents(exp);
10034 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10040 FreeExpContents(exp);
10041 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10046 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10049 ListAdd(memberList, member);
10051 if(parentDataMember->type == 1)
10056 void CheckTemplateTypes(struct Expression * exp)
10058 struct Expression * nbExp = GetNonBracketsExp(exp);
10060 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10062 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10063 struct Context * context;
10064 int kind = exp->expType->kind;
10068 exp->destType->refCount++;
10070 exp->expType->refCount++;
10071 newExp->prev = (((void *)0));
10072 newExp->next = (((void *)0));
10073 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10075 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10077 if(c->type == 2 || c->type == 4 || c->type == 3)
10080 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10081 kind = c->dataType->kind;
10087 if(exp->destType->classObjectType)
10090 exp->destType->refCount--;
10092 exp->expType->refCount--;
10093 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10097 struct __ecereNameSpace__ecere__sys__OldList * specs;
10098 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10099 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10101 context = PushContext();
10102 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10103 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10104 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10106 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10107 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10108 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10109 exp->__anon1.compound->__anon1.compound.context = context;
10110 PopContext(context);
10115 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10116 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))
10117 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10119 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10124 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10126 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10127 struct Context * context;
10128 int kind = exp->expType->kind;
10132 exp->destType->refCount++;
10134 exp->expType->refCount++;
10135 newExp->prev = (((void *)0));
10136 newExp->next = (((void *)0));
10137 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10139 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10141 if(c->type == 2 || c->type == 4 || c->type == 3)
10144 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10145 kind = c->dataType->kind;
10151 if(exp->destType->classObjectType)
10154 exp->destType->refCount--;
10156 exp->expType->refCount--;
10157 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10161 struct __ecereNameSpace__ecere__sys__OldList * specs;
10162 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10163 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10165 context = PushContext();
10166 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10167 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10168 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10170 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10171 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10172 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10173 exp->__anon1.compound->__anon1.compound.context = context;
10174 PopContext(context);
10179 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10182 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10183 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)));
10184 ProcessExpressionType((*exp->__anon1.list).first);
10190 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10192 exp->needTemplateCast = 2;
10193 newExp->needCast = 1;
10194 newExp->needTemplateCast = 2;
10195 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10197 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10198 exp->needTemplateCast = 2;
10199 newExp->needCast = 1;
10200 newExp->needTemplateCast = 2;
10201 ProcessExpressionType((*exp->__anon1.list).first);
10207 if(exp->expType->kind == 20)
10209 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10213 FreeType(exp->destType);
10214 FreeType(exp->expType);
10215 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10220 char typeString[1024];
10221 struct Declarator * decl;
10222 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10224 typeString[0] = '\0';
10225 PrintType(exp->expType, typeString, 0, 0);
10226 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10228 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10229 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10230 exp->__anon1.cast.exp->needCast = 1;
10231 exp->needTemplateCast = 2;
10232 newExp->needTemplateCast = 2;
10240 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10245 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10247 if(init->__anon1.exp && !init->__anon1.exp->destType)
10249 FreeType(init->__anon1.exp->destType);
10250 init->__anon1.exp->destType = type;
10254 if(init->__anon1.exp)
10256 ProcessExpressionType(init->__anon1.exp);
10257 init->isConstant = init->__anon1.exp->isConstant;
10263 struct Expression * exp = init->__anon1.exp;
10264 struct Instantiation * inst = exp->__anon1.instance;
10265 struct MembersInit * members;
10268 init->__anon1.list = MkList();
10271 for(members = (*inst->members).first; members; members = members->next)
10273 if(members->type == 0)
10275 struct MemberInit * member;
10277 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10279 ListAdd(init->__anon1.list, member->initializer);
10280 member->initializer = (((void *)0));
10285 FreeExpression(exp);
10289 struct Initializer * i;
10290 struct Type * initializerType = (((void *)0));
10291 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10292 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10293 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10294 int subMemberStackPos = 0;
10296 if(type && type->kind == 12)
10297 initializerType = Dereference(type);
10298 else if(type && (type->kind == 9 || type->kind == 10))
10299 initializerType = type->__anon1.__anon1.members.first;
10300 for(i = (*init->__anon1.list).first; i; i = i->next)
10302 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10304 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10307 if(!curMember->dataType)
10308 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10309 initializerType = curMember->dataType;
10312 ProcessInitializer(i, initializerType);
10313 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10314 initializerType = initializerType->next;
10316 init->isConstant = 0;
10318 if(type && type->kind == 12)
10319 FreeType(initializerType);
10320 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))
10322 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10329 void PopulateInstance(struct Instantiation * inst)
10331 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10332 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10333 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10334 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10337 inst->members = MkListOne(MkMembersInitList(memberList));
10339 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10340 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10342 if(!dataMember->isProperty)
10344 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10345 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10348 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10349 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10350 struct Type * type;
10351 void * ptr = inst->data + dataMember->offset;
10352 char * result = (((void *)0));
10354 exp->loc = member->loc = inst->loc;
10355 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10356 if(!dataMember->dataType)
10357 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10358 type = dataMember->dataType;
10359 if(type->kind == 8)
10361 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10363 if(_class->type == 4)
10365 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10369 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10370 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10372 for(item = e->values.first; item; item = item->next)
10374 if(item->data == GetEnumValue(_class, ptr))
10376 result = item->name;
10383 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10385 exp->destType = MkClassType(_class->fullName);
10386 ProcessExpressionType(exp);
10389 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10391 if(!_class->dataType)
10392 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10393 type = _class->dataType;
10402 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10408 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10414 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10420 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10426 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10431 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10434 ListAdd(memberList, member);
10440 int ComputeTypeSize(struct Type * type);
10442 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10444 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10445 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10447 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))
10449 int unionMemberOffset = 0;
10454 member->memberOffset = 0;
10455 if(targetBits < sizeof(void *) * 8)
10456 member->structAlignment = 0;
10458 else if(targetBits < sizeof(void *) * 8)
10459 _class->structAlignment = 0;
10460 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10461 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10462 if(!member && _class->destructionWatchOffset)
10463 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10465 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10467 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10469 if(!dataMember->isProperty)
10471 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10473 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10479 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10481 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10483 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10485 if(!isMember && _class->type == 2 && dataMember->dataType)
10487 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10491 ComputeTypeSize(dataMember->dataType);
10492 if(bitMember->pos == -1)
10493 bitMember->pos = _class->memberOffset;
10494 if(!bitMember->size)
10495 bitMember->size = dataMember->dataType->size * 8;
10496 _class->memberOffset = bitMember->pos + bitMember->size;
10497 for(d = 0; d < bitMember->size; d++)
10503 bitMember->mask = mask << bitMember->pos;
10505 else if(dataMember->type == 0 && dataMember->dataType)
10510 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)))
10511 ComputeTypeSize(dataMember->dataType);
10512 if(dataMember->dataType->bitFieldCount)
10514 bitFields += dataMember->dataType->bitFieldCount;
10521 int size = (bitFields + 7) / 8;
10525 int __simpleStruct0;
10529 short __simpleStruct0;
10531 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10532 if(member->memberOffset % alignment)
10533 member->memberOffset += alignment - (member->memberOffset % alignment);
10535 dataMember->offset = member->memberOffset;
10536 if(member->type == 1)
10537 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10540 member->memberOffset += size;
10547 short __simpleStruct0;
10549 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10550 if(_class->memberOffset % alignment)
10551 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10553 dataMember->offset = _class->memberOffset;
10554 _class->memberOffset += size;
10558 size = dataMember->dataType->size;
10559 alignment = dataMember->dataType->alignment;
10563 int __simpleStruct0;
10567 short __simpleStruct0;
10569 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10570 if(member->memberOffset % alignment)
10571 member->memberOffset += alignment - (member->memberOffset % alignment);
10573 dataMember->offset = member->memberOffset;
10574 if(member->type == 1)
10575 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10578 member->memberOffset += size;
10585 short __simpleStruct0;
10587 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10588 if(_class->memberOffset % alignment)
10589 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10591 dataMember->offset = _class->memberOffset;
10592 _class->memberOffset += size;
10599 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10600 alignment = dataMember->structAlignment;
10603 int __simpleStruct0;
10607 short __simpleStruct0;
10609 if(member->memberOffset % alignment)
10610 member->memberOffset += alignment - (member->memberOffset % alignment);
10611 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10613 dataMember->offset = member->memberOffset;
10614 if(member->type == 1)
10615 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10617 member->memberOffset += dataMember->memberOffset;
10623 short __simpleStruct0;
10625 if(_class->memberOffset % alignment)
10626 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10627 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10629 dataMember->offset = _class->memberOffset;
10630 _class->memberOffset += dataMember->memberOffset;
10638 int size = (bitFields + 7) / 8;
10642 int __simpleStruct0;
10646 short __simpleStruct0;
10648 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10649 if(member->memberOffset % alignment)
10650 member->memberOffset += alignment - (member->memberOffset % alignment);
10652 if(member->type == 1)
10653 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10656 member->memberOffset += size;
10663 short __simpleStruct0;
10665 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10666 if(_class->memberOffset % alignment)
10667 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10669 _class->memberOffset += size;
10674 if(member && member->type == 1)
10676 member->memberOffset = unionMemberOffset;
10680 if(_class->type != 2)
10684 if(_class->structAlignment)
10686 if(_class->memberOffset % _class->structAlignment)
10687 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10689 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10692 struct __ecereNameSpace__ecere__com__Property * prop;
10694 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10696 if(prop->isProperty && prop->isWatchable)
10698 prop->watcherOffset = _class->structSize;
10699 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10704 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10706 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10708 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10710 if(deriv->computeSize)
10712 deriv->offset = _class->structSize;
10713 deriv->memberOffset = 0;
10714 deriv->structSize = deriv->offset;
10715 ComputeClassMembers(deriv, 0);
10723 FinishTemplatesContext(context);
10726 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)
10728 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10729 unsigned int totalSize = 0;
10730 unsigned int maxSize = 0;
10733 struct __ecereNameSpace__ecere__com__DataMember * member;
10735 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10739 if(!isMember && _class->base)
10741 maxSize = _class->structSize;
10743 if(_class->type == 1 || _class->type == 5)
10744 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10747 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10749 if(maxSize > baseSize)
10750 maxSize -= baseSize;
10756 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10758 if(!member->isProperty)
10760 switch(member->type)
10764 if(member->dataTypeString)
10766 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10767 struct Declarator * decl;
10769 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10770 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10771 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10772 if(!member->dataType)
10773 member->dataType = ProcessType(specs, decl);
10774 ReplaceThisClassSpecifiers(specs, topClass);
10776 struct Type * type = ProcessType(specs, decl);
10778 DeclareType(neededBy, member->dataType, 1, 0);
10781 ComputeTypeSize(member->dataType);
10782 size = member->dataType->size;
10783 alignment = member->dataType->alignment;
10786 if(totalSize % alignment)
10787 totalSize += alignment - (totalSize % alignment);
10796 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10799 sprintf(id, "__anon%d", anonID++);
10801 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10802 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10803 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10804 alignment = member->structAlignment;
10807 if(totalSize % alignment)
10808 totalSize += alignment - (totalSize % alignment);
10818 unsigned int __simpleStruct0;
10820 if(topMember && topMember->type == 1)
10821 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10823 *retSize += totalSize;
10825 else if(totalSize < maxSize && _class->type != 1000)
10827 int autoPadding = 0;
10829 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10830 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10831 if(totalSize + autoPadding < maxSize)
10833 char sizeString[50];
10835 sprintf(sizeString, "%d", maxSize - totalSize);
10836 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10842 FinishTemplatesContext(context);
10843 return topMember ? topMember->memberID : _class->memberID;
10846 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)
10851 CheckConstCompatibility(source, dest, 1);
10852 if(source->kind == 20 && dest->kind != 20)
10854 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10859 if(dest->kind == 20 && source->kind != 20)
10861 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10866 if(dest->classObjectType == 2 && dest->kind != 11)
10868 if(source->classObjectType != 3)
10872 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10880 if(source->kind != 11 && source->classObjectType == 3)
10882 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10885 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10887 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))
10890 if(dest->kind == 14 && source->kind != 0)
10892 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))
10894 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))
10896 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10898 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10900 if(conversions != (((void *)0)))
10902 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10907 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10909 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10911 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10913 if(sourceBase == destBase)
10917 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))
10921 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))
10923 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10930 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10934 if(source->kind == 8)
10936 struct __ecereNameSpace__ecere__com__Class * _class;
10938 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10940 struct __ecereNameSpace__ecere__com__Property * convert;
10942 for(convert = _class->conversions.first; convert; convert = convert->next)
10944 if(convert->memberAccess == 1 || _class->module == privateModule)
10946 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10948 if(!convert->dataType)
10949 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10950 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))
10952 if(!conversions && !convert->Get)
10954 else if(conversions != (((void *)0)))
10956 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))
10960 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10962 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10971 if(dest->kind == 8)
10973 struct __ecereNameSpace__ecere__com__Class * _class;
10975 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10977 struct __ecereNameSpace__ecere__com__Property * convert;
10979 for(convert = _class->conversions.first; convert; convert = convert->next)
10981 if(convert->memberAccess == 1 || _class->module == privateModule)
10983 struct Type * constType = (((void *)0));
10984 unsigned int success = 0;
10986 if(!convert->dataType)
10987 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10988 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10990 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10992 constType = __extension__ ({
10993 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10995 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10997 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10998 ptrType->constant = 1;
11000 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
11002 if(!conversions && !convert->Set)
11004 else if(conversions != (((void *)0)))
11006 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))
11010 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
11012 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
11018 FreeType(constType);
11024 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11026 if(!dest->__anon1._class->__anon1.registered->dataType)
11027 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11028 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11030 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))
11037 if(source->kind == 8)
11039 struct __ecereNameSpace__ecere__com__Class * _class;
11041 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11043 struct __ecereNameSpace__ecere__com__Property * convert;
11045 for(convert = _class->conversions.first; convert; convert = convert->next)
11047 if(convert->memberAccess == 1 || _class->module == privateModule)
11049 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11051 if(!convert->dataType)
11052 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11053 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))
11055 if(!conversions && !convert->Get)
11057 else if(conversions != (((void *)0)))
11059 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))
11063 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11065 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11073 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11075 if(!source->__anon1._class->__anon1.registered->dataType)
11076 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11077 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11079 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))
11081 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11087 if(source->kind == 8 || source->kind == 19)
11089 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11091 else if(dest->kind == 7 && source->kind == 6)
11093 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11095 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11097 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11099 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11101 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11103 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))
11105 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))
11107 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)))
11109 struct Type * paramSource, * paramDest;
11111 if(dest->kind == 16)
11112 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11113 if(source->kind == 16)
11114 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11115 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11116 dest = dest->__anon1.type;
11117 if(source->kind == 13 && source->__anon1.type->kind == 11)
11118 source = source->__anon1.type;
11119 if(dest->kind == 16)
11120 dest = dest->__anon1.__anon3.method->dataType;
11121 if(source->kind == 16)
11122 source = source->__anon1.__anon3.method->dataType;
11123 paramSource = source->__anon1.__anon2.params.first;
11124 if(paramSource && paramSource->kind == 0)
11125 paramSource = (((void *)0));
11126 paramDest = dest->__anon1.__anon2.params.first;
11127 if(paramDest && paramDest->kind == 0)
11128 paramDest = (((void *)0));
11129 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11131 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))))
11133 if(paramDest && paramDest->kind == 8)
11134 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11136 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11139 paramDest = paramDest->next;
11141 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11143 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11145 if(dest->__anon1.__anon2.thisClass)
11147 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11149 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11155 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11157 if(owningClassDest)
11158 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11160 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11164 paramSource = paramSource->next;
11168 if(dest->__anon1.__anon2.thisClass)
11170 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11172 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11178 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11180 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11186 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11188 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11192 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11193 for(; paramDest; paramDest = paramDest->next)
11197 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11201 struct Type * paramDestType = paramDest;
11202 struct Type * paramSourceType = paramSource;
11203 struct Type * type = paramDestType;
11205 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11208 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11209 struct __ecereNameSpace__ecere__com__Class * sClass;
11211 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11214 if(sClass->templateClass)
11215 sClass = sClass->templateClass;
11216 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11218 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11220 for(sClass = sClass->base; sClass; sClass = sClass->base)
11222 if(sClass->templateClass)
11223 sClass = sClass->templateClass;
11224 id += sClass->templateParams.count;
11235 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11237 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11240 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)))
11245 PrintType(paramDest, type, 0, 1);
11246 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11247 if(paramDestType != paramDest)
11248 FreeType(paramDestType);
11251 if(paramDestType != paramDest)
11252 FreeType(paramDestType);
11254 paramSource = paramSource->next;
11258 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11263 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11267 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11269 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))
11271 ComputeTypeSize(source->__anon1.type);
11272 ComputeTypeSize(dest->__anon1.type);
11273 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))
11281 void ComputeInstantiation(struct Expression * exp)
11283 struct Instantiation * inst = exp->__anon1.instance;
11284 struct MembersInit * members;
11285 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11286 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11287 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11288 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11289 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11290 int subMemberStackPos = 0;
11293 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11297 if(_class->type == 0 || _class->type == 5)
11299 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11300 if(_class->type == 0)
11301 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11304 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11308 for(members = (*inst->members).first; members; members = members->next)
11310 switch(members->type)
11314 if(members->__anon1.dataMembers)
11316 struct MemberInit * member;
11318 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11320 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11321 unsigned int found = 0;
11322 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11323 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11324 unsigned int dataMemberOffset;
11328 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11331 if(curMember->isProperty)
11332 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11335 dataMember = curMember;
11336 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11337 if(_class->type == 0)
11338 dataMemberOffset += _class->base->structSize;
11345 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11349 if(prop->memberAccess == 1)
11351 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11352 curClass = prop->_class;
11357 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11358 int _subMemberStackPos = 0;
11360 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11364 if(dataMember->memberAccess == 1)
11366 curMember = dataMember;
11367 curClass = dataMember->_class;
11368 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11369 subMemberStackPos = _subMemberStackPos;
11374 if(found && member->initializer && member->initializer->type == 0)
11376 struct Expression * value = member->initializer->__anon1.exp;
11377 struct Type * type = (((void *)0));
11378 unsigned int deepMember = 0;
11382 type = prop->dataType;
11384 else if(dataMember)
11386 if(!dataMember->dataType)
11387 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11388 type = dataMember->dataType;
11390 if(ident && ident->next)
11393 for(ident = ident->next; ident && type; ident = ident->next)
11395 if(type->kind == 8)
11397 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11399 type = prop->dataType;
11402 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11404 type = dataMember->dataType;
11407 else if(type->kind == 9 || type->kind == 10)
11409 struct Type * memberType;
11411 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11413 if(!strcmp(memberType->name, ident->string))
11424 FreeType(value->destType);
11425 value->destType = type;
11428 ComputeExpression(value);
11430 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11432 if(type->kind == 8)
11434 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11436 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11438 if(!_class->dataType)
11439 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11440 type = _class->dataType;
11445 void * ptr = inst->data + dataMemberOffset;
11447 if(value->type == 2)
11453 GetInt(value, (int *)ptr);
11458 GetInt64(value, (long long *)ptr);
11463 GetIntPtr(value, (intptr_t *)ptr);
11468 GetIntSize(value, (ssize_t *)ptr);
11473 GetFloat(value, (float *)ptr);
11478 GetDouble(value, (double *)ptr);
11483 else if(value->type == 1)
11485 if(type->kind == 8)
11487 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11489 if(_class->type == 1)
11491 ComputeTypeSize(type);
11492 if(value->__anon1.instance->data)
11493 memcpy(ptr, value->__anon1.instance->data, type->size);
11498 else if(prop && prop->Set != (void *)(intptr_t)1)
11500 if(value->type == 1 && value->__anon1.instance->data)
11502 if(type->kind == 8)
11504 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11506 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)))
11508 void (* Set)(void *, void *) = (void *)prop->Set;
11510 Set(inst->data, value->__anon1.instance->data);
11511 PopulateInstance(inst);
11515 else if(value->type == 2)
11521 void (* Set)(void *, double) = (void *)prop->Set;
11523 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11528 void (* Set)(void *, float) = (void *)prop->Set;
11530 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11535 void (* Set)(void *, int) = (void *)prop->Set;
11537 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11542 void (* Set)(void *, long long) = (void *)prop->Set;
11544 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11549 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11551 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11556 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11558 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11563 else if(value->type == 3)
11567 ReadString(temp, value->__anon1.__anon2.string);
11568 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11572 else if(!deepMember && type && _class->type == 3)
11576 if(value->type == 2)
11578 if(type->kind == 8)
11580 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11582 if(_class->type == 3)
11584 if(!_class->dataType)
11585 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11586 type = _class->dataType;
11594 float (* Set)(float) = (void *)prop->Set;
11596 GetFloat(member->initializer->__anon1.exp, &fValue);
11597 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11604 double (* Set)(double) = (void *)prop->Set;
11606 GetDouble(member->initializer->__anon1.exp, &dValue);
11607 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11615 else if(!deepMember && type && _class->type == 2)
11619 if(value->type == 1 && value->__anon1.instance->data)
11621 unsigned int (* Set)(void *) = (void *)prop->Set;
11623 bits = Set(value->__anon1.instance->data);
11625 else if(value->type == 2)
11629 else if(dataMember)
11631 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11632 struct Type * type;
11635 bits = (bits & ~bitMember->mask);
11636 if(!bitMember->dataType)
11637 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11638 type = bitMember->dataType;
11639 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11641 if(!type->__anon1._class->__anon1.registered->dataType)
11642 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11643 type = type->__anon1._class->__anon1.registered->dataType;
11652 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11660 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11669 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11677 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11685 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11693 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11698 bits |= part << bitMember->pos;
11704 if(_class && _class->type == 3)
11706 ComputeExpression(member->initializer->__anon1.exp);
11707 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11709 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11719 if(_class && _class->type == 2)
11721 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11726 FreeInstance(inst);
11730 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11732 if(exp->__anon1.op.op == SIZEOF)
11734 FreeExpContents(exp);
11736 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11740 if(!exp->__anon1.op.exp1)
11742 switch(exp->__anon1.op.op)
11746 struct Expression * exp2 = exp->__anon1.op.exp2;
11748 exp->__anon1.op.exp2 = (((void *)0));
11749 FreeExpContents(exp);
11750 FreeType(exp->expType);
11751 FreeType(exp->destType);
11753 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11759 FreeExpContents(exp);
11760 op1->ops.Neg(exp, op1);
11764 if(op1->ops.BitNot)
11766 FreeExpContents(exp);
11767 op1->ops.BitNot(exp, op1);
11773 FreeExpContents(exp);
11774 op1->ops.Not(exp, op1);
11781 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11783 if(Promote(op2, op1->kind, op1->type->isSigned))
11784 op2->kind = op1->kind, op2->ops = op1->ops;
11785 else if(Promote(op1, op2->kind, op2->type->isSigned))
11786 op1->kind = op2->kind, op1->ops = op2->ops;
11788 switch(exp->__anon1.op.op)
11793 FreeExpContents(exp);
11794 op1->ops.Add(exp, op1, op2);
11800 FreeExpContents(exp);
11801 op1->ops.Sub(exp, op1, op2);
11807 FreeExpContents(exp);
11808 op1->ops.Mul(exp, op1, op2);
11814 FreeExpContents(exp);
11815 op1->ops.Div(exp, op1, op2);
11821 FreeExpContents(exp);
11822 op1->ops.Mod(exp, op1, op2);
11826 if(exp->__anon1.op.exp2)
11828 if(op1->ops.BitAnd)
11830 FreeExpContents(exp);
11831 op1->ops.BitAnd(exp, op1, op2);
11838 FreeExpContents(exp);
11839 op1->ops.BitOr(exp, op1, op2);
11843 if(op1->ops.BitXor)
11845 FreeExpContents(exp);
11846 op1->ops.BitXor(exp, op1, op2);
11850 if(op1->ops.LShift)
11852 FreeExpContents(exp);
11853 op1->ops.LShift(exp, op1, op2);
11857 if(op1->ops.RShift)
11859 FreeExpContents(exp);
11860 op1->ops.RShift(exp, op1, op2);
11866 FreeExpContents(exp);
11867 op1->ops.Equ(exp, op1, op2);
11873 FreeExpContents(exp);
11874 op1->ops.Nqu(exp, op1, op2);
11880 FreeExpContents(exp);
11881 op1->ops.And(exp, op1, op2);
11887 FreeExpContents(exp);
11888 op1->ops.Or(exp, op1, op2);
11894 FreeExpContents(exp);
11895 op1->ops.Grt(exp, op1, op2);
11901 FreeExpContents(exp);
11902 op1->ops.Sma(exp, op1, op2);
11906 if(op1->ops.GrtEqu)
11908 FreeExpContents(exp);
11909 op1->ops.GrtEqu(exp, op1, op2);
11913 if(op1->ops.SmaEqu)
11915 FreeExpContents(exp);
11916 op1->ops.SmaEqu(exp, op1, op2);
11924 void ApplyAnyObjectLogic(struct Expression * e)
11926 struct Type * destType = e->destType;
11928 if(destType && (destType->classObjectType == 3))
11930 if(e && e->expType)
11932 struct Type * type = e->expType;
11933 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11935 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11937 _class = type->__anon1._class->__anon1.registered;
11939 else if(type->kind == 19)
11941 _class = FindClass("ecere::com::Class")->__anon1.registered;
11945 char string[1024] = "";
11946 struct Symbol * classSym;
11948 PrintTypeNoConst(type, string, 0, 1);
11949 classSym = FindClass(string);
11951 _class = classSym->__anon1.registered;
11953 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)))
11955 if(!_class || strcmp(_class->fullName, "char *"))
11957 struct Expression * checkedExp = e, * newExp;
11959 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11961 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11963 if(checkedExp->type == 23)
11965 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11968 checkedExp = (*checkedExp->__anon1.list).last;
11970 else if(checkedExp->type == 11)
11971 checkedExp = checkedExp->__anon1.cast.exp;
11973 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11975 newExp = checkedExp->__anon1.op.exp2;
11976 checkedExp->__anon1.op.exp2 = (((void *)0));
11977 FreeExpContents(checkedExp);
11978 if(e->expType && e->expType->passAsTemplate)
11982 ComputeTypeSize(e->expType);
11983 sprintf(size, "%d", e->expType->size);
11984 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))))));
11986 ReplaceExpContents(checkedExp, newExp);
11987 e->byReference = 1;
11989 else if(!e->byReference || (_class && _class->type == 5))
11991 struct Expression * checkedExp;
11994 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;
11996 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11998 struct Context * context = PushContext();
11999 struct Declarator * decl;
12000 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12001 char typeString[1024];
12002 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12004 typeString[0] = '\0';
12006 newExp->prev = (((void *)0));
12007 newExp->next = (((void *)0));
12008 newExp->expType = (((void *)0));
12009 PrintTypeNoConst(e->expType, typeString, 0, 1);
12010 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12011 newExp->destType = ProcessType(specs, decl);
12012 curContext = context;
12016 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
12019 sprintf(name, "__internalValue%03X", internalValueCounter++);
12020 if(!curCompound->__anon1.compound.declarations)
12021 curCompound->__anon1.compound.declarations = MkList();
12022 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12023 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12024 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12025 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12028 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12030 struct Type * type = e->destType;
12032 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12033 CopyTypeInto(e->destType, type);
12034 e->destType->refCount = 1;
12035 e->destType->classObjectType = 0;
12038 e->__anon1.compound->__anon1.compound.context = context;
12039 PopContext(context);
12040 curContext = context->parent;
12044 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12046 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12048 if(checkedExp->type == 23)
12050 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12053 checkedExp = (*checkedExp->__anon1.list).last;
12055 else if(checkedExp->type == 11)
12056 checkedExp = checkedExp->__anon1.cast.exp;
12059 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12061 *operand = *checkedExp;
12062 __ecereMethod_Expression_Clear(checkedExp);
12063 checkedExp->destType = ProcessTypeString("void *", 0);
12064 checkedExp->expType = checkedExp->destType;
12065 checkedExp->destType->refCount++;
12066 checkedExp->type = 4;
12067 checkedExp->__anon1.op.op = '&';
12068 checkedExp->__anon1.op.exp1 = (((void *)0));
12069 checkedExp->__anon1.op.exp2 = operand;
12078 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))))
12080 if(e->expType->classObjectType && destType && destType->classObjectType)
12086 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12089 thisExp->prev = (((void *)0));
12090 thisExp->next = (((void *)0));
12091 __ecereMethod_Expression_Clear(e);
12093 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12094 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12095 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12097 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12098 CopyTypeInto(e->expType, thisExp->expType);
12099 e->expType->byReference = 0;
12100 e->expType->refCount = 1;
12101 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))
12103 e->expType->classObjectType = 0;
12108 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12110 if(destType->kind == 14)
12112 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12114 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))
12116 unsigned int byReference = e->expType->byReference;
12117 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12118 struct Declarator * decl;
12119 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12120 char typeString[1024];
12121 struct Type * type;
12122 int backupClassObjectType;
12123 unsigned int backupByReference;
12125 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12129 backupClassObjectType = type->classObjectType;
12130 backupByReference = type->byReference;
12131 type->classObjectType = 0;
12132 type->byReference = 0;
12133 typeString[0] = '\0';
12134 PrintType(type, typeString, 0, 1);
12135 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12136 type->classObjectType = backupClassObjectType;
12137 type->byReference = backupByReference;
12139 thisExp->prev = (((void *)0));
12140 thisExp->next = (((void *)0));
12141 __ecereMethod_Expression_Clear(e);
12142 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)))
12144 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12147 destType->refCount++;
12149 e->__anon1.op.op = '*';
12150 e->__anon1.op.exp1 = (((void *)0));
12151 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12152 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12153 CopyTypeInto(t, thisExp->destType);
12154 t->passAsTemplate = 0;
12155 FreeType(thisExp->destType);
12156 thisExp->destType = t;
12157 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12158 CopyTypeInto(t, destType);
12159 t->passAsTemplate = passAsTemplate;
12160 FreeType(destType);
12162 destType->refCount = 0;
12163 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12164 CopyTypeInto(e->expType, type);
12165 if(type->passAsTemplate)
12167 e->expType->classObjectType = 0;
12168 e->expType->passAsTemplate = 0;
12170 e->expType->byReference = 0;
12171 e->expType->refCount = 1;
12176 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12177 e->__anon1.cast.exp = thisExp;
12178 e->byReference = 1;
12183 FreeType(e->destType);
12184 e->destType = destType;
12185 destType->refCount++;
12190 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12192 struct __ecereNameSpace__ecere__com__Class * _class;
12193 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12195 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12196 ComputeModuleClasses(subModule->data);
12197 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12198 ComputeClassMembers(_class, 0);
12201 int ComputeTypeSize(struct Type * type)
12203 unsigned int size = type ? type->size : 0;
12205 if(!size && type && !type->computing)
12207 type->computing = 1;
12211 type->alignment = size = sizeof(char);
12214 type->alignment = size = sizeof(char);
12217 type->alignment = size = sizeof(int);
12220 type->alignment = size = sizeof(long long);
12223 type->alignment = size = targetBits / 8;
12224 type->pointerAlignment = 1;
12227 type->alignment = size = targetBits / 8;
12228 type->pointerAlignment = 1;
12231 type->alignment = size = sizeof(long);
12234 type->alignment = size = sizeof(short);
12237 type->alignment = size = sizeof(float);
12240 type->alignment = size = sizeof(double);
12244 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12246 if(_class && _class->type == 1)
12248 ComputeClassMembers(_class, 0);
12249 type->alignment = _class->structAlignment;
12250 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12251 size = _class->structSize;
12252 if(type->alignment && size % type->alignment)
12253 size += type->alignment - (size % type->alignment);
12255 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12257 if(!_class->dataType)
12258 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12259 size = type->alignment = ComputeTypeSize(_class->dataType);
12263 size = type->alignment = targetBits / 8;
12264 type->pointerAlignment = 1;
12270 size = type->alignment = targetBits / 8;
12271 type->pointerAlignment = 1;
12274 if(type->__anon1.__anon4.arraySizeExp)
12276 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12277 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12278 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)))
12280 struct Location oldLoc = yylloc;
12281 char expression[10240];
12283 expression[0] = '\0';
12284 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12285 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12287 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12288 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12291 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12293 else if(type->__anon1.__anon4.enumClass)
12295 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12297 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12300 type->__anon1.__anon4.arraySize = 0;
12304 type->__anon1.__anon4.arraySize = 0;
12306 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12307 if(type->__anon1.type)
12309 type->alignment = type->__anon1.type->alignment;
12310 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12315 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12317 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12319 if(symbol && symbol->type)
12321 ComputeTypeSize(symbol->type);
12322 size = symbol->type->size;
12327 struct Type * member;
12329 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12331 int __simpleStruct0, __simpleStruct1;
12332 unsigned int addSize = ComputeTypeSize(member);
12334 member->offset = size;
12335 if(member->alignment && size % member->alignment)
12336 member->offset += member->alignment - (size % member->alignment);
12337 size = member->offset;
12338 if(member->pointerAlignment && type->size <= 4)
12339 type->pointerAlignment = 1;
12340 else if(!member->pointerAlignment && member->alignment >= 8)
12341 type->pointerAlignment = 0;
12342 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12345 if(type->alignment && size % type->alignment)
12346 size += type->alignment - (size % type->alignment);
12352 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12354 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12356 if(symbol && symbol->type)
12358 ComputeTypeSize(symbol->type);
12359 size = symbol->type->size;
12360 type->alignment = symbol->type->alignment;
12365 struct Type * member;
12367 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12369 int __simpleStruct0, __simpleStruct1;
12370 unsigned int addSize = ComputeTypeSize(member);
12372 member->offset = size;
12373 if(member->alignment && size % member->alignment)
12374 member->offset += member->alignment - (size % member->alignment);
12375 size = member->offset;
12376 if(member->pointerAlignment && type->size <= 4)
12377 type->pointerAlignment = 1;
12378 else if(!member->pointerAlignment && member->alignment >= 8)
12379 type->pointerAlignment = 0;
12380 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12381 size = ((size > addSize) ? size : addSize);
12383 if(type->alignment && size % type->alignment)
12384 size += type->alignment - (size % type->alignment);
12390 struct TemplateParameter * param = type->__anon1.templateParameter;
12391 struct Type * baseType = ProcessTemplateParameterType(param);
12395 size = ComputeTypeSize(baseType);
12396 type->alignment = baseType->alignment;
12397 type->pointerAlignment = baseType->pointerAlignment;
12400 type->alignment = size = sizeof(uint64);
12405 type->alignment = size = sizeof(enum
12413 type->alignment = size = targetBits / 8;
12414 type->pointerAlignment = 1;
12419 type->computing = 0;
12424 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12426 struct External * external = (((void *)0));
12427 struct Symbol * classSym = FindClass(name);
12428 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12429 struct Specifier * curSpec = (((void *)0));
12431 if(!inCompiler || !classSym)
12432 return (((void *)0));
12433 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12434 return (((void *)0));
12435 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12436 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12437 external = classSym->__anon2.__anon1.structExternal;
12438 if(external && external->__anon1.declaration)
12440 struct Specifier * spec;
12442 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12443 if(spec->type == 3 || spec->type == 4)
12446 curDeclarations = spec->__anon1.__anon2.definitions;
12450 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12452 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12453 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12454 char structName[1024];
12455 unsigned int addedPadding = 0;
12457 classSym->declaring++;
12458 if(strchr(classSym->string, '<'))
12460 if(classSym->__anon1.registered->templateClass)
12462 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12463 classSym->declaring--;
12468 FullClassNameCat(structName, name, 0);
12469 classSym->declaredStructSym = 1;
12470 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12472 unsigned int add = 0;
12476 external = MkExternalDeclaration((((void *)0)));
12477 classSym->__anon2.__anon1.structExternal = external;
12478 external->symbol = classSym;
12483 declarations = MkList();
12484 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12486 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12488 FreeList(declarations, (void *)(FreeClassDef));
12489 declarations = (((void *)0));
12491 if(classSym->__anon1.registered->type != 5 && !declarations)
12493 FreeExternal(external);
12494 external = (((void *)0));
12495 classSym->__anon2.__anon1.structExternal = (((void *)0));
12500 curSpec->__anon1.__anon2.definitions = declarations;
12503 char className[1024];
12505 strcpy(className, "__ecereClass_");
12506 FullClassNameCat(className, classSym->string, 1);
12507 specifiers = MkList();
12508 declarators = MkList();
12509 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12510 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12513 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12516 classSym->declaring--;
12518 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12520 classSym->declaredStructSym = 1;
12521 if(classSym->__anon1.registered)
12522 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12523 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12525 struct Specifier * spec;
12527 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12529 if(spec->__anon1.__anon2.definitions)
12530 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12534 if(inCompiler && neededBy && (external || !classSym->imported))
12538 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12539 external->symbol = classSym;
12540 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12544 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12546 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12547 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12550 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12555 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)
12557 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12558 unsigned int found = 0;
12559 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12560 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12561 unsigned int freeType = 0;
12563 yylloc = member->loc;
12568 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12572 dataMember = *curMember;
12578 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12579 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12580 int _subMemberStackPos = 0;
12583 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12586 dataMember = thisMember;
12587 if(curMember && thisMember->memberAccess == 1)
12589 *curMember = thisMember;
12590 *curClass = thisMember->_class;
12591 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12592 *subMemberStackPos = _subMemberStackPos;
12598 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12599 if(method && method->type == 1)
12602 method = (((void *)0));
12607 struct Type * type = (((void *)0));
12611 if(!dataMember->dataType && dataMember->dataTypeString)
12613 struct Context * context = SetupTemplatesContext(_class);
12615 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12616 FinishTemplatesContext(context);
12618 type = dataMember->dataType;
12622 if(!method->dataType)
12623 ProcessMethodType(method);
12624 type = method->dataType;
12626 if(ident && ident->next)
12628 for(ident = ident->next; ident && type; ident = ident->next)
12630 if(type->kind == 8)
12632 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12634 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12636 type = dataMember->dataType;
12638 else if(type->kind == 9 || type->kind == 10)
12640 struct Type * memberType;
12642 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12644 if(!strcmp(memberType->name, ident->string))
12653 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12656 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12657 struct __ecereNameSpace__ecere__com__Class * sClass;
12659 for(sClass = _class; sClass; sClass = sClass->base)
12662 if(sClass->templateClass)
12663 sClass = sClass->templateClass;
12664 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12666 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12668 for(sClass = sClass->base; sClass; sClass = sClass->base)
12670 if(sClass->templateClass)
12671 sClass = sClass->templateClass;
12672 id += sClass->templateParams.count;
12683 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12685 if(arg.__anon1.__anon1.dataTypeString)
12687 unsigned int constant = type->constant;
12689 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12690 if(type->kind == 8 && constant)
12691 type->constant = 1;
12692 else if(type->kind == 13)
12694 struct Type * t = type->__anon1.type;
12696 while(t->kind == 13)
12697 t = t->__anon1.type;
12699 t->constant = constant;
12702 if(type && _class->templateClass)
12703 type->passAsTemplate = 1;
12710 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12712 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12713 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12714 int paramCount = 0;
12715 int lastParam = -1;
12716 char templateString[1024];
12717 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12719 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12720 for(cClass = expClass; cClass; cClass = cClass->base)
12724 if(cClass->templateClass)
12725 cClass = cClass->templateClass;
12726 for(param = cClass->templateParams.first; param; param = param->next)
12729 struct __ecereNameSpace__ecere__com__Class * sClass;
12730 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12732 for(sClass = cClass->base; sClass; sClass = sClass->base)
12734 if(sClass->templateClass)
12735 sClass = sClass->templateClass;
12736 id += sClass->templateParams.count;
12738 arg = expClass->templateArgs[id];
12739 for(sClass = _class; sClass; sClass = sClass->base)
12741 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12743 struct __ecereNameSpace__ecere__com__Class * nextClass;
12745 if(sClass->templateClass)
12746 sClass = sClass->templateClass;
12747 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12749 if(nextClass->templateClass)
12750 nextClass = nextClass->templateClass;
12751 p += nextClass->templateParams.count;
12753 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12755 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12757 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12759 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12760 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12767 char argument[256];
12769 argument[0] = '\0';
12770 switch(param->type)
12774 char expString[1024];
12775 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12776 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12777 struct Expression * exp;
12778 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12780 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12781 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12782 ProcessExpressionType(exp);
12783 ComputeExpression(exp);
12784 expString[0] = '\0';
12785 PrintExpression(exp, expString);
12786 strcat(argument, expString);
12787 FreeExpression(exp);
12792 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12797 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12798 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12805 strcat(templateString, ", ");
12806 if(lastParam != p - 1)
12808 strcat(templateString, param->name);
12809 strcat(templateString, " = ");
12811 strcat(templateString, argument);
12820 int len = strlen(templateString);
12822 if(templateString[len - 1] == '<')
12826 if(templateString[len - 1] == '>')
12827 templateString[len++] = ' ';
12828 templateString[len++] = '>';
12830 templateString[len++] = '\0';
12833 struct Context * context = SetupTemplatesContext(_class);
12837 type = ProcessTypeString(templateString, 0);
12839 FinishTemplatesContext(context);
12842 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12844 ProcessExpressionType(member->initializer->__anon1.exp);
12845 if(!member->initializer->__anon1.exp->expType)
12849 char expString[10240];
12851 expString[0] = '\0';
12852 PrintExpression(member->initializer->__anon1.exp, expString);
12853 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12854 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12857 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12859 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12862 else if(member->initializer)
12864 ProcessInitializer(member->initializer, type);
12871 if(_class && _class->type == 3)
12873 if(member->initializer)
12875 struct Type * type = MkClassType(_class->fullName);
12877 ProcessInitializer(member->initializer, type);
12883 if(member->initializer)
12885 ProcessInitializer(member->initializer, (((void *)0)));
12891 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12895 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12897 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12901 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12906 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12908 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12910 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)))
12912 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12914 if(_class->type == 4)
12916 struct __ecereNameSpace__ecere__sys__OldList converts =
12920 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12923 if(!_class->symbol)
12924 _class->symbol = FindClass(_class->fullName);
12925 type->__anon1._class = _class->symbol;
12926 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))
12928 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12929 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12933 struct __ecereNameSpace__ecere__com__Class * baseClass;
12935 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12937 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12939 for(value = e->values.first; value; value = value->next)
12941 if(!strcmp(value->name, string))
12946 FreeType(sourceExp->expType);
12947 sourceExp->isConstant = 1;
12948 sourceExp->expType = MkClassType(baseClass->fullName);
12949 if(inCompiler || inPreCompiler || inDebugger)
12951 char constant[256];
12953 FreeExpContents(sourceExp);
12954 sourceExp->type = 2;
12955 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12956 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12958 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12959 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12961 while(converts.first)
12963 struct Conversion * convert = converts.first;
12965 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12966 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12968 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12975 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12976 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12979 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)))
12980 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12985 void ComputeExpression(struct Expression * exp)
12991 struct Identifier * id = exp->__anon1.__anon1.identifier;
12993 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12995 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12997 if(c && c->type == 4)
12999 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13003 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13004 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13006 for(value = e->values.first; value; value = value->next)
13008 if(!strcmp(value->name, id->string))
13013 const char * dts = c->dataTypeString;
13015 FreeExpContents(exp);
13017 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13026 ComputeInstantiation(exp);
13031 struct Expression * exp1, * exp2 = (((void *)0));
13032 struct Operand op1 =
13039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13042 struct Operand op2 =
13049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13053 if(exp->__anon1.op.exp2)
13055 struct Expression * e = exp->__anon1.op.exp2;
13057 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13059 if(e->type == 5 || e->type == 32 || e->type == 23)
13062 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13064 e = (*e->__anon1.list).last;
13067 if(exp->__anon1.op.op == 261 && e && e->expType)
13069 if(e->type == 3 && e->__anon1.__anon2.string)
13071 char * string = e->__anon1.__anon2.string;
13072 int len = strlen(string);
13073 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13075 len = UnescapeString(tmp, string + 1, len - 2);
13076 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13077 FreeExpContents(exp);
13079 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13083 struct Type * type = e->expType;
13086 FreeExpContents(exp);
13088 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13094 ComputeExpression(exp->__anon1.op.exp2);
13096 if(exp->__anon1.op.exp1)
13098 ComputeExpression(exp->__anon1.op.exp1);
13099 exp1 = exp->__anon1.op.exp1;
13100 exp2 = exp->__anon1.op.exp2;
13101 op1 = GetOperand(exp1);
13103 op1.type->refCount++;
13106 op2 = GetOperand(exp2);
13108 op2.type->refCount++;
13113 exp1 = exp->__anon1.op.exp2;
13114 op1 = GetOperand(exp1);
13116 op1.type->refCount++;
13118 CallOperator(exp, exp1, exp2, &op1, &op2);
13120 FreeType(op1.type);
13122 FreeType(op2.type);
13128 struct Expression * e, * n;
13130 for(e = (*exp->__anon1.list).first; e; e = n)
13135 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13136 struct Expression * prev = exp->prev;
13137 struct Expression * next = exp->next;
13139 ComputeExpression(e);
13140 FreeType(exp->expType);
13141 FreeType(exp->destType);
13145 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13146 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13157 struct Expression * memberExp = exp->__anon1.member.exp;
13158 struct Identifier * memberID = exp->__anon1.member.member;
13159 struct Type * type;
13161 ComputeExpression(exp->__anon1.member.exp);
13162 type = exp->__anon1.member.exp->expType;
13165 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)));
13166 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13167 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13168 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13170 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13171 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13175 struct Symbol * classSym;
13178 PrintTypeNoConst(type, string, 0, 1);
13179 classSym = FindClass(string);
13180 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13182 if(exp->__anon1.member.member)
13184 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13186 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13188 if(!prop && !member && _class && exp->__anon1.member.member)
13190 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13192 convertTo = _class;
13193 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13194 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13200 struct Type * type = prop->dataType;
13202 if(_class->type == 3)
13204 if(type->kind == 8)
13206 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13208 if(_class->type == 3)
13210 if(!_class->dataType)
13211 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13212 type = _class->dataType;
13220 float (* Get)(float) = (void *)prop->Get;
13222 GetFloat(exp->__anon1.member.exp, &value);
13223 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13230 double (* Get)(double);
13232 GetDouble(exp->__anon1.member.exp, &value);
13234 Get = (void *)prop->Set;
13236 Get = (void *)prop->Get;
13237 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13247 struct Expression * value = exp->__anon1.member.exp;
13248 struct Type * type;
13250 if(!prop->dataType)
13251 ProcessPropertyType(prop);
13252 type = prop->dataType;
13256 else if(_class->type == 1)
13262 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13264 if(propertyClass->type == 1 && value->type == 1)
13266 void (* Set)(void *, void *) = (void *)prop->Set;
13268 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13269 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13270 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13271 exp->__anon1.instance->loc = exp->loc;
13273 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13274 PopulateInstance(exp->__anon1.instance);
13281 void (* Set)(void *, int) = (void *)prop->Set;
13283 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13284 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13285 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13286 exp->__anon1.instance->loc = exp->loc;
13288 GetInt(value, &intValue);
13289 Set(exp->__anon1.instance->data, intValue);
13290 PopulateInstance(exp->__anon1.instance);
13295 long long intValue;
13296 void (* Set)(void *, long long) = (void *)prop->Set;
13298 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13299 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13300 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13301 exp->__anon1.instance->loc = exp->loc;
13303 GetInt64(value, &intValue);
13304 Set(exp->__anon1.instance->data, intValue);
13305 PopulateInstance(exp->__anon1.instance);
13311 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13313 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13314 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13315 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13316 exp->__anon1.instance->loc = exp->loc;
13318 GetIntPtr(value, &intValue);
13319 Set(exp->__anon1.instance->data, intValue);
13320 PopulateInstance(exp->__anon1.instance);
13326 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13328 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13329 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13330 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13331 exp->__anon1.instance->loc = exp->loc;
13333 GetIntSize(value, &intValue);
13334 Set(exp->__anon1.instance->data, intValue);
13335 PopulateInstance(exp->__anon1.instance);
13341 void (* Set)(void *, float) = (void *)prop->Set;
13343 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13344 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13345 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13346 exp->__anon1.instance->loc = exp->loc;
13348 GetFloat(value, &floatValue);
13349 Set(exp->__anon1.instance->data, floatValue);
13350 PopulateInstance(exp->__anon1.instance);
13355 double doubleValue;
13356 void (* Set)(void *, double) = (void *)prop->Set;
13358 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13359 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13360 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13361 exp->__anon1.instance->loc = exp->loc;
13363 GetDouble(value, &doubleValue);
13364 Set(exp->__anon1.instance->data, doubleValue);
13365 PopulateInstance(exp->__anon1.instance);
13370 else if(_class->type == 2)
13376 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13378 if(propertyClass->type == 1 && value->__anon1.instance->data)
13380 unsigned int (* Set)(void *) = (void *)prop->Set;
13381 unsigned int bits = Set(value->__anon1.instance->data);
13383 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13387 else if(_class->type == 2)
13389 unsigned int value;
13390 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13393 GetUInt(exp->__anon1.member.exp, &value);
13395 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13404 if(_class->type == 2)
13406 unsigned int value;
13408 GetUInt(exp->__anon1.member.exp, &value);
13413 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13415 if(_class->type == 1)
13417 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13419 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13420 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13421 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13422 exp->__anon1.instance->loc = exp->loc;
13424 Get(value, exp->__anon1.instance->data);
13425 PopulateInstance(exp->__anon1.instance);
13427 else if(_class->type == 2)
13429 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13430 uint64 bits = Get(value);
13432 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13439 else if(_class->type == 1)
13441 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13447 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13449 if(_class->type == 1 && value)
13451 void (* Get)(void *, void *) = (void *)prop->Get;
13453 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13454 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13455 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13456 exp->__anon1.instance->loc = exp->loc;
13458 Get(value, exp->__anon1.instance->data);
13459 PopulateInstance(exp->__anon1.instance);
13470 exp->isConstant = 0;
13479 FreeExpression(memberExp);
13480 FreeIdentifier(memberID);
13486 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13488 FreeExpContents(exp);
13489 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13496 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13498 if(classSym && classSym->__anon1.registered)
13500 if(classSym->__anon1.registered->fixed)
13502 FreeSpecifier(exp->__anon1._class);
13503 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13508 char className[1024];
13510 strcpy(className, "__ecereClass_");
13511 FullClassNameCat(className, classSym->string, 1);
13512 DeclareClass(curExternal, classSym, className);
13513 FreeExpContents(exp);
13515 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13516 exp->__anon1.member.member = MkIdentifier("structSize");
13523 struct Type * type;
13524 struct Expression * e = exp;
13526 if(exp->type == 11)
13528 if(exp->__anon1.cast.exp)
13529 ComputeExpression(exp->__anon1.cast.exp);
13530 e = exp->__anon1.cast.exp;
13532 if(e && exp->expType)
13534 type = exp->expType;
13535 if(type->kind == 8)
13537 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13539 if(_class && (_class->type == 3 || _class->type == 2))
13541 if(!_class->dataType)
13542 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13543 type = _class->dataType;
13552 char value = (char)0;
13554 if(GetChar(e, &value))
13556 FreeExpContents(exp);
13557 exp->__anon1.__anon1.constant = PrintChar(value);
13563 unsigned char value = (unsigned char)0;
13565 if(GetUChar(e, &value))
13567 FreeExpContents(exp);
13568 exp->__anon1.__anon1.constant = PrintUChar(value);
13576 short value = (short)0;
13578 if(GetShort(e, &value))
13580 FreeExpContents(exp);
13581 exp->__anon1.__anon1.constant = PrintShort(value);
13587 unsigned short value = (unsigned short)0;
13589 if(GetUShort(e, &value))
13591 FreeExpContents(exp);
13592 exp->__anon1.__anon1.constant = PrintUShort(value);
13602 if(GetInt(e, &value))
13604 FreeExpContents(exp);
13605 exp->__anon1.__anon1.constant = PrintInt(value);
13611 unsigned int value = 0;
13613 if(GetUInt(e, &value))
13615 FreeExpContents(exp);
13616 exp->__anon1.__anon1.constant = PrintUInt(value);
13624 long long value = 0;
13626 if(GetInt64(e, &value))
13628 FreeExpContents(exp);
13629 exp->__anon1.__anon1.constant = PrintInt64(value);
13637 if(GetUInt64(e, &value))
13639 FreeExpContents(exp);
13640 exp->__anon1.__anon1.constant = PrintUInt64(value);
13648 intptr_t value = 0;
13650 if(GetIntPtr(e, &value))
13652 FreeExpContents(exp);
13653 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13659 uintptr_t value = 0;
13661 if(GetUIntPtr(e, &value))
13663 FreeExpContents(exp);
13664 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13674 if(GetIntSize(e, &value))
13676 FreeExpContents(exp);
13677 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13685 if(GetUIntSize(e, &value))
13687 FreeExpContents(exp);
13688 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13697 if(GetFloat(e, &value))
13699 FreeExpContents(exp);
13700 exp->__anon1.__anon1.constant = PrintFloat(value);
13709 if(GetDouble(e, &value))
13711 FreeExpContents(exp);
13712 exp->__anon1.__anon1.constant = PrintDouble(value);
13723 struct Operand op1 =
13730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13733 struct Operand op2 =
13740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13743 struct Operand op3 =
13750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13754 if(exp->__anon1.cond.exp)
13755 ComputeExpression((*exp->__anon1.cond.exp).last);
13756 if(exp->__anon1.cond.elseExp)
13757 ComputeExpression(exp->__anon1.cond.elseExp);
13758 if(exp->__anon1.cond.cond)
13759 ComputeExpression(exp->__anon1.cond.cond);
13760 op1 = GetOperand(exp->__anon1.cond.cond);
13762 op1.type->refCount++;
13763 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13765 op2.type->refCount++;
13766 op3 = GetOperand(exp->__anon1.cond.elseExp);
13768 op3.type->refCount++;
13771 FreeExpContents(exp);
13772 op1.ops.Cond(exp, &op1, &op2, &op3);
13775 FreeType(op1.type);
13777 FreeType(op2.type);
13779 FreeType(op3.type);
13785 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13787 struct __ecereNameSpace__ecere__com__Instance * module;
13789 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))
13791 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))
13793 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))
13795 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)
13797 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13803 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13805 struct Type * source;
13806 struct Type * realDest = dest;
13807 struct Type * backupSourceExpType = (((void *)0));
13808 struct Expression * computedExp = sourceExp;
13811 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)
13813 computedExp = CopyExpression(sourceExp);
13814 ComputeExpression(computedExp);
13816 source = sourceExp->expType;
13817 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13819 if(computedExp != sourceExp)
13821 FreeExpression(computedExp);
13822 computedExp = sourceExp;
13827 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13829 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13831 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13833 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13835 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13837 if(sourceBase == destBase)
13839 if(computedExp != sourceExp)
13841 FreeExpression(computedExp);
13842 computedExp = sourceExp;
13851 struct __ecereNameSpace__ecere__sys__OldList * specs;
13852 unsigned int flag = 0;
13853 long long value = (((int)0x7fffffff));
13855 source->refCount++;
13856 if(computedExp->type == 2)
13858 if(source->isSigned)
13859 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13861 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13863 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13865 if(source->isSigned)
13866 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13868 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13870 if(computedExp != sourceExp)
13872 FreeExpression(computedExp);
13873 computedExp = sourceExp;
13875 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13878 source = __extension__ ({
13879 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13881 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13884 if(dest->kind == 8)
13886 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13888 if(_class && _class->type == 3)
13890 if(source->kind != 8)
13892 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13893 struct Type * tempDest, * tempSource;
13895 for(; _class->base->type != 1000; _class = _class->base)
13898 tempDest = tempType;
13899 tempType->kind = 8;
13900 if(!_class->symbol)
13901 _class->symbol = FindClass(_class->fullName);
13902 tempType->__anon1._class = _class->symbol;
13903 tempType->truth = dest->truth;
13904 if(tempType->__anon1._class)
13905 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13906 backupSourceExpType = sourceExp->expType;
13907 if(dest->passAsTemplate)
13909 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13910 CopyTypeInto(sourceExp->expType, dest);
13911 sourceExp->expType->passAsTemplate = 0;
13915 sourceExp->expType = dest;
13919 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13922 if(_class && _class->type == 2 && source->kind != 8)
13924 if(!dest->__anon1._class->__anon1.registered->dataType)
13925 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13926 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13929 FreeType(sourceExp->expType);
13930 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13931 source->refCount++;
13934 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13936 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13937 struct Declarator * decl;
13940 ReadString(string, sourceExp->__anon1.__anon2.string);
13941 decl = SpecDeclFromString(string, specs, (((void *)0)));
13942 FreeExpContents(sourceExp);
13943 FreeType(sourceExp->expType);
13944 sourceExp->type = 24;
13945 sourceExp->__anon1._classExp.specifiers = specs;
13946 sourceExp->__anon1._classExp.decl = decl;
13947 sourceExp->expType = dest;
13951 if(backupSourceExpType)
13952 FreeType(backupSourceExpType);
13956 else if(source->kind == 8)
13958 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13960 if(_class && (_class->type == 3 || _class->type == 2))
13962 if(dest->kind != 8)
13964 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13965 struct Type * tempDest, * tempSource;
13967 if(!source->__anon1._class->__anon1.registered->dataType)
13968 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13969 for(; _class->base->type != 1000; _class = _class->base)
13972 tempSource = tempType;
13973 tempType->kind = 8;
13974 tempType->__anon1._class = FindClass(_class->fullName);
13975 tempType->truth = source->truth;
13976 tempType->classObjectType = source->classObjectType;
13977 if(tempType->__anon1._class)
13978 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13979 if(conversions && conversions->last)
13981 ((struct Conversion *)conversions->last)->resultType = dest;
13984 FreeType(sourceExp->expType);
13985 sourceExp->expType = MkClassType(_class->fullName);
13986 sourceExp->expType->truth = source->truth;
13987 sourceExp->expType->classObjectType = source->classObjectType;
13988 if(!sourceExp->destType)
13990 FreeType(sourceExp->destType);
13991 sourceExp->destType = sourceExp->expType;
13992 if(sourceExp->expType)
13993 sourceExp->expType->refCount++;
13995 if(!_class->dataType)
13996 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13998 dest = MkClassType(source->__anon1._class->string);
13999 dest->truth = source->truth;
14000 dest->classObjectType = source->classObjectType;
14002 source = _class->dataType;
14003 source->refCount++;
14004 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
14010 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14017 if(dest->kind == 8)
14019 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14020 unsigned int fittingValue = 0;
14022 if(_class && _class->type == 4)
14024 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14025 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14027 if(c && value >= 0 && value <= c->largest)
14030 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14032 if(_class->type == 0 || _class->type == 5)
14034 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14036 *newExp = *sourceExp;
14037 if(sourceExp->destType)
14038 sourceExp->destType->refCount++;
14039 if(sourceExp->expType)
14040 sourceExp->expType->refCount++;
14041 sourceExp->type = 11;
14042 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14043 sourceExp->__anon1.cast.exp = newExp;
14044 FreeType(sourceExp->expType);
14045 sourceExp->expType = (((void *)0));
14046 ProcessExpressionType(sourceExp);
14049 FreeType(sourceExp->expType);
14050 sourceExp->expType = dest;
14055 if(backupSourceExpType)
14056 FreeType(backupSourceExpType);
14059 if(!_class->dataType)
14060 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14062 dest = _class->dataType;
14065 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))
14067 specs = MkListOne(MkSpecifier(DOUBLE));
14069 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))
14071 specs = MkListOne(MkSpecifier(FLOAT));
14073 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))
14076 if(!dest->isSigned)
14077 ListAdd(specs, MkSpecifier(UNSIGNED));
14078 ListAdd(specs, MkSpecifier(INT64));
14080 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14083 if(!dest->isSigned)
14084 ListAdd(specs, MkSpecifier(UNSIGNED));
14085 ListAdd(specs, MkSpecifier(INT));
14087 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14090 if(!dest->isSigned)
14091 ListAdd(specs, MkSpecifier(UNSIGNED));
14092 ListAdd(specs, MkSpecifier(SHORT));
14094 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14097 if(!dest->isSigned)
14098 ListAdd(specs, MkSpecifier(UNSIGNED));
14099 ListAdd(specs, MkSpecifier(CHAR));
14105 if(backupSourceExpType)
14107 if(sourceExp->expType)
14108 FreeType(sourceExp->expType);
14109 sourceExp->expType = backupSourceExpType;
14114 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))
14116 specs = MkListOne(MkSpecifier(DOUBLE));
14118 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))
14120 specs = MkListOne(MkSpecifier(FLOAT));
14122 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14125 ListAdd(specs, MkSpecifier(BOOL));
14127 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)))
14130 if(!dest->isSigned)
14131 ListAdd(specs, MkSpecifier(UNSIGNED));
14132 ListAdd(specs, MkSpecifier(CHAR));
14134 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)))))
14137 if(!dest->isSigned)
14138 ListAdd(specs, MkSpecifier(UNSIGNED));
14139 ListAdd(specs, MkSpecifier(SHORT));
14141 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14144 if(!dest->isSigned)
14145 ListAdd(specs, MkSpecifier(UNSIGNED));
14146 ListAdd(specs, MkSpecifier(INT));
14148 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14151 if(!dest->isSigned)
14152 ListAdd(specs, MkSpecifier(UNSIGNED));
14153 ListAdd(specs, MkSpecifier(INT64));
14155 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14157 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14163 if(backupSourceExpType)
14165 if(sourceExp->expType)
14166 FreeType(sourceExp->expType);
14167 sourceExp->expType = backupSourceExpType;
14171 if(!flag && !sourceExp->opDestType)
14173 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14175 *newExp = *sourceExp;
14176 newExp->prev = (((void *)0));
14177 newExp->next = (((void *)0));
14178 if(sourceExp->destType)
14179 sourceExp->destType->refCount++;
14180 if(sourceExp->expType)
14181 sourceExp->expType->refCount++;
14182 sourceExp->type = 11;
14183 if(realDest->kind == 8)
14185 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14186 FreeList(specs, (void *)(FreeSpecifier));
14189 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14190 if(newExp->type == 4)
14192 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14195 sourceExp->__anon1.cast.exp = newExp;
14196 FreeType(sourceExp->expType);
14197 sourceExp->expType = (((void *)0));
14198 ProcessExpressionType(sourceExp);
14201 FreeList(specs, (void *)(FreeSpecifier));
14204 if(backupSourceExpType)
14205 FreeType(backupSourceExpType);
14210 if(computedExp != sourceExp)
14212 FreeExpression(computedExp);
14213 computedExp = sourceExp;
14215 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14216 sourceExp = (*sourceExp->__anon1.list).last;
14217 if(sourceExp->type == 0)
14219 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14221 if(dest->kind == 8)
14223 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14225 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14226 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14230 for(; _class && _class->type == 4; _class = _class->base)
14232 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14233 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14235 for(value = e->values.first; value; value = value->next)
14237 if(!strcmp(value->name, id->string))
14242 FreeType(sourceExp->expType);
14243 sourceExp->isConstant = 1;
14244 sourceExp->expType = MkClassType(_class->fullName);
14245 if(inCompiler || inPreCompiler || inDebugger)
14247 FreeExpContents(sourceExp);
14248 sourceExp->type = 2;
14249 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14250 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14252 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14261 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14272 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14274 unsigned int result = 1;
14278 struct __ecereNameSpace__ecere__sys__OldList converts =
14282 struct Conversion * convert;
14284 if(destType->kind == 0)
14286 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14290 for(convert = converts.first; convert; convert = convert->next)
14292 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14296 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14297 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14300 newExp->prev = (((void *)0));
14301 newExp->next = (((void *)0));
14302 newExp->destType = (((void *)0));
14306 exp->addedThis = 1;
14307 exp->__anon1.member.exp = newExp;
14308 FreeType(exp->__anon1.member.exp->expType);
14309 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14310 exp->__anon1.member.exp->expType->classObjectType = objectType;
14311 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14312 exp->__anon1.member.memberType = 1;
14313 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14316 exp->expType->refCount++;
14317 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14323 exp->addedThis = 1;
14324 exp->__anon1.member.exp = newExp;
14325 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)
14327 newExp->byReference = 1;
14329 FreeType(exp->__anon1.member.exp->expType);
14330 exp->__anon1.member.exp->expType = (((void *)0));
14331 if(convert->convert->dataType)
14333 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14334 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14335 exp->__anon1.member.exp->expType->refCount = 1;
14336 exp->__anon1.member.exp->expType->classObjectType = objectType;
14337 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14339 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14340 exp->__anon1.member.memberType = 4;
14341 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14343 if(convert->resultType)
14344 convert->resultType->refCount++;
14350 FreeType(exp->expType);
14353 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14354 if(exp->destType->casted)
14357 exp->expType->refCount++;
14361 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14362 if(exp->destType->casted)
14364 if(convert->resultType)
14365 convert->resultType->refCount++;
14369 if(exp->isConstant && inCompiler)
14370 ComputeExpression(exp);
14371 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14373 if(!result && exp->expType && converts.count)
14375 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14377 if(!result && exp->expType && exp->destType)
14379 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))
14386 static void ProcessFunction(struct FunctionDefinition * function);
14388 void ProcessInstantiationType(struct Instantiation * inst)
14390 yylloc = inst->loc;
14393 struct MembersInit * members;
14394 struct Symbol * classSym;
14395 struct __ecereNameSpace__ecere__com__Class * _class;
14397 classSym = inst->_class->__anon1.__anon1.symbol;
14398 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14399 if(!_class || _class->type != 5)
14400 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14401 afterExternal = afterExternal ? afterExternal : curExternal;
14403 ProcessExpressionType(inst->exp);
14404 inst->isConstant = 1;
14407 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14408 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14409 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14410 int subMemberStackPos = 0;
14412 for(members = (*inst->members).first; members; members = members->next)
14414 switch(members->type)
14419 static unsigned int instMethodID = 0;
14420 struct External * external = curExternal;
14421 struct Context * context = curContext;
14422 struct Declarator * declarator = members->__anon1.function->declarator;
14423 struct Identifier * nameID = GetDeclId(declarator);
14424 char * unmangled = nameID ? nameID->string : (((void *)0));
14425 struct Expression * exp;
14426 struct External * createdExternal = (((void *)0));
14432 strcpy(name, "__ecereInstMeth_");
14433 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14435 strcat(name, nameID->string);
14437 sprintf(number, "_%08d", instMethodID++);
14438 strcat(name, number);
14439 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14443 struct Symbol * symbol = declarator->symbol;
14444 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14446 if(method && method->type == 1)
14448 symbol->__anon1.method = method;
14449 ProcessMethodType(method);
14450 if(!symbol->type->__anon1.__anon2.thisClass)
14452 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14454 if(!currentClass->symbol)
14455 currentClass->symbol = FindClass(currentClass->fullName);
14456 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14460 if(!_class->symbol)
14461 _class->symbol = FindClass(_class->fullName);
14462 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14465 DeclareType(curExternal, symbol->type, 1, 1);
14469 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14472 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14475 FreeSpecifier(nameID->_class);
14476 nameID->_class = (((void *)0));
14478 curExternal = createdExternal;
14481 if(createdExternal->__anon1.function)
14482 ProcessFunction(createdExternal->__anon1.function);
14484 else if(declarator)
14486 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14487 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14489 curExternal = external;
14490 curContext = context;
14493 FreeClassFunction(members->__anon1.function);
14494 exp = QMkExpId(name);
14496 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14497 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14503 if(members->__anon1.dataMembers && classSym)
14505 struct MemberInit * member;
14506 struct Location oldyyloc = yylloc;
14508 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14510 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14511 if(member->initializer && !member->initializer->isConstant)
14512 inst->isConstant = 0;
14524 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14526 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14532 if(spec->__anon1.specifier == THISCLASS)
14537 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14538 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14539 ProcessSpecifier(spec, declareStruct, 0);
14546 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14549 DeclareType(curExternal, symbol->type, 1, 1);
14550 else if(spec->__anon1.__anon1.symbol)
14552 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14554 if(warnClasses && !c)
14555 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14556 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14562 struct Enumerator * e;
14564 if(spec->__anon1.__anon2.list)
14566 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14569 ProcessExpressionType(e->exp);
14578 if(spec->__anon1.__anon2.definitions)
14580 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14582 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14589 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14594 if(decl->__anon1.identifier->classSym)
14596 FreeSpecifier(decl->__anon1.identifier->_class);
14597 decl->__anon1.identifier->_class = (((void *)0));
14601 if(decl->__anon1.array.exp)
14602 ProcessExpressionType(decl->__anon1.array.exp);
14610 struct Identifier * id = (((void *)0));
14611 struct Specifier * classSpec = (((void *)0));
14613 if(decl->type == 4)
14615 id = GetDeclId(decl);
14616 if(id && id->_class)
14618 classSpec = id->_class;
14619 id->_class = (((void *)0));
14622 if(decl->declarator)
14623 ProcessDeclarator(decl->declarator, isFunction);
14624 if(decl->type == 4)
14628 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14630 if(!decl->__anon1.function.parameters)
14631 decl->__anon1.function.parameters = MkList();
14632 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14634 if(decl->__anon1.function.parameters)
14636 struct TypeName * param;
14638 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14640 if(param->qualifiers)
14642 struct Specifier * spec;
14644 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14646 if(spec->type == 0)
14648 if(spec->__anon1.specifier == TYPED_OBJECT)
14650 struct Declarator * d = param->declarator;
14651 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);
14654 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14655 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14656 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14657 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14658 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14659 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14663 else if(spec->__anon1.specifier == ANY_OBJECT)
14665 struct Declarator * d = param->declarator;
14667 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14668 param->qualifiers = MkListOne(MkSpecifier(VOID));
14670 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14671 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14674 else if(spec->__anon1.specifier == THISCLASS)
14679 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14680 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14681 ProcessSpecifier(spec, 0, 0);
14686 else if(spec->type == 1)
14688 ProcessSpecifier(spec, isFunction, 1);
14692 if(param->declarator)
14693 ProcessDeclarator(param->declarator, 0);
14702 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14704 yylloc = decl->loc;
14709 unsigned int declareStruct = 0;
14711 if(decl->__anon1.__anon1.declarators)
14713 struct InitDeclarator * d;
14715 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14717 struct Type * type, * subType;
14719 ProcessDeclarator(d->declarator, 0);
14720 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14723 ProcessInitializer(d->initializer, type);
14724 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14726 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14728 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14730 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14731 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14732 if(decl->__anon1.__anon1.specifiers)
14733 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14734 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14737 decl->__anon1.inst = inst;
14741 for(subType = type; subType; )
14743 if(subType->kind == 8)
14748 else if(subType->kind == 13)
14750 else if(subType->kind == 12)
14751 subType = subType->__anon1.__anon4.arrayType;
14760 if(decl->__anon1.__anon1.specifiers)
14762 struct Specifier * s;
14764 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14766 ProcessSpecifier(s, declareStruct, 1);
14773 ProcessInstantiationType(decl->__anon1.inst);
14778 struct Specifier * spec;
14779 struct Declarator * d;
14780 unsigned int declareStruct = 0;
14782 if(decl->__anon1.__anon1.declarators)
14784 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14786 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14787 struct Type * subType;
14789 ProcessDeclarator(d, 0);
14790 for(subType = type; subType; )
14792 if(subType->kind == 8)
14797 else if(subType->kind == 13)
14799 else if(subType->kind == 12)
14800 subType = subType->__anon1.__anon4.arrayType;
14807 if(decl->__anon1.__anon1.specifiers)
14809 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14810 ProcessSpecifier(spec, declareStruct, warnClasses);
14817 static void ProcessStatement(struct Statement * stmt)
14819 yylloc = stmt->loc;
14823 ProcessStatement(stmt->__anon1.labeled.stmt);
14826 if(stmt->__anon1.caseStmt.exp)
14828 FreeType(stmt->__anon1.caseStmt.exp->destType);
14829 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14831 curSwitchType->refCount++;
14832 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14833 ComputeExpression(stmt->__anon1.caseStmt.exp);
14835 if(stmt->__anon1.caseStmt.stmt)
14836 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14840 if(stmt->__anon1.compound.context)
14842 struct Declaration * decl;
14843 struct Statement * s;
14844 struct Statement * prevCompound = curCompound;
14845 struct Context * prevContext = curContext;
14847 if(!stmt->__anon1.compound.isSwitch)
14848 curCompound = stmt;
14849 curContext = stmt->__anon1.compound.context;
14850 if(stmt->__anon1.compound.declarations)
14852 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14853 ProcessDeclaration(decl, 1);
14855 if(stmt->__anon1.compound.statements)
14857 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14858 ProcessStatement(s);
14860 curContext = prevContext;
14861 curCompound = prevCompound;
14867 struct Expression * exp;
14869 if(stmt->__anon1.expressions)
14871 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14872 ProcessExpressionType(exp);
14878 struct Expression * exp;
14880 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14881 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14882 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14883 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14885 ProcessExpressionType(exp);
14887 if(stmt->__anon1.ifStmt.stmt)
14888 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14889 if(stmt->__anon1.ifStmt.elseStmt)
14890 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14895 struct Type * oldSwitchType = curSwitchType;
14897 if(stmt->__anon1.switchStmt.exp)
14899 struct Expression * exp;
14901 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14905 ProcessExpressionType(exp);
14908 curSwitchType = exp->expType;
14911 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14912 curSwitchType = oldSwitchType;
14917 if(stmt->__anon1.whileStmt.exp)
14919 struct Expression * exp;
14921 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14922 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14923 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14924 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14926 ProcessExpressionType(exp);
14929 if(stmt->__anon1.whileStmt.stmt)
14930 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14935 if(stmt->__anon1.doWhile.exp)
14937 struct Expression * exp;
14939 if((*stmt->__anon1.doWhile.exp).last)
14941 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14942 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14943 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14945 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14947 ProcessExpressionType(exp);
14950 if(stmt->__anon1.doWhile.stmt)
14951 ProcessStatement(stmt->__anon1.doWhile.stmt);
14956 struct Expression * exp;
14958 if(stmt->__anon1.forStmt.init)
14959 ProcessStatement(stmt->__anon1.forStmt.init);
14960 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14962 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14963 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14964 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14966 if(stmt->__anon1.forStmt.check)
14967 ProcessStatement(stmt->__anon1.forStmt.check);
14968 if(stmt->__anon1.forStmt.increment)
14970 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14971 ProcessExpressionType(exp);
14973 if(stmt->__anon1.forStmt.stmt)
14974 ProcessStatement(stmt->__anon1.forStmt.stmt);
14979 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14980 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14981 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14982 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14983 char iteratorType[1024];
14984 struct Type * source;
14985 struct Expression * e;
14986 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));
14987 struct Expression * arrayExp;
14988 const char * typeString = (((void *)0));
14989 int builtinCount = 0;
14991 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14995 FreeType(e->destType);
14996 e->destType = ProcessTypeString("Container", 0);
14998 if(!isBuiltin || e->next)
14999 ProcessExpressionType(e);
15001 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15002 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)))
15004 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15005 struct Symbol * symbol;
15006 struct Expression * expIt = (((void *)0));
15007 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15008 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15009 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15010 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15015 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15016 stmt->__anon1.compound.context->parent = curContext;
15017 curContext = stmt->__anon1.compound.context;
15019 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15021 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15023 isCustomAVLTree = 1;
15024 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15027 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15029 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15031 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15034 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15036 if(inCompiler && isArray)
15038 struct Declarator * decl;
15039 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15041 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15042 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15043 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15047 struct Type * type = (((void *)0));
15048 char typeStringBuf[1024];
15050 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15051 if(((struct Expression *)(*exp).last)->type == 11)
15053 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15056 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15058 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)
15060 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15062 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15064 else if(arrayExp->__anon1.list)
15066 struct Expression * e;
15068 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15070 ProcessExpressionType(e);
15080 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15084 e->expType = (((void *)0));
15085 e = (*arrayExp->__anon1.list).first;
15086 ProcessExpressionType(e);
15089 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15091 FreeType(e->expType);
15092 e->expType = (((void *)0));
15094 type = (((void *)0));
15102 FreeType(e->expType);
15103 e->expType = (((void *)0));
15109 typeStringBuf[0] = '\0';
15110 PrintType(type, typeStringBuf, 0, 1);
15111 typeString = typeStringBuf;
15119 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15120 struct Declarator * decl;
15121 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15123 if(arrayExp->__anon1.list)
15125 struct Expression * e;
15127 builtinCount = (*arrayExp->__anon1.list).count;
15128 type = ProcessTypeString(typeString, 0);
15129 while((e = (*arrayExp->__anon1.list).first))
15131 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15132 e->destType = type;
15134 ProcessExpressionType(e);
15136 ListAdd(initializers, MkInitializerAssignment(e));
15139 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15141 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15142 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15143 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15144 FreeList(exp, (void *)(FreeExpression));
15146 else if(arrayExp->__anon1.list)
15148 struct Expression * e;
15150 type = ProcessTypeString(typeString, 0);
15151 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15153 e->destType = type;
15155 ProcessExpressionType(e);
15162 arrayExp->expType = ProcessTypeString("Container", 0);
15163 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15166 else if(inCompiler && isLinkList && !isList)
15168 struct Declarator * decl;
15169 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15171 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15172 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15173 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15175 else if(inCompiler && _class->templateArgs)
15178 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15180 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15181 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)))))))));
15185 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15188 switch(block->type)
15191 if(block->__anon1.compound.context)
15192 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15195 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15196 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15197 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15198 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15201 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15202 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15205 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15206 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15209 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15210 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15213 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15214 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15217 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15218 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15224 block = MkIfStmt(filter, block, (((void *)0)));
15228 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));
15229 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15230 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15231 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15237 sprintf(count, "%d", builtinCount);
15238 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));
15239 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15240 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15241 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15243 else if(isLinkList && !isList)
15245 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15246 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15248 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15250 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));
15254 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15255 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15257 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));
15259 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15260 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15261 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15265 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15267 ProcessExpressionType(expIt);
15268 if((*stmt->__anon1.compound.declarations).first)
15269 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15271 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15272 ProcessStatement(stmt);
15275 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15277 curContext = stmt->__anon1.compound.context->parent;
15282 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15294 struct Expression * exp;
15296 if(stmt->__anon1.expressions)
15298 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15302 if(curFunction && !curFunction->type)
15303 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15304 FreeType(exp->destType);
15305 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15307 exp->destType->refCount++;
15309 ProcessExpressionType(exp);
15316 ProcessDeclaration(stmt->__anon1.decl, 1);
15321 struct AsmField * field;
15323 if(stmt->__anon1.asmStmt.inputFields)
15325 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15326 if(field->expression)
15327 ProcessExpressionType(field->expression);
15329 if(stmt->__anon1.asmStmt.outputFields)
15331 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15332 if(field->expression)
15333 ProcessExpressionType(field->expression);
15335 if(stmt->__anon1.asmStmt.clobberedFields)
15337 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15339 if(field->expression)
15340 ProcessExpressionType(field->expression);
15347 struct PropertyWatch * propWatch;
15348 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15349 struct Expression * object = stmt->__anon1._watch.object;
15350 struct Expression * watcher = stmt->__anon1._watch.watcher;
15353 ProcessExpressionType(watcher);
15355 ProcessExpressionType(object);
15358 if(watcher || thisClass)
15360 struct External * external = curExternal;
15361 struct Context * context = curContext;
15364 stmt->__anon1.expressions = MkList();
15365 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15367 struct ClassFunction * func;
15368 char watcherName[1024];
15369 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;
15370 struct External * createdExternal;
15372 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15373 if(propWatch->deleteWatch)
15374 strcat(watcherName, "_delete");
15377 struct Identifier * propID;
15379 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15381 strcat(watcherName, "_");
15382 strcat(watcherName, propID->string);
15385 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15387 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)));
15388 ProcessClassFunctionBody(func, propWatch->compound);
15389 propWatch->compound = (((void *)0));
15390 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15391 FreeClassFunction(func);
15392 curExternal = createdExternal;
15393 ProcessFunction(createdExternal->__anon1.function);
15394 if(propWatch->deleteWatch)
15396 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15398 ListAdd(args, CopyExpression(object));
15399 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15400 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15401 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15405 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15406 struct Identifier * propID;
15408 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15410 char propName[1024];
15411 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15415 char getName[1024], setName[1024];
15416 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15418 DeclareProperty(createdExternal, prop, setName, getName);
15419 strcpy(propName, "__ecereProp_");
15420 FullClassNameCat(propName, prop->_class->fullName, 0);
15421 strcat(propName, "_");
15422 FullClassNameCat(propName, prop->name, 1);
15423 ListAdd(args, CopyExpression(object));
15424 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15425 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15426 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15427 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15428 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15431 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15436 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15438 curExternal = external;
15439 curContext = context;
15441 FreeExpression(watcher);
15443 FreeExpression(object);
15444 FreeList(watches, (void *)(FreePropertyWatch));
15447 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15451 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15453 ProcessStatement(propWatch->compound);
15460 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15461 struct Expression * object = stmt->__anon1._watch.object;
15462 struct __ecereNameSpace__ecere__com__Class * _class;
15465 ProcessExpressionType(object);
15468 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15471 struct Identifier * propID;
15474 stmt->__anon1.expressions = MkList();
15475 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15477 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15484 for(propID = (*watches).first; propID; propID = propID->next)
15486 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15490 CreateFireWatcher(prop, object, stmt);
15493 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15498 struct __ecereNameSpace__ecere__com__Property * prop;
15499 struct __ecereNameSpace__ecere__com__Class * base;
15501 for(base = _class; base; base = base->base)
15503 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15505 if(prop->isProperty && prop->isWatchable)
15507 CreateFireWatcher(prop, object, stmt);
15513 FreeExpression(object);
15514 FreeList(watches, (void *)(FreeIdentifier));
15517 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15523 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15524 struct Expression * object = stmt->__anon1._watch.object;
15525 struct Expression * watcher = stmt->__anon1._watch.watcher;
15526 struct __ecereNameSpace__ecere__com__Class * _class;
15529 ProcessExpressionType(object);
15531 ProcessExpressionType(watcher);
15534 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15535 if(watcher || thisClass)
15539 struct Identifier * propID;
15542 stmt->__anon1.expressions = MkList();
15545 struct __ecereNameSpace__ecere__sys__OldList * args;
15548 ListAdd(args, CopyExpression(object));
15549 ListAdd(args, MkExpConstant("0"));
15550 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15551 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15555 for(propID = (*watches).first; propID; propID = propID->next)
15557 char propName[1024];
15558 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15562 char getName[1024], setName[1024];
15563 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15565 DeclareProperty(curExternal, prop, setName, getName);
15566 strcpy(propName, "__ecereProp_");
15567 FullClassNameCat(propName, prop->_class->fullName, 0);
15568 strcat(propName, "_");
15569 FullClassNameCat(propName, prop->name, 1);
15570 ListAdd(args, CopyExpression(object));
15571 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15572 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15573 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15576 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15580 FreeExpression(object);
15582 FreeExpression(watcher);
15583 FreeList(watches, (void *)(FreeIdentifier));
15586 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15589 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15596 void ComputeDataTypes()
15598 struct External * external;
15600 currentClass = (((void *)0));
15601 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15602 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15603 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15604 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15605 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15606 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15607 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15608 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15609 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15610 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15611 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15612 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15613 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15614 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15615 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15616 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15617 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15618 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15619 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15620 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15621 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15622 for(external = (*ast).first; external; external = external->next)
15624 afterExternal = curExternal = external;
15625 if(external->type == 0)
15629 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15630 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15632 currentClass = external->__anon1.function->_class;
15633 ProcessFunction(external->__anon1.function);
15635 else if(external->type == 1)
15637 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15639 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15640 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15642 currentClass = (((void *)0));
15643 if(external->__anon1.declaration)
15644 ProcessDeclaration(external->__anon1.declaration, 1);
15646 else if(external->type == 2)
15648 struct ClassDefinition * _class = external->__anon1._class;
15650 currentClass = external->symbol->__anon1.registered;
15653 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15654 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15656 if(_class->definitions)
15658 ProcessClass(_class->definitions, _class->symbol);
15662 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15663 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15666 else if(external->type == 4)
15668 thisNameSpace = external->__anon1.id->string;
15671 currentClass = (((void *)0));
15672 thisNameSpace = (((void *)0));
15673 curExternal = (((void *)0));
15676 void ProcessExpressionType(struct Expression * exp)
15678 unsigned int unresolved = 0;
15679 struct Location oldyylloc = yylloc;
15680 unsigned int notByReference = 0;
15682 if(!exp || exp->expType)
15689 struct Identifier * id = exp->__anon1.__anon1.identifier;
15691 if(!id || !topContext)
15693 if(id->_class && id->_class->__anon1.__anon1.name)
15695 id->classSym = id->_class->__anon1.__anon1.symbol;
15697 if(!strcmp(id->string, "__runtimePlatform"))
15699 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15702 else if(strstr(id->string, "__ecereClass") == id->string)
15704 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15707 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15709 ReplaceClassMembers(exp, thisClass);
15712 ProcessExpressionType(exp);
15715 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15720 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15724 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15730 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15733 ProcessExpressionType(exp);
15737 else if(currentClass && !id->_class)
15739 if(ResolveIdWithClass(exp, currentClass, 1))
15742 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15747 struct Type * type = symbol->type;
15748 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15750 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15752 struct Context * context = SetupTemplatesContext(_class);
15754 type = ReplaceThisClassType(_class);
15755 FinishTemplatesContext(context);
15757 type->refCount = 0;
15759 FreeSpecifier(id->_class);
15760 id->_class = (((void *)0));
15761 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15762 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15763 id->classSym = (((void *)0));
15764 exp->expType = type;
15767 if(type && (type->kind == 15))
15768 exp->isConstant = 1;
15769 if(symbol->isParam || !strcmp(id->string, "this"))
15771 if(_class && _class->type == 1 && !type->declaredWithStruct)
15772 exp->byReference = 1;
15774 if(symbol->isIterator)
15776 if(symbol->isIterator == 3)
15779 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15780 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15781 exp->expType = (((void *)0));
15782 ProcessExpressionType(exp);
15784 else if(symbol->isIterator != 4)
15787 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15788 exp->__anon1.member.exp->expType = exp->expType;
15789 exp->__anon1.member.member = MkIdentifier("data");
15790 exp->expType = (((void *)0));
15791 ProcessExpressionType(exp);
15798 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15800 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15804 strcpy(name, thisNameSpace);
15805 strcat(name, "::");
15806 strcat(name, id->string);
15807 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15810 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15815 for(c = 0; c < definedExpStackPos; c++)
15816 if(definedExpStack[c] == definedExp)
15818 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15820 struct Location backupYylloc = yylloc;
15821 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15823 definedExpStack[definedExpStackPos++] = definedExp;
15824 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15825 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15826 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15828 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15829 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15830 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15831 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15833 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15834 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15836 parsedExpression = (((void *)0));
15838 expression_yyparse();
15839 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15841 fileInput = backInput;
15842 yylloc = backupYylloc;
15843 if(parsedExpression)
15845 FreeIdentifier(id);
15847 exp->__anon1.list = MkListOne(parsedExpression);
15848 ApplyLocation(parsedExpression, &yylloc);
15849 ProcessExpressionType(exp);
15850 definedExpStackPos--;
15853 definedExpStackPos--;
15859 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15865 struct GlobalData * data = (((void *)0));
15867 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15871 strcpy(name, thisNameSpace);
15872 strcat(name, "::");
15873 strcat(name, id->string);
15874 data = FindGlobalData(name);
15877 data = FindGlobalData(id->string);
15880 DeclareGlobalData(curExternal, data);
15881 exp->expType = data->dataType;
15883 data->dataType->refCount++;
15884 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15885 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15886 FreeSpecifier(id->_class);
15887 id->_class = (((void *)0));
15892 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15894 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15898 strcpy(name, thisNameSpace);
15899 strcat(name, "::");
15900 strcat(name, id->string);
15901 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15904 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15909 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15910 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15912 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15913 strcpy(name, "__ecereFunction_");
15914 FullClassNameCat(name, id->string, 0);
15915 if(DeclareFunction(curExternal, function, name))
15917 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15918 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15920 exp->expType = function->dataType;
15921 if(function->dataType)
15922 function->dataType->refCount++;
15923 FreeSpecifier(id->_class);
15924 id->_class = (((void *)0));
15936 if(!exp->__anon1.instance->_class)
15938 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15940 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15943 ProcessInstantiationType(exp->__anon1.instance);
15944 exp->isConstant = exp->__anon1.instance->isConstant;
15945 if(exp->__anon1.instance->_class)
15947 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15955 char * constant = exp->__anon1.__anon1.constant;
15956 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15958 exp->expType = type;
15959 if(constant[0] == '\'')
15961 if((int)((unsigned char *)constant)[1] > 127)
15964 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15968 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15969 exp->__anon1.__anon1.constant = PrintUInt(ch);
15971 type->__anon1._class = FindClass("unichar");
15972 type->isSigned = 0;
15977 type->isSigned = 1;
15982 char * dot = strchr(constant, '.');
15983 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15988 exponent = strchr(constant, 'p');
15990 exponent = strchr(constant, 'P');
15994 exponent = strchr(constant, 'e');
15996 exponent = strchr(constant, 'E');
15998 if(dot || exponent)
16000 if(strchr(constant, 'f') || strchr(constant, 'F'))
16004 type->isSigned = 1;
16008 unsigned int isSigned = constant[0] == '-';
16009 char * endP = (((void *)0));
16010 long long i64 = strtoll(constant, &endP, 0);
16011 uint64 ui64 = strtoull(constant, &endP, 0);
16012 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16013 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16017 if(i64 < (((int)0x80000000)))
16022 if(ui64 > (((int)0x7fffffff)))
16024 if(ui64 > (0xffffffff))
16027 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16031 else if(constant[0] != '0' || !constant[1])
16036 type->kind = is64Bit ? 4 : 3;
16037 type->isSigned = isSigned;
16040 exp->isConstant = 1;
16041 if(exp->destType && exp->destType->kind == 7)
16043 else if(exp->destType && exp->destType->kind == 6)
16045 else if(exp->destType && exp->destType->kind == 4)
16052 exp->isConstant = 1;
16053 exp->expType = __extension__ ({
16054 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16056 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16057 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16059 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16060 }), __ecereInstance2;
16066 ProcessExpressionType(exp->__anon1._new.size);
16067 exp->expType = __extension__ ({
16068 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16070 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16072 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16076 ProcessExpressionType(exp->__anon1._renew.size);
16077 ProcessExpressionType(exp->__anon1._renew.exp);
16078 exp->expType = __extension__ ({
16079 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16081 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16083 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16087 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16088 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16089 unsigned int useDestType = 0, useSideType = 0;
16090 struct Location oldyylloc = yylloc;
16091 unsigned int useSideUnit = 0;
16092 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16093 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16095 switch(exp->__anon1.op.op)
16147 if(exp->__anon1.op.exp1)
16154 if(exp->__anon1.op.op == '&')
16156 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16158 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16159 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16161 if(symbol && symbol->isIterator == 2)
16164 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16165 exp->__anon1.member.member = MkIdentifier("key");
16166 exp->expType = (((void *)0));
16167 exp->__anon1.op.exp2->expType = symbol->type;
16168 symbol->type->refCount++;
16169 ProcessExpressionType(exp);
16175 if(exp->__anon1.op.exp1)
16177 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16179 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16181 if(exp->__anon1.op.exp1->destType)
16182 FreeType(exp->__anon1.op.exp1->destType);
16183 exp->__anon1.op.exp1->destType = exp->destType;
16184 exp->__anon1.op.exp1->opDestType = 1;
16186 exp->destType->refCount++;
16190 if(exp->__anon1.op.exp1->destType)
16191 FreeType(exp->__anon1.op.exp1->destType);
16192 exp->__anon1.op.exp1->destType = dummy;
16195 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16196 exp->__anon1.op.exp1->destType->count++;
16197 ProcessExpressionType(exp->__anon1.op.exp1);
16198 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16199 exp->__anon1.op.exp1->destType->count--;
16200 exp->__anon1.op.exp1->opDestType = 0;
16201 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)
16203 exp->__anon1.op.exp2 = MkExpConstant("1");
16204 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16207 if(exp->__anon1.op.exp1->destType == dummy)
16210 exp->__anon1.op.exp1->destType = (((void *)0));
16212 if(exp->__anon1.op.exp2)
16214 if(exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16216 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
16218 FreeType(exp->__anon1.op.exp1->expType);
16219 exp->__anon1.op.exp1->expType = type;
16222 type1 = exp->__anon1.op.exp1->expType;
16224 if(exp->__anon1.op.exp2)
16226 char expString[10240];
16228 expString[0] = '\0';
16229 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16231 if(exp->__anon1.op.exp1)
16233 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16234 if(exp->__anon1.op.exp1->expType)
16235 exp->__anon1.op.exp1->expType->refCount++;
16239 exp->__anon1.op.exp2->destType = exp->destType;
16240 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16241 exp->__anon1.op.exp2->opDestType = 1;
16243 exp->destType->refCount++;
16247 exp->expType = type1;
16252 PrintExpression(exp->__anon1.op.exp2, expString);
16253 if(type1 && type1->kind == 13)
16255 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)
16256 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16257 else if(exp->__anon1.op.op == '=')
16259 if(exp->__anon1.op.exp2->destType)
16260 FreeType(exp->__anon1.op.exp2->destType);
16261 exp->__anon1.op.exp2->destType = type1;
16268 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)
16272 if(exp->__anon1.op.exp2->destType)
16273 FreeType(exp->__anon1.op.exp2->destType);
16274 exp->__anon1.op.exp2->destType = type1;
16281 exp->expType = type1;
16283 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16285 if(exp->__anon1.op.exp2->destType)
16286 FreeType(exp->__anon1.op.exp2->destType);
16287 exp->__anon1.op.exp2->destType = exp->destType;
16288 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16289 exp->__anon1.op.exp2->opDestType = 1;
16291 exp->destType->refCount++;
16295 if(exp->__anon1.op.exp2->destType)
16296 FreeType(exp->__anon1.op.exp2->destType);
16297 exp->__anon1.op.exp2->destType = dummy;
16300 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))
16302 FreeType(exp->__anon1.op.exp2->destType);
16303 exp->__anon1.op.exp2->destType = type1;
16306 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16307 exp->__anon1.op.exp2->destType->count++;
16308 if(exp->__anon1.op.op == SIZEOF)
16310 struct Expression * e = exp->__anon1.op.exp2;
16312 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16314 if(e->type == 5 || e->type == 32 || e->type == 23)
16317 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16319 e = (*e->__anon1.list).last;
16322 if(e->type == 11 && e->__anon1.cast.exp)
16323 e->__anon1.cast.exp->needCast = 1;
16325 ProcessExpressionType(exp->__anon1.op.exp2);
16326 exp->__anon1.op.exp2->opDestType = 0;
16327 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16328 exp->__anon1.op.exp2->destType->count--;
16329 if(exp->__anon1.op.exp1 || exp->__anon1.op.op == '~')
16331 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16333 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
16335 FreeType(exp->__anon1.op.exp2->expType);
16336 exp->__anon1.op.exp2->expType = type;
16339 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16341 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)
16343 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16344 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16346 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)))
16348 if(exp->__anon1.op.op == ADD_ASSIGN)
16349 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16351 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))
16353 if(exp->__anon1.op.op == ADD_ASSIGN)
16354 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16356 else if(inCompiler)
16358 char type1String[1024];
16359 char type2String[1024];
16361 type1String[0] = '\0';
16362 type2String[0] = '\0';
16363 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16364 PrintType(type1, type2String, 0, 1);
16365 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16366 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16369 if(exp->__anon1.op.exp2->destType == dummy)
16372 exp->__anon1.op.exp2->destType = (((void *)0));
16374 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16376 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16377 type2->refCount = 1;
16378 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16379 type2->isSigned = 1;
16381 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))
16383 type2 = __extension__ ({
16384 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16386 __ecereInstance1->kind = 3, __ecereInstance1;
16388 type2->refCount = 1;
16389 type2->isSigned = 1;
16393 type2 = exp->__anon1.op.exp2->expType;
16399 if(exp->__anon1.op.op == SIZEOF)
16401 exp->expType = __extension__ ({
16402 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16404 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16406 exp->isConstant = 1;
16408 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16410 exp->expType = Dereference(type2);
16411 if(type2 && type2->kind == 8)
16412 notByReference = 1;
16414 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16415 exp->expType = Reference(type2);
16416 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16418 if(exp->__anon1.op.exp1->expType)
16420 exp->expType = exp->__anon1.op.exp1->expType;
16421 exp->expType->refCount++;
16428 if(exp->__anon1.op.exp1)
16430 if(exp->__anon1.op.exp1->destType)
16431 FreeType(exp->__anon1.op.exp1->destType);
16432 exp->__anon1.op.exp1->destType = MkClassType("bool");
16433 exp->__anon1.op.exp1->destType->truth = 1;
16434 if(!exp->__anon1.op.exp1->expType)
16435 ProcessExpressionType(exp->__anon1.op.exp1);
16437 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16438 FreeType(exp->__anon1.op.exp1->expType);
16439 exp->__anon1.op.exp1->expType = MkClassType("bool");
16440 exp->__anon1.op.exp1->expType->truth = 1;
16442 if(exp->__anon1.op.exp2)
16444 if(exp->__anon1.op.exp2->destType)
16445 FreeType(exp->__anon1.op.exp2->destType);
16446 exp->__anon1.op.exp2->destType = MkClassType("bool");
16447 exp->__anon1.op.exp2->destType->truth = 1;
16448 if(!exp->__anon1.op.exp2->expType)
16449 ProcessExpressionType(exp->__anon1.op.exp2);
16451 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16452 FreeType(exp->__anon1.op.exp2->expType);
16453 exp->__anon1.op.exp2->expType = MkClassType("bool");
16454 exp->__anon1.op.exp2->expType->truth = 1;
16457 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")))))
16459 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"))))
16461 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)))
16463 struct Type * intType;
16465 if(!type1->__anon1._class->__anon1.registered->dataType)
16466 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16467 if(!type2->__anon1._class->__anon1.registered->dataType)
16468 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16469 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16470 if(exp->__anon1.op.exp1->destType)
16471 FreeType(exp->__anon1.op.exp1->destType);
16472 if(exp->__anon1.op.exp2->destType)
16473 FreeType(exp->__anon1.op.exp2->destType);
16474 exp->__anon1.op.exp1->destType = intType;
16475 exp->__anon1.op.exp2->destType = intType;
16476 intType->refCount++;
16480 if(exp->__anon1.op.exp2->destType)
16481 FreeType(exp->__anon1.op.exp2->destType);
16482 exp->__anon1.op.exp2->destType = type1;
16484 if(exp->__anon1.op.exp1->destType)
16485 FreeType(exp->__anon1.op.exp1->destType);
16486 exp->__anon1.op.exp1->destType = type2;
16489 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)
16490 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);
16491 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16493 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16497 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16499 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16500 ProcessExpressionType(exp->__anon1.op.exp1);
16501 if(type2->kind != 13)
16503 ProcessExpressionType(classExp);
16504 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16505 if(!exp->__anon1.op.exp2->expType)
16509 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16512 ProcessExpressionType(exp->__anon1.op.exp2);
16516 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)))
16518 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16519 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16520 exp->expType = type1;
16524 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)))
16526 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16527 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16528 exp->expType = type2;
16532 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))
16534 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16538 unsigned int success = 0;
16540 if(type1->kind == 13 && type2->kind == 13)
16542 if(exp->__anon1.op.op == '+')
16543 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16544 else if(exp->__anon1.op.op == '-')
16546 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16548 exp->expType = __extension__ ({
16549 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16551 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16554 if(type1->__anon1.type->kind == 20)
16556 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16560 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16562 ProcessExpressionType(classExp);
16564 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"))));
16565 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16573 if(!success && exp->__anon1.op.exp1->type == 2)
16575 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16578 FreeType(exp->expType);
16579 exp->expType = exp->__anon1.op.exp1->destType;
16580 if(exp->__anon1.op.exp1->destType)
16581 exp->__anon1.op.exp1->destType->refCount++;
16584 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16587 FreeType(exp->expType);
16588 exp->expType = exp->__anon1.op.exp2->destType;
16589 if(exp->__anon1.op.exp2->destType)
16590 exp->__anon1.op.exp2->destType->refCount++;
16596 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16599 FreeType(exp->expType);
16600 exp->expType = exp->__anon1.op.exp2->destType;
16601 if(exp->__anon1.op.exp2->destType)
16602 exp->__anon1.op.exp2->destType->refCount++;
16605 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16608 FreeType(exp->expType);
16609 exp->expType = exp->__anon1.op.exp1->destType;
16610 if(exp->__anon1.op.exp1->destType)
16611 exp->__anon1.op.exp1->destType->refCount++;
16617 char expString1[10240];
16618 char expString2[10240];
16622 expString1[0] = '\0';
16623 expString2[0] = '\0';
16628 PrintExpression(exp->__anon1.op.exp1, expString1);
16629 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16630 PrintExpression(exp->__anon1.op.exp2, expString2);
16631 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16632 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16633 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16635 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16639 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)
16641 if(exp->__anon1.op.exp1->destType)
16642 FreeType(exp->__anon1.op.exp1->destType);
16643 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16644 if(type2->__anon1._class->__anon1.registered->dataType)
16645 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16646 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16647 exp->expType = type2;
16651 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)
16653 if(exp->__anon1.op.exp2->destType)
16654 FreeType(exp->__anon1.op.exp2->destType);
16655 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16656 if(type1->__anon1._class->__anon1.registered->dataType)
16657 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16658 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16659 exp->expType = type1;
16665 unsigned int valid = 0;
16667 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16669 if(exp->__anon1.op.exp2->destType)
16670 FreeType(exp->__anon1.op.exp2->destType);
16671 if(!type1->__anon1._class->__anon1.registered->dataType)
16672 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16673 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16674 exp->__anon1.op.exp2->destType->refCount++;
16675 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16678 type2 = exp->__anon1.op.exp2->destType;
16681 exp->expType = type2;
16684 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16686 if(exp->__anon1.op.exp1->destType)
16687 FreeType(exp->__anon1.op.exp1->destType);
16688 if(!type2->__anon1._class->__anon1.registered->dataType)
16689 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16690 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16691 exp->__anon1.op.exp1->destType->refCount++;
16692 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16693 type1 = exp->__anon1.op.exp1->destType;
16694 exp->expType = type1;
16697 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16699 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16700 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16702 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16704 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16706 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->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++;
16716 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16718 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16721 FreeType(exp->expType);
16722 exp->expType = exp->__anon1.op.exp1->expType;
16723 if(exp->__anon1.op.exp1->expType)
16724 exp->__anon1.op.exp1->expType->refCount++;
16731 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16733 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16736 FreeType(exp->expType);
16737 exp->expType = exp->__anon1.op.exp1->expType;
16738 if(exp->__anon1.op.exp1->expType)
16739 exp->__anon1.op.exp1->expType->refCount++;
16743 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16745 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16748 FreeType(exp->expType);
16749 exp->expType = exp->__anon1.op.exp2->expType;
16750 if(exp->__anon1.op.exp2->expType)
16751 exp->__anon1.op.exp2->expType->refCount++;
16759 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))
16761 if(exp->__anon1.op.exp1->destType)
16762 FreeType(exp->__anon1.op.exp1->destType);
16763 exp->__anon1.op.exp1->destType = type2;
16765 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16768 FreeType(exp->expType);
16769 exp->expType = exp->__anon1.op.exp1->destType;
16770 if(exp->__anon1.op.exp1->destType)
16771 exp->__anon1.op.exp1->destType->refCount++;
16776 if(exp->__anon1.op.exp2->destType)
16777 FreeType(exp->__anon1.op.exp2->destType);
16778 exp->__anon1.op.exp2->destType = type1;
16780 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16783 FreeType(exp->expType);
16784 exp->expType = exp->__anon1.op.exp2->destType;
16785 if(exp->__anon1.op.exp2->destType)
16786 exp->__anon1.op.exp2->destType->refCount++;
16788 else if(type1 && type2)
16790 char expString1[10240];
16791 char expString2[10240];
16792 char type1String[1024];
16793 char type2String[1024];
16795 expString1[0] = '\0';
16796 expString2[0] = '\0';
16797 type1String[0] = '\0';
16798 type2String[0] = '\0';
16801 PrintExpression(exp->__anon1.op.exp1, expString1);
16802 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16803 PrintExpression(exp->__anon1.op.exp2, expString2);
16804 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16805 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16806 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16808 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16809 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16811 exp->expType = exp->__anon1.op.exp1->expType;
16812 if(exp->__anon1.op.exp1->expType)
16813 exp->__anon1.op.exp1->expType->refCount++;
16815 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16817 exp->expType = exp->__anon1.op.exp2->expType;
16818 if(exp->__anon1.op.exp2->expType)
16819 exp->__anon1.op.exp2->expType->refCount++;
16827 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16829 struct Type * oldType = exp->__anon1.op.exp1->expType;
16831 exp->__anon1.op.exp1->expType = (((void *)0));
16832 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16835 exp->__anon1.op.exp1->expType = oldType;
16837 if(exp->__anon1.op.exp1->destType)
16838 FreeType(exp->__anon1.op.exp1->destType);
16839 exp->__anon1.op.exp1->destType = type2;
16841 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16844 FreeType(exp->expType);
16845 exp->expType = exp->__anon1.op.exp1->destType;
16846 if(exp->__anon1.op.exp1->destType)
16847 exp->__anon1.op.exp1->destType->refCount++;
16851 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16853 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16855 if(exp->__anon1.op.exp1->destType)
16856 FreeType(exp->__anon1.op.exp1->destType);
16857 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16858 if(type2->__anon1._class->__anon1.registered->dataType)
16859 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16860 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16862 if(exp->__anon1.op.op == '!')
16864 exp->expType = MkClassType("bool");
16865 exp->expType->truth = 1;
16869 exp->expType = type2;
16874 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16876 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16878 if(exp->__anon1.op.exp2->destType)
16879 FreeType(exp->__anon1.op.exp2->destType);
16880 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16881 if(type1->__anon1._class->__anon1.registered->dataType)
16882 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16883 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16885 exp->expType = type1;
16891 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16893 char expString[10000];
16895 expString[0] = '\0';
16898 PrintExpression(exp->__anon1.op.exp1, expString);
16899 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16902 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16904 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16906 char expString[10240];
16908 expString[0] = '\0';
16911 PrintExpression(exp->__anon1.op.exp2, expString);
16912 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16915 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16919 FreeType(exp->expType);
16920 exp->expType = MkClassType("bool");
16921 exp->expType->truth = 1;
16923 if(exp->__anon1.op.op != SIZEOF)
16924 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16925 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16927 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16929 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16930 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16931 yylloc = oldyylloc;
16940 struct Expression * e;
16942 exp->isConstant = 1;
16943 for(e = (*exp->__anon1.list).first; e; e = e->next)
16947 FreeType(e->destType);
16948 e->opDestType = exp->opDestType;
16949 e->destType = exp->destType;
16952 exp->destType->refCount++;
16955 ProcessExpressionType(e);
16956 if(!exp->expType && !e->next)
16958 exp->expType = e->expType;
16960 e->expType->refCount++;
16963 exp->isConstant = 0;
16965 e = (*exp->__anon1.list).first;
16966 if(!e->next && e->type == 8)
16968 struct Expression * next = exp->next, * prev = exp->prev;
16970 FreeType(exp->expType);
16971 FreeType(exp->destType);
16972 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16976 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16977 ProcessExpressionType(exp);
16983 struct Expression * e;
16985 exp->isConstant = 1;
16986 ProcessExpressionType(exp->__anon1.index.exp);
16987 if(!exp->__anon1.index.exp->isConstant)
16988 exp->isConstant = 0;
16989 if(exp->__anon1.index.exp->expType)
16991 struct Type * source = exp->__anon1.index.exp->expType;
16993 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16995 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16996 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16998 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17000 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17001 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17003 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17005 if(type->kind == 8)
17006 type->constant = 1;
17007 else if(type->kind == 13)
17009 struct Type * t = type;
17011 while(t->kind == 13)
17012 t = t->__anon1.type;
17015 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17020 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17022 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17025 FreeType(e->destType);
17026 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17028 ProcessExpressionType(e);
17033 exp->isConstant = 0;
17036 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17038 DeclareType(curExternal, exp->expType, 1, 0);
17043 struct Expression * e;
17044 struct Type * functionType;
17045 struct Type * methodType = (((void *)0));
17051 PrintExpression(exp->__anon1.call.exp, name);
17052 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17054 PrintExpression(exp->__anon1.call.exp, name);
17057 if(exp->__anon1.call.exp->type == 0)
17059 struct Expression * idExp = exp->__anon1.call.exp;
17060 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17062 if(!strcmp(id->string, "__builtin_frame_address"))
17064 exp->expType = ProcessTypeString("void *", 1);
17065 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17066 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17069 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17071 exp->expType = ProcessTypeString("int", 1);
17072 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17073 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17076 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17078 struct Expression * a = (((void *)0));
17079 struct Expression * b = (((void *)0));
17080 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17082 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17084 a = (*exp->__anon1.call.arguments).first;
17085 b = (*exp->__anon1.call.arguments).last;
17089 else if((*exp->__anon1.call.arguments).count == 1)
17091 a = (*exp->__anon1.call.arguments).first;
17096 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17097 idExp->__anon1.__anon1.identifier = (((void *)0));
17098 FreeExpContents(exp);
17099 ProcessExpressionType(a);
17101 ProcessExpressionType(b);
17103 exp->__anon1.list = MkList();
17104 if(a->expType && (!b || b->expType))
17106 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17110 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17111 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17112 struct Declaration * decl;
17113 char temp1[1024], temp2[1024];
17115 GetTypeSpecs(a->expType, specs);
17116 if(a && !a->isConstant && a->type != 0)
17118 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17119 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17120 tempExp1 = QMkExpId(temp1);
17121 tempExp1->expType = a->expType;
17123 a->expType->refCount++;
17124 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17126 if(b && !b->isConstant && b->type != 0)
17128 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17129 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17130 tempExp2 = QMkExpId(temp2);
17131 tempExp2->expType = b->expType;
17133 b->expType->refCount++;
17134 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17136 decl = MkDeclaration(specs, decls);
17137 if(!curCompound->__anon1.compound.declarations)
17138 curCompound->__anon1.compound.declarations = MkList();
17139 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17143 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17145 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17147 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17148 exp->expType = a->expType;
17150 a->expType->refCount++;
17152 else if(!strcmp(id->string, "Abs"))
17154 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17155 exp->expType = a->expType;
17157 a->expType->refCount++;
17159 else if(!strcmp(id->string, "Sgn"))
17161 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"))))));
17162 exp->expType = ProcessTypeString("int", 0);
17164 FreeExpression(tempExp1);
17166 FreeExpression(tempExp2);
17167 FreeIdentifier(id);
17173 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17175 if(!exp->__anon1.call.exp->destType)
17177 exp->__anon1.call.exp->destType = dummy;
17180 ProcessExpressionType(exp->__anon1.call.exp);
17181 if(exp->__anon1.call.exp->destType == dummy)
17184 exp->__anon1.call.exp->destType = (((void *)0));
17188 functionType = exp->__anon1.call.exp->expType;
17189 if(functionType && functionType->kind == 16)
17191 methodType = functionType;
17192 functionType = methodType->__anon1.__anon3.method->dataType;
17193 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17195 char typeString[1024];
17197 typeString[0] = '\0';
17199 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17201 functionType->__anon1.__anon2.thisClass = (((void *)0));
17202 PrintType(functionType, typeString, 1, 1);
17203 functionType->__anon1.__anon2.thisClass = back;
17205 if(strstr(typeString, "thisclass"))
17207 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17208 struct Declarator * decl;
17211 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17213 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17214 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))
17215 thisClassParams = 0;
17216 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17218 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17220 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17221 ProcessDeclarator(decl, 1);
17222 thisClass = backupThisClass;
17224 thisClassParams = 1;
17225 functionType = ProcessType(specs, decl);
17226 functionType->refCount = 0;
17227 FinishTemplatesContext(context);
17229 struct Type * p, * op;
17231 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)
17234 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17237 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17239 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17242 FreeList(specs, (void *)(FreeSpecifier));
17243 FreeDeclarator(decl);
17247 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17249 struct Type * type = functionType->__anon1.type;
17251 if(!functionType->refCount)
17253 functionType->__anon1.type = (((void *)0));
17254 FreeType(functionType);
17256 functionType = type;
17258 if(functionType && functionType->kind != 11)
17260 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17262 else if(functionType)
17264 unsigned int emptyParams = 0, noParams = 0;
17265 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17266 struct Type * type = functionType->__anon1.__anon2.params.first;
17267 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17269 struct Location oldyylloc = yylloc;
17273 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17275 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17278 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17280 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)
17282 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17285 e->destType = type;
17287 type = functionType->__anon1.__anon2.params.first;
17290 type->refCount = 0;
17292 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17294 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17295 type->byReference = functionType->byReference;
17296 type->typedByReference = functionType->typedByReference;
17299 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17301 e->destType = type;
17303 type = functionType->__anon1.__anon2.params.first;
17306 type->refCount = 0;
17309 if(type && type->kind == 0)
17312 if(!type->refCount)
17314 type = (((void *)0));
17316 for(; e; e = e->next)
17318 if(!type && !emptyParams)
17321 if(methodType && methodType->__anon1.__anon3.methodClass)
17322 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);
17324 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);
17327 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17329 struct Type * templatedType = (((void *)0));
17330 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17331 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17334 if(_class && _class->templateArgs)
17336 struct __ecereNameSpace__ecere__com__Class * sClass;
17338 for(sClass = _class; sClass; sClass = sClass->base)
17340 if(sClass->templateClass)
17341 sClass = sClass->templateClass;
17343 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17345 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17347 struct __ecereNameSpace__ecere__com__Class * nextClass;
17349 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17351 if(nextClass->templateClass)
17352 nextClass = nextClass->templateClass;
17353 id += nextClass->templateParams.count;
17363 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17365 unsigned int constant = type->constant;
17366 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17369 struct Context * context = SetupTemplatesContext(_class);
17371 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17372 FinishTemplatesContext(context);
17374 if(templatedType->kind == 8 && constant)
17375 templatedType->constant = 1;
17376 else if(templatedType->kind == 13)
17378 struct Type * t = templatedType->__anon1.type;
17380 while(t->kind == 13)
17381 t = t->__anon1.type;
17383 t->constant = constant;
17385 e->destType = templatedType;
17388 templatedType->passAsTemplate = 1;
17393 e->destType = type;
17400 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17402 e->destType = type->prev;
17403 e->destType->refCount++;
17407 e->destType = type;
17412 if(type && type->kind != 14)
17414 struct Type * next = type->next;
17416 if(!type->refCount)
17421 if(type && type->kind != 14)
17423 if(methodType && methodType->__anon1.__anon3.methodClass)
17424 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);
17426 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);
17428 yylloc = oldyylloc;
17429 if(type && !type->refCount)
17434 functionType = __extension__ ({
17435 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17437 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17439 if(exp->__anon1.call.exp->type == 0)
17441 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17445 struct Symbol * symbol;
17446 struct Location oldyylloc = yylloc;
17448 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17449 if(strstr(string, "__builtin_") == string)
17453 functionType->__anon1.__anon2.returnType = exp->destType;
17454 exp->destType->refCount++;
17458 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17459 symbol = __extension__ ({
17460 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17462 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17464 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17465 if(strstr(symbol->string, "::"))
17466 globalContext->hasNameSpace = 1;
17467 yylloc = oldyylloc;
17470 else if(exp->__anon1.call.exp->type == 8)
17474 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17475 if(!functionType->__anon1.__anon2.returnType)
17477 functionType->__anon1.__anon2.returnType = __extension__ ({
17478 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17480 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17484 if(functionType && functionType->kind == 11)
17486 exp->expType = functionType->__anon1.__anon2.returnType;
17487 if(functionType->__anon1.__anon2.returnType)
17488 functionType->__anon1.__anon2.returnType->refCount++;
17489 if(!functionType->refCount)
17490 FreeType(functionType);
17492 if(exp->__anon1.call.arguments)
17494 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17495 ProcessExpressionType(e);
17501 struct Type * type;
17502 struct Location oldyylloc = yylloc;
17503 unsigned int thisPtr;
17504 struct Expression * checkExp = exp->__anon1.member.exp;
17508 if(checkExp->type == 11)
17509 checkExp = checkExp->__anon1.cast.exp;
17510 else if(checkExp->type == 5)
17511 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17515 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17516 exp->thisPtr = thisPtr;
17517 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17519 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17521 ProcessExpressionType(exp->__anon1.member.exp);
17522 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)
17524 exp->isConstant = 0;
17527 exp->isConstant = exp->__anon1.member.exp->isConstant;
17528 type = exp->__anon1.member.exp->expType;
17530 if(type && (type->kind == 20))
17532 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17533 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17537 for(param = _class->templateParams.first; param; param = param->next)
17539 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17543 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17545 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17549 struct Expression * expMember = exp->__anon1.member.exp;
17550 struct Declarator * decl;
17551 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17552 char thisClassTypeString[1024];
17554 FreeIdentifier(exp->__anon1.member.member);
17555 ProcessExpressionType(argExp);
17557 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17561 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17562 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17565 strcpy(thisClassTypeString, _class->fullName);
17567 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17568 exp->expType = ProcessType(specs, decl);
17569 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17571 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17572 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17573 int paramCount = 0;
17574 int lastParam = -1;
17575 char templateString[1024];
17576 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17578 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17579 for(cClass = expClass; cClass; cClass = cClass->base)
17583 for(param = cClass->templateParams.first; param; param = param->next)
17586 struct __ecereNameSpace__ecere__com__Class * sClass;
17587 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17589 for(sClass = cClass->base; sClass; sClass = sClass->base)
17590 id += sClass->templateParams.count;
17591 arg = expClass->templateArgs[id];
17592 for(sClass = _class; sClass; sClass = sClass->base)
17594 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17596 struct __ecereNameSpace__ecere__com__Class * nextClass;
17598 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17599 p += nextClass->templateParams.count;
17600 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17602 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17604 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17606 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17607 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17614 char argument[256];
17616 argument[0] = '\0';
17617 switch(param->type)
17621 char expString[1024];
17622 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17623 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17624 struct Expression * exp;
17625 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17627 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17628 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17629 ProcessExpressionType(exp);
17630 ComputeExpression(exp);
17631 expString[0] = '\0';
17632 PrintExpression(exp, expString);
17633 strcat(argument, expString);
17634 FreeExpression(exp);
17639 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17644 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17646 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17647 strcat(argument, thisClassTypeString);
17649 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17657 strcat(templateString, ", ");
17658 if(lastParam != p - 1)
17660 strcat(templateString, param->name);
17661 strcat(templateString, " = ");
17663 strcat(templateString, argument);
17672 int len = strlen(templateString);
17674 if(templateString[len - 1] == '>')
17675 templateString[len++] = ' ';
17676 templateString[len++] = '>';
17677 templateString[len++] = '\0';
17680 struct Context * context = SetupTemplatesContext(_class);
17682 FreeType(exp->expType);
17683 exp->expType = ProcessTypeString(templateString, 0);
17684 FinishTemplatesContext(context);
17687 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17688 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17690 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")))))))));
17693 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17695 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17698 if(type && (type->kind == 20))
17700 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)))
17702 struct Identifier * id = exp->__anon1.member.member;
17703 int typeKind = type->kind;
17704 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));
17706 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17708 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17713 if(typeKind == 3 || typeKind == 15)
17714 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17717 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17719 _class = type->__anon1._class->__anon1.registered;
17721 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17723 _class = FindClass("char *")->__anon1.registered;
17725 else if(type->kind == 13)
17727 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17728 FreeType(exp->expType);
17729 exp->expType = ProcessTypeString("uintptr", 0);
17730 exp->byReference = 1;
17734 char string[1024] = "";
17735 struct Symbol * classSym;
17737 PrintTypeNoConst(type, string, 0, 1);
17738 classSym = FindClass(string);
17740 _class = classSym->__anon1.registered;
17746 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17747 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17748 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17749 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17750 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17752 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17753 exp->__anon1.member.memberType = 1;
17754 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17755 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17758 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17760 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17761 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17763 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17765 member = (((void *)0));
17767 if(!member && !prop)
17768 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17769 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17770 exp->__anon1.member.thisPtr = 1;
17774 unsigned int useMemberForNonConst = 0;
17778 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17779 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);
17780 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17781 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17783 if((!prop || useMemberForNonConst) && !member)
17785 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17788 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17789 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);
17790 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17791 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17796 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17797 prop = (((void *)0));
17799 member = (((void *)0));
17803 if(!prop && !member && !method)
17804 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17805 if(!prop && !member && !method)
17809 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17812 exp->__anon1.member.memberType = 5;
17813 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17817 char structName[1024];
17818 struct Identifier * id = exp->__anon1.member.member;
17819 struct Expression * classExp = exp->__anon1.member.exp;
17822 FreeType(classExp->expType);
17823 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17824 strcpy(structName, "__ecereClassData_");
17825 FullClassNameCat(structName, type->__anon1._class->string, 0);
17827 exp->__anon1.member.member = id;
17828 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"))))))));
17830 ProcessExpressionType(exp);
17836 struct Symbol * classSym = FindClass(id->string);
17840 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17843 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17847 if(exp->__anon1.member.exp->destType)
17848 FreeType(exp->__anon1.member.exp->destType);
17850 if(method && !method->_class->symbol)
17851 method->_class->symbol = FindClass(method->_class->fullName);
17852 if(prop && !prop->_class->symbol)
17853 prop->_class->symbol = FindClass(prop->_class->fullName);
17854 exp->__anon1.member.exp->destType = __extension__ ({
17855 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17857 __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;
17862 exp->__anon1.member.memberType = 1;
17863 if(!prop->dataType)
17864 ProcessPropertyType(prop);
17865 exp->expType = prop->dataType;
17866 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17868 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17870 CopyTypeInto(type, exp->expType);
17871 type->refCount = 1;
17872 type->constant = 1;
17873 exp->expType = type;
17875 else if(prop->dataType)
17876 prop->dataType->refCount++;
17880 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17882 FreeExpContents(exp);
17884 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17885 ProcessExpressionType(exp);
17888 exp->__anon1.member.memberType = 3;
17889 DeclareStruct(curExternal, _class->fullName, 0, 1);
17890 if(member->_class != _class)
17891 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17892 if(!member->dataType)
17894 struct Context * context = SetupTemplatesContext(_class);
17896 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17897 FinishTemplatesContext(context);
17899 if(exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 2)
17900 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
17901 exp->expType = member->dataType;
17902 if(member->dataType)
17903 member->dataType->refCount++;
17905 else if(revConvert)
17907 exp->__anon1.member.memberType = 4;
17908 exp->expType = MkClassType(revConvert->_class->fullName);
17913 exp->__anon1.member.memberType = 2;
17915 if(!method->dataType)
17916 ProcessMethodType(method);
17917 exp->expType = __extension__ ({
17918 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17920 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17922 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17923 exp->expType->__anon1.__anon3.usedClass = _class;
17925 else if(!classProp)
17927 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17929 FreeExpContents(exp);
17931 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17932 FreeType(exp->expType);
17933 exp->expType = MkClassType("ecere::com::Class");
17936 yylloc = exp->__anon1.member.member->loc;
17937 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17939 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17941 if(_class && exp->expType)
17943 struct __ecereNameSpace__ecere__com__Class * tClass;
17945 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17946 while(tClass && !tClass->templateClass)
17947 tClass = tClass->base;
17948 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17951 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17952 struct __ecereNameSpace__ecere__com__Class * sClass;
17954 for(sClass = tClass; sClass; sClass = sClass->base)
17957 if(sClass->templateClass)
17958 sClass = sClass->templateClass;
17959 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17961 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17963 for(sClass = sClass->base; sClass; sClass = sClass->base)
17964 id += sClass->templateParams.count;
17972 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17974 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17975 struct Context * context = SetupTemplatesContext(tClass);
17976 unsigned int constant = exp->expType->constant;
17977 unsigned int passAsTemplate = 0;
17978 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17979 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17981 if(t && t->kind == 8 && t->__anon1._class)
17982 thisClassFrom = t->__anon1._class->__anon1.registered;
17984 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
17986 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17987 FreeType(exp->expType);
17988 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17989 exp->expType->thisClassFrom = thisClassFrom;
17990 if(exp->expType->kind == 8 && constant)
17991 exp->expType->constant = 1;
17992 else if(exp->expType->kind == 13)
17994 struct Type * t = exp->expType->__anon1.type;
17996 while(t->kind == 13)
17997 t = t->__anon1.type;
17999 t->constant = constant;
18003 if(exp->expType->kind == 21)
18005 FreeType(exp->expType);
18006 exp->expType = ReplaceThisClassType(_class);
18009 exp->expType->passAsTemplate = 1;
18012 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18013 if(exp->destType->kind == 8 && constant)
18014 exp->destType->constant = 1;
18015 else if(exp->destType->kind == 13)
18017 struct Type * t = exp->destType->__anon1.type;
18019 while(t->kind == 13)
18020 t = t->__anon1.type;
18022 t->constant = constant;
18024 if(exp->destType->kind == 21)
18026 FreeType(exp->destType);
18027 exp->destType = ReplaceThisClassType(_class);
18031 FinishTemplatesContext(context);
18034 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)
18037 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18038 struct __ecereNameSpace__ecere__com__Class * sClass;
18040 for(sClass = tClass; sClass; sClass = sClass->base)
18043 if(sClass->templateClass)
18044 sClass = sClass->templateClass;
18045 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18047 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18049 for(sClass = sClass->base; sClass; sClass = sClass->base)
18050 id += sClass->templateParams.count;
18060 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18061 struct Context * context = SetupTemplatesContext(tClass);
18062 struct Type * basicType;
18064 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18067 if(basicType->kind == 21)
18069 FreeType(basicType);
18070 basicType = ReplaceThisClassType(_class);
18072 FreeType(exp->expType);
18073 exp->expType = __extension__ ({
18074 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18076 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18080 exp->destType = exp->expType;
18081 exp->destType->refCount++;
18084 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18085 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18086 struct Declarator * decl;
18088 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18091 exp->destType->refCount++;
18093 exp->expType->refCount++;
18095 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18096 exp->__anon1.cast.exp = newExp;
18099 FinishTemplatesContext(context);
18102 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18104 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18108 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18110 int paramCount = 0;
18111 int lastParam = -1;
18112 char templateString[1024];
18113 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18115 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18116 while(cClass != expClass)
18118 struct __ecereNameSpace__ecere__com__Class * sClass;
18120 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18123 for(param = cClass->templateParams.first; param; param = param->next)
18125 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18127 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18128 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18130 while(cClassCur != tClass && !paramCur)
18132 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18134 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18136 cClassCur = sClassCur;
18137 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18139 if(!strcmp(paramCur->name, param->name))
18146 if(paramCur && paramCur->type == 0)
18147 arg = tClass->templateArgs[cp];
18149 arg = expClass->templateArgs[p];
18151 char argument[256];
18153 argument[0] = '\0';
18154 switch(param->type)
18158 char expString[1024];
18159 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18160 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18161 struct Expression * exp;
18162 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18164 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18165 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18166 ProcessExpressionType(exp);
18167 ComputeExpression(exp);
18168 expString[0] = '\0';
18169 PrintExpression(exp, expString);
18170 strcat(argument, expString);
18171 FreeExpression(exp);
18176 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18181 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18182 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18189 strcat(templateString, ", ");
18190 if(lastParam != p - 1)
18192 strcat(templateString, param->name);
18193 strcat(templateString, " = ");
18195 strcat(templateString, argument);
18204 int len = strlen(templateString);
18206 if(templateString[len - 1] == '>')
18207 templateString[len++] = ' ';
18208 templateString[len++] = '>';
18209 templateString[len++] = '\0';
18211 FreeType(exp->expType);
18213 struct Context * context = SetupTemplatesContext(tClass);
18215 exp->expType = ProcessTypeString(templateString, 0);
18216 FinishTemplatesContext(context);
18223 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)");
18225 else if(type && (type->kind == 9 || type->kind == 10))
18227 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18231 exp->expType = memberType;
18233 memberType->refCount++;
18238 char expString[10240];
18240 expString[0] = '\0';
18243 PrintExpression(exp, expString);
18244 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18246 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18248 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18250 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18252 struct Identifier * id = exp->__anon1.member.member;
18253 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));
18257 FreeType(exp->expType);
18258 exp->expType = ReplaceThisClassType(_class);
18262 yylloc = oldyylloc;
18267 struct Type * destType = exp->destType;
18269 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18271 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18273 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18277 ProcessExpressionType(exp);
18284 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18286 if(classSym && classSym->__anon1.registered)
18288 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18291 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18294 DeclareStruct(curExternal, classSym->string, 0, 1);
18295 FreeSpecifier(exp->__anon1._class);
18296 FullClassNameCat(name, classSym->string, 0);
18300 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18304 struct Expression * e;
18307 if(b->structSize == b->offset)
18308 exp->__anon1.op.exp1 = MkExpConstant("0");
18310 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18311 exp->__anon1.op.op = '+';
18313 while(b->offset != 0)
18315 struct Symbol * sym;
18316 struct Expression * typeSize;
18319 sym = FindClass(b->fullName);
18321 DeclareStruct(curExternal, sym->string, 0, 1);
18322 FullClassNameCat(name, sym->string, 0);
18323 if(b->structSize == b->offset)
18324 typeSize = MkExpConstant("0");
18326 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18327 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18328 e = e->__anon1.op.exp2;
18334 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18336 FreeSpecifier(exp->__anon1._class);
18337 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18342 char className[1024];
18344 strcpy(className, "__ecereClass_");
18345 FullClassNameCat(className, classSym->string, 1);
18346 DeclareClass(curExternal, classSym, className);
18347 FreeExpContents(exp);
18349 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18350 exp->__anon1.member.member = MkIdentifier("structSize");
18354 exp->expType = __extension__ ({
18355 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18357 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18363 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18365 exp->expType = __extension__ ({
18366 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18368 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18370 exp->isConstant = 1;
18371 DeclareType(curExternal, type, 1, 0);
18377 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18380 FreeType(exp->__anon1.cast.exp->destType);
18381 exp->__anon1.cast.exp->destType = type;
18384 ProcessExpressionType(exp->__anon1.cast.exp);
18387 exp->expType = type;
18388 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18390 void * prev = exp->prev, * next = exp->next;
18391 struct Type * expType = exp->__anon1.cast.exp->destType;
18392 struct Expression * castExp = exp->__anon1.cast.exp;
18393 struct Type * destType = exp->destType;
18396 expType->refCount++;
18397 FreeType(exp->expType);
18398 FreeTypeName(exp->__anon1.cast.typeName);
18400 FreeType(exp->expType);
18401 FreeType(exp->destType);
18402 exp->expType = expType;
18403 exp->destType = destType;
18404 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18410 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18416 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18418 exp->expType = type;
18423 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18425 ProcessExpressionType(exp->__anon1.vaArg.exp);
18426 exp->expType = type;
18431 struct Expression * e;
18432 struct Type * t = exp->destType;
18434 if(t && !exp->destType->casted)
18436 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18437 CopyTypeInto(t, exp->destType);
18442 exp->isConstant = 1;
18443 FreeType(exp->__anon1.cond.cond->destType);
18444 exp->__anon1.cond.cond->destType = MkClassType("bool");
18445 exp->__anon1.cond.cond->destType->truth = 1;
18446 ProcessExpressionType(exp->__anon1.cond.cond);
18447 if(!exp->__anon1.cond.cond->isConstant)
18448 exp->isConstant = 0;
18449 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18453 FreeType(e->destType);
18456 e->destType->refCount++;
18458 ProcessExpressionType(e);
18461 exp->expType = e->expType;
18463 e->expType->refCount++;
18466 exp->isConstant = 0;
18468 FreeType(exp->__anon1.cond.elseExp->destType);
18469 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18470 if(exp->__anon1.cond.elseExp->destType)
18471 exp->__anon1.cond.elseExp->destType->refCount++;
18472 ProcessExpressionType(exp->__anon1.cond.elseExp);
18473 if(!exp->__anon1.cond.elseExp->isConstant)
18474 exp->isConstant = 0;
18480 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18482 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18484 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18486 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18488 exp->destType->refCount++;
18490 ProcessStatement(exp->__anon1.compound);
18491 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18493 exp->expType->refCount++;
18499 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18501 if(spec && spec->type == 1)
18503 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18504 exp->expType->kind = 19;
18505 exp->byReference = 1;
18509 exp->expType = MkClassType("ecere::com::Class");
18510 exp->byReference = 1;
18516 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18520 struct Identifier * id = exp->__anon1.classData.id;
18521 char structName[1024];
18522 struct Expression * classExp;
18524 strcpy(structName, "__ecereClassData_");
18525 FullClassNameCat(structName, _class->fullName, 0);
18527 exp->__anon1.member.member = id;
18528 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18529 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18531 classExp = MkExpIdentifier(MkIdentifier("class"));
18532 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"))))))));
18533 ProcessExpressionType(exp);
18540 struct Type * type = (((void *)0));
18541 const char * typeString = (((void *)0));
18542 char typeStringBuf[1024];
18544 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))
18546 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18548 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18550 else if(exp->__anon1.list)
18552 struct Expression * e;
18554 for(e = (*exp->__anon1.list).first; e; e = e->next)
18556 ProcessExpressionType(e);
18566 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18570 e->expType = (((void *)0));
18571 e = (*exp->__anon1.list).first;
18572 ProcessExpressionType(e);
18575 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18577 FreeType(e->expType);
18578 e->expType = (((void *)0));
18580 type = (((void *)0));
18588 FreeType(e->expType);
18589 e->expType = (((void *)0));
18595 typeStringBuf[0] = '\0';
18596 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18597 typeString = typeStringBuf;
18599 type = (((void *)0));
18604 char templateString[1024];
18605 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18606 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18607 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18608 struct Expression * expExt;
18609 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18611 sprintf(templateString, "Container<%s>", typeString);
18612 if(exp->__anon1.list)
18614 struct Expression * e;
18616 type = ProcessTypeString(typeString, 0);
18617 while((e = (*exp->__anon1.list).first))
18619 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18620 e->destType = type;
18622 ProcessExpressionType(e);
18623 ListAdd(initializers, MkInitializerAssignment(e));
18626 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18628 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18629 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18630 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18631 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18632 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18633 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18634 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18635 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18636 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18637 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18638 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18640 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18642 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18643 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18644 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18645 exp->expType = ProcessTypeString(templateString, 0);
18647 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18648 ProcessExpressionType(expExt);
18652 exp->expType = ProcessTypeString("Container", 0);
18653 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18658 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18660 FreeType(exp->expType);
18661 exp->expType = ReplaceThisClassType(thisClass);
18663 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)
18665 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18669 if(exp->expType->kind != 15)
18671 struct Type * member;
18672 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18674 FreeType(exp->expType);
18675 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18676 exp->expType->kind = symbol->type->kind;
18677 exp->expType->refCount++;
18678 exp->expType->__anon1.__anon1.enumName = enumName;
18679 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18680 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18681 member->refCount++;
18685 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18687 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18689 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);
18691 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18697 if(exp->destType && (exp->destType->kind == 18))
18699 else if(exp->destType && !exp->destType->keepCast)
18701 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18702 exp->needTemplateCast = 1;
18703 if(exp->destType->kind == 0)
18705 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18707 unsigned int invalidCast = 0;
18709 if(inCompiler && exp->destType->count && exp->expType)
18711 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18712 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18714 if(c1 && c1->type != 1)
18715 c1 = (((void *)0));
18716 if(c2 && c2->type != 1)
18717 c2 = (((void *)0));
18718 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18721 if(!exp->destType->count || unresolved || invalidCast)
18726 if(exp->destType->kind != 14)
18733 char expString[10240];
18735 expString[0] = '\0';
18736 PrintType(exp->destType, type2, 0, 1);
18739 PrintExpression(exp, expString);
18740 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18743 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18744 else if(exp->type != 16)
18745 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18750 char expString[10240];
18752 expString[0] = '\0';
18755 PrintExpression(exp, expString);
18756 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18759 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18760 else if(exp->type != 16)
18761 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18773 PrintType(exp->expType, type1, 0, 1);
18774 PrintType(exp->destType, type2, 0, 1);
18776 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)))
18780 struct Expression * nbExp = GetNonBracketsExp(exp);
18781 unsigned int skipWarning = 0;
18782 int kind = exp->destType->kind;
18784 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
18786 int op = nbExp->__anon1.op.op;
18787 struct Expression * nbExp1, * nbExp2;
18794 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18795 from = nbExp1->expType->promotedFrom;
18796 if(from == 1 || (kind == 2 && from == 2))
18801 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18802 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18803 from = nbExp1->expType->promotedFrom;
18804 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
18806 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
18808 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
18809 int s = from == 1 ? 8 : 16;
18811 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
18812 s = nbExp1->expType->bitMemberSize;
18813 if(nbExp->__anon1.op.op == RIGHT_OP)
18817 if(s <= (kind == 1 ? 8 : 16))
18822 if(!exp->destType->isSigned)
18824 struct Expression * nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18825 struct Expression * nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18826 int from = nbExp2->expType->promotedFrom;
18828 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
18830 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
18832 if(n == (from == 1 ? 255 : 65535))
18841 char expString[10240];
18843 expString[0] = '\0';
18846 PrintExpression(exp, expString);
18847 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18849 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")))
18852 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18854 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18859 FreeType(exp->expType);
18860 exp->destType->refCount++;
18861 exp->expType = exp->destType;
18867 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))
18869 struct Expression * nbExp = GetNonBracketsExp(exp);
18871 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18873 struct Expression * e = MoveExpContents(exp);
18875 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18877 exp->__anon1.cast.exp->destType = exp->destType;
18879 exp->destType->refCount++;
18880 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18884 else if(unresolved)
18886 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18887 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);
18888 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18889 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18891 else if(!exp->expType && exp->type != 16)
18893 char expString[10240];
18895 expString[0] = '\0';
18898 PrintExpression(exp, expString);
18899 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18901 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18904 ApplyAnyObjectLogic(exp);
18905 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)))
18907 exp->byReference = 1;
18909 yylloc = oldyylloc;
18912 static void ProcessFunction(struct FunctionDefinition * function)
18914 struct Identifier * id = GetDeclId(function->declarator);
18915 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18916 struct Type * type = symbol ? symbol->type : (((void *)0));
18917 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18918 struct Context * oldTopContext = topContext;
18920 yylloc = function->loc;
18921 if(type && type->__anon1.__anon2.thisClass)
18923 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18924 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18925 char className[1024];
18926 char structName[1024];
18927 struct Declarator * funcDecl;
18928 struct Symbol * thisSymbol;
18929 unsigned int typedObject = 0;
18931 if(_class && !_class->base)
18933 _class = currentClass;
18934 if(_class && !_class->symbol)
18935 _class->symbol = FindClass(_class->fullName);
18936 classSym = _class ? _class->symbol : (((void *)0));
18939 thisClass = _class;
18940 if(inCompiler && _class)
18942 if(type->kind == 11)
18944 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18946 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18948 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18951 if(type->classObjectType != 1)
18953 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18954 symbol->type->__anon1.__anon2.staticMethod = 1;
18955 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18956 symbol->type->extraParam = 0;
18959 strcpy(className, "__ecereClass_");
18960 FullClassNameCat(className, _class->fullName, 1);
18962 FullClassNameCat(structName, _class->fullName, 0);
18963 funcDecl = GetFuncDecl(function->declarator);
18966 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18968 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18970 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18972 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18973 FreeTypeName(param);
18976 if(!function->propertyNoThis)
18978 struct TypeName * thisParam = (((void *)0));
18980 if(type->classObjectType != 1)
18982 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18983 if(!funcDecl->__anon1.function.parameters)
18984 funcDecl->__anon1.function.parameters = MkList();
18985 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18989 if(type->classObjectType != 1)
18991 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18992 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18994 thisParam = __extension__ ({
18995 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18997 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18999 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19000 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19004 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19006 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19008 funcDecl = GetFuncDecl(initDecl->declarator);
19011 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19013 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19015 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19017 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19018 FreeTypeName(param);
19021 if(type->classObjectType != 1)
19023 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19025 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19027 if(!funcDecl->__anon1.function.parameters)
19028 funcDecl->__anon1.function.parameters = MkList();
19029 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19037 if(type->classObjectType != 1)
19039 thisSymbol = __extension__ ({
19040 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19042 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19044 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19045 if(typedObject && thisSymbol->type)
19047 thisSymbol->type->classObjectType = 2;
19048 thisSymbol->type->byReference = type->byReference;
19049 thisSymbol->type->typedByReference = type->byReference;
19053 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19055 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19058 struct __ecereNameSpace__ecere__com__Class * base;
19060 for(base = _class; base && base->type != 1000; base = base->next)
19062 for(member = base->membersAndProperties.first; member; member = member->next)
19063 if(!member->isProperty)
19069 for(member = _class->membersAndProperties.first; member; member = member->next)
19070 if(!member->isProperty)
19074 char pointerName[1024];
19075 struct Declaration * decl;
19076 struct Initializer * initializer;
19077 struct Expression * exp, * bytePtr;
19079 strcpy(pointerName, "__ecerePointer_");
19080 FullClassNameCat(pointerName, _class->fullName, 0);
19082 char className[1024];
19084 strcpy(className, "__ecereClass_");
19085 FullClassNameCat(className, classSym->string, 1);
19086 DeclareClass(curExternal, classSym, className);
19088 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19091 struct Expression * e;
19093 if(_class->offset && _class->offset == _class->base->structSize)
19095 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19096 ProcessExpressionType(e);
19102 sprintf(string, "%d", _class->offset);
19103 e = MkExpConstant(string);
19105 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19109 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19111 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19112 exp->expType = __extension__ ({
19113 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19115 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19116 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19118 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19119 }), __ecereInstance2;
19123 yylloc = function->body->loc;
19124 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19126 struct Context * prevContext = curContext;
19127 struct __ecereNameSpace__ecere__sys__OldList * list;
19129 curContext = function->body->__anon1.compound.context;
19130 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19131 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19132 curContext = prevContext;
19134 decl->symbol = (((void *)0));
19135 if(!function->body->__anon1.compound.declarations)
19136 function->body->__anon1.compound.declarations = MkList();
19137 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19143 thisClass = (((void *)0));
19146 FreeSpecifier(id->_class);
19147 id->_class = (((void *)0));
19148 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19150 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19152 id = GetDeclId(initDecl->declarator);
19153 FreeSpecifier(id->_class);
19154 id->_class = (((void *)0));
19158 topContext = function->body->__anon1.compound.context;
19160 struct FunctionDefinition * oldFunction = curFunction;
19162 curFunction = function;
19164 ProcessStatement(function->body);
19165 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19167 struct Statement * prevCompound = curCompound;
19168 struct Context * prevContext = curContext;
19169 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19171 if(!function->body->__anon1.compound.statements)
19172 function->body->__anon1.compound.statements = MkList();
19173 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19174 curCompound = function->body;
19175 curContext = function->body->__anon1.compound.context;
19176 ProcessStatement(fireWatchers);
19177 curContext = prevContext;
19178 curCompound = prevCompound;
19180 curFunction = oldFunction;
19182 if(function->declarator)
19184 ProcessDeclarator(function->declarator, 1);
19186 topContext = oldTopContext;
19187 thisClass = oldThisClass;
19190 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19192 struct ClassDef * def;
19193 struct External * external = curExternal;
19194 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19196 for(def = definitions->first; def; def = def->next)
19200 if(def->__anon1.function->declarator)
19201 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19203 curExternal = external;
19204 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19206 else if(def->type == 2)
19208 if(def->__anon1.decl->type == 2)
19210 thisClass = regClass;
19211 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19212 thisClass = (((void *)0));
19216 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19219 thisClass = regClass;
19220 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19221 thisClass = backThisClass;
19224 else if(def->type == 1 && def->__anon1.defProperties)
19226 struct MemberInit * defProperty;
19227 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);
19229 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19230 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19232 thisClass = regClass;
19233 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19234 thisClass = (((void *)0));
19236 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19237 FreeSymbol(thisSymbol);
19239 else if(def->type == 3 && def->__anon1.propertyDef)
19241 struct PropertyDef * prop = def->__anon1.propertyDef;
19243 thisClass = regClass;
19248 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19250 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19252 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19253 ProcessStatement(prop->setStmt);
19259 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19261 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19263 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19264 ProcessStatement(prop->getStmt);
19266 if(prop->issetStmt)
19270 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19272 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19274 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19275 ProcessStatement(prop->issetStmt);
19277 thisClass = (((void *)0));
19279 else if(def->type == 4 && def->__anon1.propertyWatch)
19281 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19283 thisClass = regClass;
19284 if(propertyWatch->compound)
19286 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);
19288 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19289 curExternal = (((void *)0));
19290 ProcessStatement(propertyWatch->compound);
19292 thisClass = (((void *)0));
19297 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19299 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19301 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19302 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19303 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19304 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19305 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19306 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19307 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19308 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19309 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19310 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19311 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19312 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19313 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19314 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19315 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19316 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19317 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19318 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19319 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19320 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19321 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19322 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19323 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19324 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19325 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19326 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19327 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19328 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19329 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19330 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19331 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19332 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19333 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19334 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19335 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19336 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19337 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19338 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19339 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19340 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19341 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19342 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19343 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19344 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19345 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19346 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19347 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19348 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19349 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19350 __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);
19351 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19352 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19353 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19354 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19355 __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);
19356 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19357 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19358 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19359 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19360 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19361 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19362 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19363 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19364 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19365 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19366 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19367 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19368 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19369 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19370 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19371 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)
19372 __ecereClass_Conversion = class;
19373 __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);
19374 __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);
19375 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19376 __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);
19377 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19378 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19379 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19380 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19381 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19382 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19383 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19384 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19385 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19386 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19387 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19388 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19389 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19390 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19391 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19392 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19393 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19394 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19395 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19396 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19397 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19398 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);