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 * GetNonBracketsExp(struct Expression * exp);
648 extern struct Expression * CopyExpression(struct Expression * exp);
650 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
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)) : 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)) : 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)) : 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)) : 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)) : 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)) : 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)) : 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)) : 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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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 ? ((op1->__anon1.s /= value2)) : 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 ? ((op1->__anon1.us /= value2)) : 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 ? ((op1->__anon1.c /= value2)) : 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 ? ((op1->__anon1.uc /= value2)) : 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 ? ((op1->__anon1.s %= value2)) : 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 ? ((op1->__anon1.us %= value2)) : 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 ? ((op1->__anon1.c %= value2)) : 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 ? ((op1->__anon1.uc %= value2)) : 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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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((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;
13554 if(GetChar(e, &value))
13556 FreeExpContents(exp);
13557 exp->__anon1.__anon1.constant = PrintChar(value);
13563 unsigned char value = 0;
13565 if(GetUChar(e, &value))
13567 FreeExpContents(exp);
13568 exp->__anon1.__anon1.constant = PrintUChar(value);
13578 if(GetShort(e, &value))
13580 FreeExpContents(exp);
13581 exp->__anon1.__anon1.constant = PrintShort(value);
13587 unsigned short value = 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 * nbExp = GetNonBracketsExp(sourceExp);
13809 struct Expression * computedExp = nbExp;
13812 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)
13814 computedExp = CopyExpression(nbExp);
13815 ComputeExpression(computedExp);
13817 source = sourceExp->expType;
13818 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13820 if(computedExp != nbExp)
13822 FreeExpression(computedExp);
13823 computedExp = nbExp;
13828 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13830 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13832 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13834 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13836 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13838 if(sourceBase == destBase)
13840 if(computedExp != nbExp)
13842 FreeExpression(computedExp);
13843 computedExp = nbExp;
13852 struct __ecereNameSpace__ecere__sys__OldList * specs;
13853 unsigned int flag = 0;
13854 long long value = (((int)0x7fffffff));
13856 source->refCount++;
13857 if(computedExp->type == 2)
13859 if(source->isSigned)
13860 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13862 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13864 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13866 if(source->isSigned)
13867 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13869 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13871 if(computedExp != nbExp)
13873 FreeExpression(computedExp);
13874 computedExp = nbExp;
13876 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13879 source = __extension__ ({
13880 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13882 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13885 if(dest->kind == 8)
13887 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13889 if(_class && _class->type == 3)
13891 if(source->kind != 8)
13893 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13894 struct Type * tempDest, * tempSource;
13896 for(; _class->base->type != 1000; _class = _class->base)
13899 tempDest = tempType;
13900 tempType->kind = 8;
13901 if(!_class->symbol)
13902 _class->symbol = FindClass(_class->fullName);
13903 tempType->__anon1._class = _class->symbol;
13904 tempType->truth = dest->truth;
13905 if(tempType->__anon1._class)
13906 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13907 backupSourceExpType = sourceExp->expType;
13908 if(dest->passAsTemplate)
13910 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13911 CopyTypeInto(sourceExp->expType, dest);
13912 sourceExp->expType->passAsTemplate = 0;
13916 sourceExp->expType = dest;
13920 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13923 if(_class && _class->type == 2 && source->kind != 8)
13925 if(!dest->__anon1._class->__anon1.registered->dataType)
13926 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13927 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13930 FreeType(sourceExp->expType);
13931 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13932 source->refCount++;
13935 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13937 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13938 struct Declarator * decl;
13941 ReadString(string, sourceExp->__anon1.__anon2.string);
13942 decl = SpecDeclFromString(string, specs, (((void *)0)));
13943 FreeExpContents(sourceExp);
13944 FreeType(sourceExp->expType);
13945 sourceExp->type = 24;
13946 sourceExp->__anon1._classExp.specifiers = specs;
13947 sourceExp->__anon1._classExp.decl = decl;
13948 sourceExp->expType = dest;
13952 if(backupSourceExpType)
13953 FreeType(backupSourceExpType);
13957 else if(source->kind == 8)
13959 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13961 if(_class && (_class->type == 3 || _class->type == 2))
13963 if(dest->kind != 8)
13965 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13966 struct Type * tempDest, * tempSource;
13968 if(!source->__anon1._class->__anon1.registered->dataType)
13969 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13970 for(; _class->base->type != 1000; _class = _class->base)
13973 tempSource = tempType;
13974 tempType->kind = 8;
13975 tempType->__anon1._class = FindClass(_class->fullName);
13976 tempType->truth = source->truth;
13977 tempType->classObjectType = source->classObjectType;
13978 if(tempType->__anon1._class)
13979 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13980 if(conversions && conversions->last)
13982 ((struct Conversion *)conversions->last)->resultType = dest;
13985 FreeType(sourceExp->expType);
13986 sourceExp->expType = MkClassType(_class->fullName);
13987 sourceExp->expType->truth = source->truth;
13988 sourceExp->expType->classObjectType = source->classObjectType;
13989 if(!sourceExp->destType)
13991 FreeType(sourceExp->destType);
13992 sourceExp->destType = sourceExp->expType;
13993 if(sourceExp->expType)
13994 sourceExp->expType->refCount++;
13996 if(!_class->dataType)
13997 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13999 dest = MkClassType(source->__anon1._class->string);
14000 dest->truth = source->truth;
14001 dest->classObjectType = source->classObjectType;
14003 source = _class->dataType;
14004 source->refCount++;
14005 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
14011 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14018 if(dest->kind == 8)
14020 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14021 unsigned int fittingValue = 0;
14023 if(_class && _class->type == 4)
14025 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14026 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14028 if(c && value >= 0 && value <= c->largest)
14031 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14033 if(_class->type == 0 || _class->type == 5)
14035 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14037 *newExp = *sourceExp;
14038 if(sourceExp->destType)
14039 sourceExp->destType->refCount++;
14040 if(sourceExp->expType)
14041 sourceExp->expType->refCount++;
14042 sourceExp->type = 11;
14043 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14044 sourceExp->__anon1.cast.exp = newExp;
14045 FreeType(sourceExp->expType);
14046 sourceExp->expType = (((void *)0));
14047 ProcessExpressionType(sourceExp);
14050 FreeType(sourceExp->expType);
14051 sourceExp->expType = dest;
14056 if(backupSourceExpType)
14057 FreeType(backupSourceExpType);
14060 if(!_class->dataType)
14061 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14063 dest = _class->dataType;
14066 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))
14068 specs = MkListOne(MkSpecifier(DOUBLE));
14070 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))
14072 specs = MkListOne(MkSpecifier(FLOAT));
14074 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))
14077 if(!dest->isSigned)
14078 ListAdd(specs, MkSpecifier(UNSIGNED));
14079 ListAdd(specs, MkSpecifier(INT64));
14081 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14084 if(!dest->isSigned)
14085 ListAdd(specs, MkSpecifier(UNSIGNED));
14086 ListAdd(specs, MkSpecifier(INT));
14088 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14091 if(!dest->isSigned)
14092 ListAdd(specs, MkSpecifier(UNSIGNED));
14093 ListAdd(specs, MkSpecifier(SHORT));
14095 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14098 if(!dest->isSigned)
14099 ListAdd(specs, MkSpecifier(UNSIGNED));
14100 ListAdd(specs, MkSpecifier(CHAR));
14106 if(backupSourceExpType)
14108 if(sourceExp->expType)
14109 FreeType(sourceExp->expType);
14110 sourceExp->expType = backupSourceExpType;
14115 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))
14117 specs = MkListOne(MkSpecifier(DOUBLE));
14119 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))
14121 specs = MkListOne(MkSpecifier(FLOAT));
14123 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14126 ListAdd(specs, MkSpecifier(BOOL));
14128 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(source->kind == 3)
14135 if(!dest->isSigned)
14136 ListAdd(specs, MkSpecifier(UNSIGNED));
14137 ListAdd(specs, MkSpecifier(CHAR));
14140 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)))))
14142 if(source->kind == 3)
14147 if(!dest->isSigned)
14148 ListAdd(specs, MkSpecifier(UNSIGNED));
14149 ListAdd(specs, MkSpecifier(SHORT));
14152 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14155 if(!dest->isSigned)
14156 ListAdd(specs, MkSpecifier(UNSIGNED));
14157 ListAdd(specs, MkSpecifier(INT));
14159 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14162 if(!dest->isSigned)
14163 ListAdd(specs, MkSpecifier(UNSIGNED));
14164 ListAdd(specs, MkSpecifier(INT64));
14166 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14168 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14174 if(backupSourceExpType)
14176 if(sourceExp->expType)
14177 FreeType(sourceExp->expType);
14178 sourceExp->expType = backupSourceExpType;
14182 if(!flag && !sourceExp->opDestType)
14184 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14186 *newExp = *sourceExp;
14187 newExp->prev = (((void *)0));
14188 newExp->next = (((void *)0));
14189 if(sourceExp->destType)
14190 sourceExp->destType->refCount++;
14191 if(sourceExp->expType)
14192 sourceExp->expType->refCount++;
14193 sourceExp->type = 11;
14194 if(realDest->kind == 8)
14196 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14197 FreeList(specs, (void *)(FreeSpecifier));
14200 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14201 if(newExp->type == 4)
14203 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14206 sourceExp->__anon1.cast.exp = newExp;
14207 FreeType(sourceExp->expType);
14208 sourceExp->expType = (((void *)0));
14209 ProcessExpressionType(sourceExp);
14212 FreeList(specs, (void *)(FreeSpecifier));
14215 if(backupSourceExpType)
14216 FreeType(backupSourceExpType);
14221 if(computedExp != nbExp)
14223 FreeExpression(computedExp);
14224 computedExp = nbExp;
14226 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14227 sourceExp = (*sourceExp->__anon1.list).last;
14228 if(sourceExp->type == 0)
14230 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14232 if(dest->kind == 8)
14234 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14236 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14237 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14241 for(; _class && _class->type == 4; _class = _class->base)
14243 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14244 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14246 for(value = e->values.first; value; value = value->next)
14248 if(!strcmp(value->name, id->string))
14253 FreeType(sourceExp->expType);
14254 sourceExp->isConstant = 1;
14255 sourceExp->expType = MkClassType(_class->fullName);
14256 if(inCompiler || inPreCompiler || inDebugger)
14258 FreeExpContents(sourceExp);
14259 sourceExp->type = 2;
14260 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14261 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14263 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14272 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14283 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14285 unsigned int result = 1;
14289 struct __ecereNameSpace__ecere__sys__OldList converts =
14293 struct Conversion * convert;
14295 if(destType->kind == 0)
14297 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14301 for(convert = converts.first; convert; convert = convert->next)
14303 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14307 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14308 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14311 newExp->prev = (((void *)0));
14312 newExp->next = (((void *)0));
14313 newExp->destType = (((void *)0));
14317 exp->addedThis = 1;
14318 exp->__anon1.member.exp = newExp;
14319 FreeType(exp->__anon1.member.exp->expType);
14320 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14321 exp->__anon1.member.exp->expType->classObjectType = objectType;
14322 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14323 exp->__anon1.member.memberType = 1;
14324 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14327 exp->expType->refCount++;
14328 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14334 exp->addedThis = 1;
14335 exp->__anon1.member.exp = newExp;
14336 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)
14338 newExp->byReference = 1;
14340 FreeType(exp->__anon1.member.exp->expType);
14341 exp->__anon1.member.exp->expType = (((void *)0));
14342 if(convert->convert->dataType)
14344 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14345 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14346 exp->__anon1.member.exp->expType->refCount = 1;
14347 exp->__anon1.member.exp->expType->classObjectType = objectType;
14348 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14350 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14351 exp->__anon1.member.memberType = 4;
14352 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14354 if(convert->resultType)
14355 convert->resultType->refCount++;
14361 FreeType(exp->expType);
14364 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14365 if(exp->destType->casted)
14368 exp->expType->refCount++;
14372 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14373 if(exp->destType->casted)
14375 if(convert->resultType)
14376 convert->resultType->refCount++;
14380 if(exp->isConstant && inCompiler)
14381 ComputeExpression(exp);
14382 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14384 if(!result && exp->expType && converts.count)
14386 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14388 if(!result && exp->expType && exp->destType)
14390 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))
14397 static void ProcessFunction(struct FunctionDefinition * function);
14399 void ProcessInstantiationType(struct Instantiation * inst)
14401 yylloc = inst->loc;
14404 struct MembersInit * members;
14405 struct Symbol * classSym;
14406 struct __ecereNameSpace__ecere__com__Class * _class;
14408 classSym = inst->_class->__anon1.__anon1.symbol;
14409 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14410 if(!_class || _class->type != 5)
14411 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14412 afterExternal = afterExternal ? afterExternal : curExternal;
14414 ProcessExpressionType(inst->exp);
14415 inst->isConstant = 1;
14418 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14419 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14420 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14421 int subMemberStackPos = 0;
14423 for(members = (*inst->members).first; members; members = members->next)
14425 switch(members->type)
14430 static unsigned int instMethodID = 0;
14431 struct External * external = curExternal;
14432 struct Context * context = curContext;
14433 struct Declarator * declarator = members->__anon1.function->declarator;
14434 struct Identifier * nameID = GetDeclId(declarator);
14435 char * unmangled = nameID ? nameID->string : (((void *)0));
14436 struct Expression * exp;
14437 struct External * createdExternal = (((void *)0));
14443 strcpy(name, "__ecereInstMeth_");
14444 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14446 strcat(name, nameID->string);
14448 sprintf(number, "_%08d", instMethodID++);
14449 strcat(name, number);
14450 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14454 struct Symbol * symbol = declarator->symbol;
14455 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14457 if(method && method->type == 1)
14459 symbol->__anon1.method = method;
14460 ProcessMethodType(method);
14461 if(!symbol->type->__anon1.__anon2.thisClass)
14463 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14465 if(!currentClass->symbol)
14466 currentClass->symbol = FindClass(currentClass->fullName);
14467 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14471 if(!_class->symbol)
14472 _class->symbol = FindClass(_class->fullName);
14473 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14476 DeclareType(curExternal, symbol->type, 1, 1);
14480 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14483 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14486 FreeSpecifier(nameID->_class);
14487 nameID->_class = (((void *)0));
14489 curExternal = createdExternal;
14492 if(createdExternal->__anon1.function)
14493 ProcessFunction(createdExternal->__anon1.function);
14495 else if(declarator)
14497 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14498 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14500 curExternal = external;
14501 curContext = context;
14504 FreeClassFunction(members->__anon1.function);
14505 exp = QMkExpId(name);
14507 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14508 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14514 if(members->__anon1.dataMembers && classSym)
14516 struct MemberInit * member;
14517 struct Location oldyyloc = yylloc;
14519 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14521 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14522 if(member->initializer && !member->initializer->isConstant)
14523 inst->isConstant = 0;
14535 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14537 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14543 if(spec->__anon1.specifier == THISCLASS)
14548 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14549 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14550 ProcessSpecifier(spec, declareStruct, 0);
14557 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14560 DeclareType(curExternal, symbol->type, 1, 1);
14561 else if(spec->__anon1.__anon1.symbol)
14563 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14565 if(warnClasses && !c)
14566 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14567 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14573 struct Enumerator * e;
14575 if(spec->__anon1.__anon2.list)
14577 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14580 ProcessExpressionType(e->exp);
14589 if(spec->__anon1.__anon2.definitions)
14591 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14593 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14600 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14605 if(decl->__anon1.identifier->classSym)
14607 FreeSpecifier(decl->__anon1.identifier->_class);
14608 decl->__anon1.identifier->_class = (((void *)0));
14612 if(decl->__anon1.array.exp)
14613 ProcessExpressionType(decl->__anon1.array.exp);
14621 struct Identifier * id = (((void *)0));
14622 struct Specifier * classSpec = (((void *)0));
14624 if(decl->type == 4)
14626 id = GetDeclId(decl);
14627 if(id && id->_class)
14629 classSpec = id->_class;
14630 id->_class = (((void *)0));
14633 if(decl->declarator)
14634 ProcessDeclarator(decl->declarator, isFunction);
14635 if(decl->type == 4)
14639 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14641 if(!decl->__anon1.function.parameters)
14642 decl->__anon1.function.parameters = MkList();
14643 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14645 if(decl->__anon1.function.parameters)
14647 struct TypeName * param;
14649 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14651 if(param->qualifiers)
14653 struct Specifier * spec;
14655 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14657 if(spec->type == 0)
14659 if(spec->__anon1.specifier == TYPED_OBJECT)
14661 struct Declarator * d = param->declarator;
14662 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);
14665 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14666 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14667 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14668 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14669 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14670 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14674 else if(spec->__anon1.specifier == ANY_OBJECT)
14676 struct Declarator * d = param->declarator;
14678 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14679 param->qualifiers = MkListOne(MkSpecifier(VOID));
14681 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14682 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14685 else if(spec->__anon1.specifier == THISCLASS)
14690 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14691 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14692 ProcessSpecifier(spec, 0, 0);
14697 else if(spec->type == 1)
14699 ProcessSpecifier(spec, isFunction, 1);
14703 if(param->declarator)
14704 ProcessDeclarator(param->declarator, 0);
14713 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14715 yylloc = decl->loc;
14720 unsigned int declareStruct = 0;
14722 if(decl->__anon1.__anon1.declarators)
14724 struct InitDeclarator * d;
14726 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14728 struct Type * type, * subType;
14730 ProcessDeclarator(d->declarator, 0);
14731 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14734 ProcessInitializer(d->initializer, type);
14735 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14737 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14739 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14741 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14742 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14743 if(decl->__anon1.__anon1.specifiers)
14744 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14745 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14748 decl->__anon1.inst = inst;
14752 for(subType = type; subType; )
14754 if(subType->kind == 8)
14759 else if(subType->kind == 13)
14761 else if(subType->kind == 12)
14762 subType = subType->__anon1.__anon4.arrayType;
14771 if(decl->__anon1.__anon1.specifiers)
14773 struct Specifier * s;
14775 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14777 ProcessSpecifier(s, declareStruct, 1);
14784 ProcessInstantiationType(decl->__anon1.inst);
14789 struct Specifier * spec;
14790 struct Declarator * d;
14791 unsigned int declareStruct = 0;
14793 if(decl->__anon1.__anon1.declarators)
14795 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14797 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14798 struct Type * subType;
14800 ProcessDeclarator(d, 0);
14801 for(subType = type; subType; )
14803 if(subType->kind == 8)
14808 else if(subType->kind == 13)
14810 else if(subType->kind == 12)
14811 subType = subType->__anon1.__anon4.arrayType;
14818 if(decl->__anon1.__anon1.specifiers)
14820 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14821 ProcessSpecifier(spec, declareStruct, warnClasses);
14828 static void ProcessStatement(struct Statement * stmt)
14830 yylloc = stmt->loc;
14834 ProcessStatement(stmt->__anon1.labeled.stmt);
14837 if(stmt->__anon1.caseStmt.exp)
14839 FreeType(stmt->__anon1.caseStmt.exp->destType);
14840 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14842 curSwitchType->refCount++;
14843 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14844 ComputeExpression(stmt->__anon1.caseStmt.exp);
14846 if(stmt->__anon1.caseStmt.stmt)
14847 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14851 if(stmt->__anon1.compound.context)
14853 struct Declaration * decl;
14854 struct Statement * s;
14855 struct Statement * prevCompound = curCompound;
14856 struct Context * prevContext = curContext;
14858 if(!stmt->__anon1.compound.isSwitch)
14859 curCompound = stmt;
14860 curContext = stmt->__anon1.compound.context;
14861 if(stmt->__anon1.compound.declarations)
14863 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14864 ProcessDeclaration(decl, 1);
14866 if(stmt->__anon1.compound.statements)
14868 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14869 ProcessStatement(s);
14871 curContext = prevContext;
14872 curCompound = prevCompound;
14878 struct Expression * exp;
14880 if(stmt->__anon1.expressions)
14882 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14883 ProcessExpressionType(exp);
14889 struct Expression * exp;
14891 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14892 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14893 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14894 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14896 ProcessExpressionType(exp);
14898 if(stmt->__anon1.ifStmt.stmt)
14899 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14900 if(stmt->__anon1.ifStmt.elseStmt)
14901 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14906 struct Type * oldSwitchType = curSwitchType;
14908 if(stmt->__anon1.switchStmt.exp)
14910 struct Expression * exp;
14912 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14916 ProcessExpressionType(exp);
14919 curSwitchType = exp->expType;
14922 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14923 curSwitchType = oldSwitchType;
14928 if(stmt->__anon1.whileStmt.exp)
14930 struct Expression * exp;
14932 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14933 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14934 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14935 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14937 ProcessExpressionType(exp);
14940 if(stmt->__anon1.whileStmt.stmt)
14941 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14946 if(stmt->__anon1.doWhile.exp)
14948 struct Expression * exp;
14950 if((*stmt->__anon1.doWhile.exp).last)
14952 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14953 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14954 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14956 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14958 ProcessExpressionType(exp);
14961 if(stmt->__anon1.doWhile.stmt)
14962 ProcessStatement(stmt->__anon1.doWhile.stmt);
14967 struct Expression * exp;
14969 if(stmt->__anon1.forStmt.init)
14970 ProcessStatement(stmt->__anon1.forStmt.init);
14971 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14973 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14974 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14975 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14977 if(stmt->__anon1.forStmt.check)
14978 ProcessStatement(stmt->__anon1.forStmt.check);
14979 if(stmt->__anon1.forStmt.increment)
14981 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14982 ProcessExpressionType(exp);
14984 if(stmt->__anon1.forStmt.stmt)
14985 ProcessStatement(stmt->__anon1.forStmt.stmt);
14990 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14991 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14992 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14993 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14994 char iteratorType[1024];
14995 struct Type * source;
14996 struct Expression * e;
14997 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));
14998 struct Expression * arrayExp;
14999 const char * typeString = (((void *)0));
15000 int builtinCount = 0;
15002 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15006 FreeType(e->destType);
15007 e->destType = ProcessTypeString("Container", 0);
15009 if(!isBuiltin || e->next)
15010 ProcessExpressionType(e);
15012 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15013 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)))
15015 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15016 struct Symbol * symbol;
15017 struct Expression * expIt = (((void *)0));
15018 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15019 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15020 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15021 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15026 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15027 stmt->__anon1.compound.context->parent = curContext;
15028 curContext = stmt->__anon1.compound.context;
15030 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15032 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15034 isCustomAVLTree = 1;
15035 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15038 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15040 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15042 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15045 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15047 if(inCompiler && isArray)
15049 struct Declarator * decl;
15050 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15052 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15053 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15054 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15058 struct Type * type = (((void *)0));
15059 char typeStringBuf[1024];
15061 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15062 if(((struct Expression *)(*exp).last)->type == 11)
15064 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15067 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15069 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)
15071 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15073 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15075 else if(arrayExp->__anon1.list)
15077 struct Expression * e;
15079 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15081 ProcessExpressionType(e);
15091 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15095 e->expType = (((void *)0));
15096 e = (*arrayExp->__anon1.list).first;
15097 ProcessExpressionType(e);
15100 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15102 FreeType(e->expType);
15103 e->expType = (((void *)0));
15105 type = (((void *)0));
15113 FreeType(e->expType);
15114 e->expType = (((void *)0));
15120 typeStringBuf[0] = '\0';
15121 PrintType(type, typeStringBuf, 0, 1);
15122 typeString = typeStringBuf;
15130 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15131 struct Declarator * decl;
15132 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15134 if(arrayExp->__anon1.list)
15136 struct Expression * e;
15138 builtinCount = (*arrayExp->__anon1.list).count;
15139 type = ProcessTypeString(typeString, 0);
15140 while((e = (*arrayExp->__anon1.list).first))
15142 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15143 e->destType = type;
15145 ProcessExpressionType(e);
15147 ListAdd(initializers, MkInitializerAssignment(e));
15150 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15152 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15153 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15154 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15155 FreeList(exp, (void *)(FreeExpression));
15157 else if(arrayExp->__anon1.list)
15159 struct Expression * e;
15161 type = ProcessTypeString(typeString, 0);
15162 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15164 e->destType = type;
15166 ProcessExpressionType(e);
15173 arrayExp->expType = ProcessTypeString("Container", 0);
15174 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15177 else if(inCompiler && isLinkList && !isList)
15179 struct Declarator * decl;
15180 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15182 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15183 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15184 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15186 else if(inCompiler && _class->templateArgs)
15189 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15191 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15192 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)))))))));
15196 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15199 switch(block->type)
15202 if(block->__anon1.compound.context)
15203 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15206 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15207 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15208 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15209 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15212 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15213 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15216 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15217 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15220 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15221 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15224 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15225 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15228 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15229 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15235 block = MkIfStmt(filter, block, (((void *)0)));
15239 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));
15240 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15241 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15242 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15248 sprintf(count, "%d", builtinCount);
15249 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));
15250 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15251 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15252 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15254 else if(isLinkList && !isList)
15256 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15257 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15259 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15261 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));
15265 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15266 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15268 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));
15270 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15271 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15272 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15276 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15278 ProcessExpressionType(expIt);
15279 if((*stmt->__anon1.compound.declarations).first)
15280 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15282 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15283 ProcessStatement(stmt);
15286 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15288 curContext = stmt->__anon1.compound.context->parent;
15293 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15305 struct Expression * exp;
15307 if(stmt->__anon1.expressions)
15309 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15313 if(curFunction && !curFunction->type)
15314 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15315 FreeType(exp->destType);
15316 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15318 exp->destType->refCount++;
15320 ProcessExpressionType(exp);
15327 ProcessDeclaration(stmt->__anon1.decl, 1);
15332 struct AsmField * field;
15334 if(stmt->__anon1.asmStmt.inputFields)
15336 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15337 if(field->expression)
15338 ProcessExpressionType(field->expression);
15340 if(stmt->__anon1.asmStmt.outputFields)
15342 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15343 if(field->expression)
15344 ProcessExpressionType(field->expression);
15346 if(stmt->__anon1.asmStmt.clobberedFields)
15348 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15350 if(field->expression)
15351 ProcessExpressionType(field->expression);
15358 struct PropertyWatch * propWatch;
15359 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15360 struct Expression * object = stmt->__anon1._watch.object;
15361 struct Expression * watcher = stmt->__anon1._watch.watcher;
15364 ProcessExpressionType(watcher);
15366 ProcessExpressionType(object);
15369 if(watcher || thisClass)
15371 struct External * external = curExternal;
15372 struct Context * context = curContext;
15375 stmt->__anon1.expressions = MkList();
15376 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15378 struct ClassFunction * func;
15379 char watcherName[1024];
15380 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;
15381 struct External * createdExternal;
15383 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15384 if(propWatch->deleteWatch)
15385 strcat(watcherName, "_delete");
15388 struct Identifier * propID;
15390 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15392 strcat(watcherName, "_");
15393 strcat(watcherName, propID->string);
15396 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15398 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)));
15399 ProcessClassFunctionBody(func, propWatch->compound);
15400 propWatch->compound = (((void *)0));
15401 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15402 FreeClassFunction(func);
15403 curExternal = createdExternal;
15404 ProcessFunction(createdExternal->__anon1.function);
15405 if(propWatch->deleteWatch)
15407 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15409 ListAdd(args, CopyExpression(object));
15410 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15411 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15412 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15416 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15417 struct Identifier * propID;
15419 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15421 char propName[1024];
15422 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15426 char getName[1024], setName[1024];
15427 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15429 DeclareProperty(createdExternal, prop, setName, getName);
15430 strcpy(propName, "__ecereProp_");
15431 FullClassNameCat(propName, prop->_class->fullName, 0);
15432 strcat(propName, "_");
15433 FullClassNameCat(propName, prop->name, 1);
15434 ListAdd(args, CopyExpression(object));
15435 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15436 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15437 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15438 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15439 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15442 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15447 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15449 curExternal = external;
15450 curContext = context;
15452 FreeExpression(watcher);
15454 FreeExpression(object);
15455 FreeList(watches, (void *)(FreePropertyWatch));
15458 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15462 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15464 ProcessStatement(propWatch->compound);
15471 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15472 struct Expression * object = stmt->__anon1._watch.object;
15473 struct __ecereNameSpace__ecere__com__Class * _class;
15476 ProcessExpressionType(object);
15479 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15482 struct Identifier * propID;
15485 stmt->__anon1.expressions = MkList();
15486 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15488 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15495 for(propID = (*watches).first; propID; propID = propID->next)
15497 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15501 CreateFireWatcher(prop, object, stmt);
15504 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15509 struct __ecereNameSpace__ecere__com__Property * prop;
15510 struct __ecereNameSpace__ecere__com__Class * base;
15512 for(base = _class; base; base = base->base)
15514 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15516 if(prop->isProperty && prop->isWatchable)
15518 CreateFireWatcher(prop, object, stmt);
15524 FreeExpression(object);
15525 FreeList(watches, (void *)(FreeIdentifier));
15528 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15534 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15535 struct Expression * object = stmt->__anon1._watch.object;
15536 struct Expression * watcher = stmt->__anon1._watch.watcher;
15537 struct __ecereNameSpace__ecere__com__Class * _class;
15540 ProcessExpressionType(object);
15542 ProcessExpressionType(watcher);
15545 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15546 if(watcher || thisClass)
15550 struct Identifier * propID;
15553 stmt->__anon1.expressions = MkList();
15556 struct __ecereNameSpace__ecere__sys__OldList * args;
15559 ListAdd(args, CopyExpression(object));
15560 ListAdd(args, MkExpConstant("0"));
15561 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15562 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15566 for(propID = (*watches).first; propID; propID = propID->next)
15568 char propName[1024];
15569 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15573 char getName[1024], setName[1024];
15574 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15576 DeclareProperty(curExternal, prop, setName, getName);
15577 strcpy(propName, "__ecereProp_");
15578 FullClassNameCat(propName, prop->_class->fullName, 0);
15579 strcat(propName, "_");
15580 FullClassNameCat(propName, prop->name, 1);
15581 ListAdd(args, CopyExpression(object));
15582 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15583 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15584 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15587 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15591 FreeExpression(object);
15593 FreeExpression(watcher);
15594 FreeList(watches, (void *)(FreeIdentifier));
15597 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15600 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15607 void ComputeDataTypes()
15609 struct External * external;
15611 currentClass = (((void *)0));
15612 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15613 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15614 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15615 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15616 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15617 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15618 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15619 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15620 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15621 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15622 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15623 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15624 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15625 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15626 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15627 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15628 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15629 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15630 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15631 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15632 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15633 for(external = (*ast).first; external; external = external->next)
15635 afterExternal = curExternal = external;
15636 if(external->type == 0)
15640 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15641 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15643 currentClass = external->__anon1.function->_class;
15644 ProcessFunction(external->__anon1.function);
15646 else if(external->type == 1)
15648 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15650 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15651 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15653 currentClass = (((void *)0));
15654 if(external->__anon1.declaration)
15655 ProcessDeclaration(external->__anon1.declaration, 1);
15657 else if(external->type == 2)
15659 struct ClassDefinition * _class = external->__anon1._class;
15661 currentClass = external->symbol->__anon1.registered;
15664 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15665 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15667 if(_class->definitions)
15669 ProcessClass(_class->definitions, _class->symbol);
15673 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15674 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15677 else if(external->type == 4)
15679 thisNameSpace = external->__anon1.id->string;
15682 currentClass = (((void *)0));
15683 thisNameSpace = (((void *)0));
15684 curExternal = (((void *)0));
15687 void ProcessExpressionType(struct Expression * exp)
15689 unsigned int unresolved = 0;
15690 struct Location oldyylloc = yylloc;
15691 unsigned int notByReference = 0;
15693 if(!exp || exp->expType)
15700 struct Identifier * id = exp->__anon1.__anon1.identifier;
15702 if(!id || !topContext)
15704 if(id->_class && id->_class->__anon1.__anon1.name)
15706 id->classSym = id->_class->__anon1.__anon1.symbol;
15708 if(!strcmp(id->string, "__runtimePlatform"))
15710 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15713 else if(strstr(id->string, "__ecereClass") == id->string)
15715 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15718 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15720 ReplaceClassMembers(exp, thisClass);
15723 ProcessExpressionType(exp);
15726 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15731 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15735 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15741 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15744 ProcessExpressionType(exp);
15748 else if(currentClass && !id->_class)
15750 if(ResolveIdWithClass(exp, currentClass, 1))
15753 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15758 struct Type * type = symbol->type;
15759 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15761 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15763 struct Context * context = SetupTemplatesContext(_class);
15765 type = ReplaceThisClassType(_class);
15766 FinishTemplatesContext(context);
15768 type->refCount = 0;
15770 FreeSpecifier(id->_class);
15771 id->_class = (((void *)0));
15772 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15773 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15774 id->classSym = (((void *)0));
15775 exp->expType = type;
15778 if(type && (type->kind == 15))
15779 exp->isConstant = 1;
15780 if(symbol->isParam || !strcmp(id->string, "this"))
15782 if(_class && _class->type == 1 && !type->declaredWithStruct)
15783 exp->byReference = 1;
15785 if(symbol->isIterator)
15787 if(symbol->isIterator == 3)
15790 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15791 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15792 exp->expType = (((void *)0));
15793 ProcessExpressionType(exp);
15795 else if(symbol->isIterator != 4)
15798 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15799 exp->__anon1.member.exp->expType = exp->expType;
15800 exp->__anon1.member.member = MkIdentifier("data");
15801 exp->expType = (((void *)0));
15802 ProcessExpressionType(exp);
15809 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15811 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15815 strcpy(name, thisNameSpace);
15816 strcat(name, "::");
15817 strcat(name, id->string);
15818 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15821 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15826 for(c = 0; c < definedExpStackPos; c++)
15827 if(definedExpStack[c] == definedExp)
15829 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15831 struct Location backupYylloc = yylloc;
15832 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15834 definedExpStack[definedExpStackPos++] = definedExp;
15835 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15836 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15837 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15839 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15840 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15841 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15842 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15844 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15845 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15847 parsedExpression = (((void *)0));
15849 expression_yyparse();
15850 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15852 fileInput = backInput;
15853 yylloc = backupYylloc;
15854 if(parsedExpression)
15856 FreeIdentifier(id);
15858 exp->__anon1.list = MkListOne(parsedExpression);
15859 ApplyLocation(parsedExpression, &yylloc);
15860 ProcessExpressionType(exp);
15861 definedExpStackPos--;
15864 definedExpStackPos--;
15870 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15876 struct GlobalData * data = (((void *)0));
15878 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15882 strcpy(name, thisNameSpace);
15883 strcat(name, "::");
15884 strcat(name, id->string);
15885 data = FindGlobalData(name);
15888 data = FindGlobalData(id->string);
15891 DeclareGlobalData(curExternal, data);
15892 exp->expType = data->dataType;
15894 data->dataType->refCount++;
15895 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15896 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15897 FreeSpecifier(id->_class);
15898 id->_class = (((void *)0));
15903 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15905 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15909 strcpy(name, thisNameSpace);
15910 strcat(name, "::");
15911 strcat(name, id->string);
15912 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15915 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15920 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15921 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15923 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15924 strcpy(name, "__ecereFunction_");
15925 FullClassNameCat(name, id->string, 0);
15926 if(DeclareFunction(curExternal, function, name))
15928 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15929 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15931 exp->expType = function->dataType;
15932 if(function->dataType)
15933 function->dataType->refCount++;
15934 FreeSpecifier(id->_class);
15935 id->_class = (((void *)0));
15947 if(!exp->__anon1.instance->_class)
15949 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15951 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15954 ProcessInstantiationType(exp->__anon1.instance);
15955 exp->isConstant = exp->__anon1.instance->isConstant;
15956 if(exp->__anon1.instance->_class)
15958 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15966 char * constant = exp->__anon1.__anon1.constant;
15967 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15969 exp->expType = type;
15970 if(constant[0] == '\'')
15972 if((int)((unsigned char *)constant)[1] > 127)
15975 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15979 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15980 exp->__anon1.__anon1.constant = PrintUInt(ch);
15982 type->__anon1._class = FindClass("unichar");
15983 type->isSigned = 0;
15988 type->isSigned = 1;
15993 char * dot = strchr(constant, '.');
15994 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15999 exponent = strchr(constant, 'p');
16001 exponent = strchr(constant, 'P');
16005 exponent = strchr(constant, 'e');
16007 exponent = strchr(constant, 'E');
16009 if(dot || exponent)
16011 if(strchr(constant, 'f') || strchr(constant, 'F'))
16015 type->isSigned = 1;
16019 unsigned int isSigned = constant[0] == '-';
16020 char * endP = (((void *)0));
16021 long long i64 = strtoll(constant, &endP, 0);
16022 uint64 ui64 = strtoull(constant, &endP, 0);
16023 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16024 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16028 if(i64 < (((int)0x80000000)))
16033 if(ui64 > (((int)0x7fffffff)))
16035 if(ui64 > (0xffffffff))
16038 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16042 else if(constant[0] != '0' || !constant[1])
16047 type->kind = is64Bit ? 4 : 3;
16048 type->isSigned = isSigned;
16051 exp->isConstant = 1;
16052 if(exp->destType && exp->destType->kind == 7)
16054 else if(exp->destType && exp->destType->kind == 6)
16056 else if(exp->destType && exp->destType->kind == 4)
16063 exp->isConstant = 1;
16064 exp->expType = __extension__ ({
16065 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16067 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16068 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16070 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16071 }), __ecereInstance2;
16077 ProcessExpressionType(exp->__anon1._new.size);
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._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16083 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16087 ProcessExpressionType(exp->__anon1._renew.size);
16088 ProcessExpressionType(exp->__anon1._renew.exp);
16089 exp->expType = __extension__ ({
16090 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16092 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16094 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16098 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16099 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16100 unsigned int useDestType = 0, useSideType = 0;
16101 struct Location oldyylloc = yylloc;
16102 unsigned int useSideUnit = 0;
16103 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16104 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16106 switch(exp->__anon1.op.op)
16158 if(exp->__anon1.op.exp1)
16165 if(exp->__anon1.op.op == '&')
16167 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16169 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16170 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16172 if(symbol && symbol->isIterator == 2)
16175 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16176 exp->__anon1.member.member = MkIdentifier("key");
16177 exp->expType = (((void *)0));
16178 exp->__anon1.op.exp2->expType = symbol->type;
16179 symbol->type->refCount++;
16180 ProcessExpressionType(exp);
16186 if(exp->__anon1.op.exp1)
16188 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16190 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16192 if(exp->__anon1.op.exp1->destType)
16193 FreeType(exp->__anon1.op.exp1->destType);
16194 exp->__anon1.op.exp1->destType = exp->destType;
16195 exp->__anon1.op.exp1->opDestType = 1;
16197 exp->destType->refCount++;
16201 if(exp->__anon1.op.exp1->destType)
16202 FreeType(exp->__anon1.op.exp1->destType);
16203 exp->__anon1.op.exp1->destType = dummy;
16206 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16207 exp->__anon1.op.exp1->destType->count++;
16208 ProcessExpressionType(exp->__anon1.op.exp1);
16209 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16210 exp->__anon1.op.exp1->destType->count--;
16211 exp->__anon1.op.exp1->opDestType = 0;
16212 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)
16214 exp->__anon1.op.exp2 = MkExpConstant("1");
16215 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16218 if(exp->__anon1.op.exp1->destType == dummy)
16221 exp->__anon1.op.exp1->destType = (((void *)0));
16223 if(exp->__anon1.op.exp2)
16225 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16227 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);
16229 FreeType(exp->__anon1.op.exp1->expType);
16230 exp->__anon1.op.exp1->expType = type;
16233 type1 = exp->__anon1.op.exp1->expType;
16235 if(exp->__anon1.op.exp2)
16237 char expString[10240];
16239 expString[0] = '\0';
16240 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16242 if(exp->__anon1.op.exp1)
16244 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16245 if(exp->__anon1.op.exp1->expType)
16246 exp->__anon1.op.exp1->expType->refCount++;
16250 exp->__anon1.op.exp2->destType = exp->destType;
16251 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16252 exp->__anon1.op.exp2->opDestType = 1;
16254 exp->destType->refCount++;
16258 exp->expType = type1;
16263 PrintExpression(exp->__anon1.op.exp2, expString);
16264 if(type1 && type1->kind == 13)
16266 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)
16267 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16268 else if(exp->__anon1.op.op == '=')
16270 if(exp->__anon1.op.exp2->destType)
16271 FreeType(exp->__anon1.op.exp2->destType);
16272 exp->__anon1.op.exp2->destType = type1;
16279 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)
16283 if(exp->__anon1.op.exp2->destType)
16284 FreeType(exp->__anon1.op.exp2->destType);
16285 exp->__anon1.op.exp2->destType = type1;
16292 exp->expType = type1;
16294 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16296 if(exp->__anon1.op.exp2->destType)
16297 FreeType(exp->__anon1.op.exp2->destType);
16298 exp->__anon1.op.exp2->destType = exp->destType;
16299 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16300 exp->__anon1.op.exp2->opDestType = 1;
16302 exp->destType->refCount++;
16306 if(exp->__anon1.op.exp2->destType)
16307 FreeType(exp->__anon1.op.exp2->destType);
16308 exp->__anon1.op.exp2->destType = dummy;
16311 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))
16313 FreeType(exp->__anon1.op.exp2->destType);
16314 exp->__anon1.op.exp2->destType = type1;
16317 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16318 exp->__anon1.op.exp2->destType->count++;
16319 if(exp->__anon1.op.op == SIZEOF)
16321 struct Expression * e = exp->__anon1.op.exp2;
16323 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16325 if(e->type == 5 || e->type == 32 || e->type == 23)
16328 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16330 e = (*e->__anon1.list).last;
16333 if(e->type == 11 && e->__anon1.cast.exp)
16334 e->__anon1.cast.exp->needCast = 1;
16336 ProcessExpressionType(exp->__anon1.op.exp2);
16337 exp->__anon1.op.exp2->opDestType = 0;
16338 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16339 exp->__anon1.op.exp2->destType->count--;
16340 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16342 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16344 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);
16346 FreeType(exp->__anon1.op.exp2->expType);
16347 exp->__anon1.op.exp2->expType = type;
16350 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16352 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)
16354 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16355 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16357 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)))
16359 if(exp->__anon1.op.op == ADD_ASSIGN)
16360 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16362 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))
16364 if(exp->__anon1.op.op == ADD_ASSIGN)
16365 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16367 else if(inCompiler)
16369 char type1String[1024];
16370 char type2String[1024];
16372 type1String[0] = '\0';
16373 type2String[0] = '\0';
16374 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16375 PrintType(type1, type2String, 0, 1);
16376 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16377 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16380 if(exp->__anon1.op.exp2->destType == dummy)
16383 exp->__anon1.op.exp2->destType = (((void *)0));
16385 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16387 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16388 type2->refCount = 1;
16389 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16390 type2->isSigned = 1;
16392 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))
16394 type2 = __extension__ ({
16395 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16397 __ecereInstance1->kind = 3, __ecereInstance1;
16399 type2->refCount = 1;
16400 type2->isSigned = 1;
16404 type2 = exp->__anon1.op.exp2->expType;
16410 if(exp->__anon1.op.op == SIZEOF)
16412 exp->expType = __extension__ ({
16413 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16415 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16417 exp->isConstant = 1;
16419 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16421 exp->expType = Dereference(type2);
16422 if(type2 && type2->kind == 8)
16423 notByReference = 1;
16425 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16426 exp->expType = Reference(type2);
16427 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16429 if(exp->__anon1.op.exp1->expType)
16431 exp->expType = exp->__anon1.op.exp1->expType;
16432 exp->expType->refCount++;
16439 if(exp->__anon1.op.exp1)
16441 if(exp->__anon1.op.exp1->destType)
16442 FreeType(exp->__anon1.op.exp1->destType);
16443 exp->__anon1.op.exp1->destType = MkClassType("bool");
16444 exp->__anon1.op.exp1->destType->truth = 1;
16445 if(!exp->__anon1.op.exp1->expType)
16446 ProcessExpressionType(exp->__anon1.op.exp1);
16448 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16449 FreeType(exp->__anon1.op.exp1->expType);
16450 exp->__anon1.op.exp1->expType = MkClassType("bool");
16451 exp->__anon1.op.exp1->expType->truth = 1;
16453 if(exp->__anon1.op.exp2)
16455 if(exp->__anon1.op.exp2->destType)
16456 FreeType(exp->__anon1.op.exp2->destType);
16457 exp->__anon1.op.exp2->destType = MkClassType("bool");
16458 exp->__anon1.op.exp2->destType->truth = 1;
16459 if(!exp->__anon1.op.exp2->expType)
16460 ProcessExpressionType(exp->__anon1.op.exp2);
16462 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16463 FreeType(exp->__anon1.op.exp2->expType);
16464 exp->__anon1.op.exp2->expType = MkClassType("bool");
16465 exp->__anon1.op.exp2->expType->truth = 1;
16468 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")))))
16470 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"))))
16472 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)))
16474 struct Type * intType;
16476 if(!type1->__anon1._class->__anon1.registered->dataType)
16477 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16478 if(!type2->__anon1._class->__anon1.registered->dataType)
16479 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16480 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16481 if(exp->__anon1.op.exp1->destType)
16482 FreeType(exp->__anon1.op.exp1->destType);
16483 if(exp->__anon1.op.exp2->destType)
16484 FreeType(exp->__anon1.op.exp2->destType);
16485 exp->__anon1.op.exp1->destType = intType;
16486 exp->__anon1.op.exp2->destType = intType;
16487 intType->refCount++;
16491 if(exp->__anon1.op.exp2->destType)
16492 FreeType(exp->__anon1.op.exp2->destType);
16493 exp->__anon1.op.exp2->destType = type1;
16495 if(exp->__anon1.op.exp1->destType)
16496 FreeType(exp->__anon1.op.exp1->destType);
16497 exp->__anon1.op.exp1->destType = type2;
16500 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)
16501 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);
16502 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16504 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16508 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16510 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16511 ProcessExpressionType(exp->__anon1.op.exp1);
16512 if(type2->kind != 13)
16514 ProcessExpressionType(classExp);
16515 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16516 if(!exp->__anon1.op.exp2->expType)
16520 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16523 ProcessExpressionType(exp->__anon1.op.exp2);
16527 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)))
16529 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16530 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16531 exp->expType = type1;
16535 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)))
16537 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16538 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16539 exp->expType = type2;
16543 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))
16545 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16549 unsigned int success = 0;
16551 if(type1->kind == 13 && type2->kind == 13)
16553 if(exp->__anon1.op.op == '+')
16554 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16555 else if(exp->__anon1.op.op == '-')
16557 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16559 exp->expType = __extension__ ({
16560 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16562 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16565 if(type1->__anon1.type->kind == 20)
16567 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16571 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16573 ProcessExpressionType(classExp);
16575 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"))));
16576 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16584 if(!success && exp->__anon1.op.exp1->type == 2)
16586 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16589 FreeType(exp->expType);
16590 exp->expType = exp->__anon1.op.exp1->destType;
16591 if(exp->__anon1.op.exp1->destType)
16592 exp->__anon1.op.exp1->destType->refCount++;
16595 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16598 FreeType(exp->expType);
16599 exp->expType = exp->__anon1.op.exp2->destType;
16600 if(exp->__anon1.op.exp2->destType)
16601 exp->__anon1.op.exp2->destType->refCount++;
16607 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16610 FreeType(exp->expType);
16611 exp->expType = exp->__anon1.op.exp2->destType;
16612 if(exp->__anon1.op.exp2->destType)
16613 exp->__anon1.op.exp2->destType->refCount++;
16616 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16619 FreeType(exp->expType);
16620 exp->expType = exp->__anon1.op.exp1->destType;
16621 if(exp->__anon1.op.exp1->destType)
16622 exp->__anon1.op.exp1->destType->refCount++;
16628 char expString1[10240];
16629 char expString2[10240];
16633 expString1[0] = '\0';
16634 expString2[0] = '\0';
16639 PrintExpression(exp->__anon1.op.exp1, expString1);
16640 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16641 PrintExpression(exp->__anon1.op.exp2, expString2);
16642 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16643 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16644 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16646 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16650 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)
16652 if(exp->__anon1.op.exp1->destType)
16653 FreeType(exp->__anon1.op.exp1->destType);
16654 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16655 if(type2->__anon1._class->__anon1.registered->dataType)
16656 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16657 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16658 exp->expType = type2;
16662 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)
16664 if(exp->__anon1.op.exp2->destType)
16665 FreeType(exp->__anon1.op.exp2->destType);
16666 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16667 if(type1->__anon1._class->__anon1.registered->dataType)
16668 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16669 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16670 exp->expType = type1;
16676 unsigned int valid = 0;
16678 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16680 if(exp->__anon1.op.exp2->destType)
16681 FreeType(exp->__anon1.op.exp2->destType);
16682 if(!type1->__anon1._class->__anon1.registered->dataType)
16683 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16684 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16685 exp->__anon1.op.exp2->destType->refCount++;
16686 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16689 type2 = exp->__anon1.op.exp2->destType;
16692 exp->expType = type2;
16695 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16697 if(exp->__anon1.op.exp1->destType)
16698 FreeType(exp->__anon1.op.exp1->destType);
16699 if(!type2->__anon1._class->__anon1.registered->dataType)
16700 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16701 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16702 exp->__anon1.op.exp1->destType->refCount++;
16703 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16704 type1 = exp->__anon1.op.exp1->destType;
16705 exp->expType = type1;
16708 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16710 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16711 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16713 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16715 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16717 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16720 FreeType(exp->expType);
16721 exp->expType = exp->__anon1.op.exp2->expType;
16722 if(exp->__anon1.op.exp2->expType)
16723 exp->__anon1.op.exp2->expType->refCount++;
16727 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16729 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16732 FreeType(exp->expType);
16733 exp->expType = exp->__anon1.op.exp1->expType;
16734 if(exp->__anon1.op.exp1->expType)
16735 exp->__anon1.op.exp1->expType->refCount++;
16742 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16744 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16747 FreeType(exp->expType);
16748 exp->expType = exp->__anon1.op.exp1->expType;
16749 if(exp->__anon1.op.exp1->expType)
16750 exp->__anon1.op.exp1->expType->refCount++;
16754 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16756 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16759 FreeType(exp->expType);
16760 exp->expType = exp->__anon1.op.exp2->expType;
16761 if(exp->__anon1.op.exp2->expType)
16762 exp->__anon1.op.exp2->expType->refCount++;
16770 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))
16772 if(exp->__anon1.op.exp1->destType)
16773 FreeType(exp->__anon1.op.exp1->destType);
16774 exp->__anon1.op.exp1->destType = type2;
16776 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16779 FreeType(exp->expType);
16780 exp->expType = exp->__anon1.op.exp1->destType;
16781 if(exp->__anon1.op.exp1->destType)
16782 exp->__anon1.op.exp1->destType->refCount++;
16787 if(exp->__anon1.op.exp2->destType)
16788 FreeType(exp->__anon1.op.exp2->destType);
16789 exp->__anon1.op.exp2->destType = type1;
16791 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16794 FreeType(exp->expType);
16795 exp->expType = exp->__anon1.op.exp2->destType;
16796 if(exp->__anon1.op.exp2->destType)
16797 exp->__anon1.op.exp2->destType->refCount++;
16799 else if(type1 && type2)
16801 char expString1[10240];
16802 char expString2[10240];
16803 char type1String[1024];
16804 char type2String[1024];
16806 expString1[0] = '\0';
16807 expString2[0] = '\0';
16808 type1String[0] = '\0';
16809 type2String[0] = '\0';
16812 PrintExpression(exp->__anon1.op.exp1, expString1);
16813 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16814 PrintExpression(exp->__anon1.op.exp2, expString2);
16815 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16816 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16817 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16819 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16820 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16822 exp->expType = exp->__anon1.op.exp1->expType;
16823 if(exp->__anon1.op.exp1->expType)
16824 exp->__anon1.op.exp1->expType->refCount++;
16826 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16828 exp->expType = exp->__anon1.op.exp2->expType;
16829 if(exp->__anon1.op.exp2->expType)
16830 exp->__anon1.op.exp2->expType->refCount++;
16838 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16840 struct Type * oldType = exp->__anon1.op.exp1->expType;
16842 exp->__anon1.op.exp1->expType = (((void *)0));
16843 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16846 exp->__anon1.op.exp1->expType = oldType;
16848 if(exp->__anon1.op.exp1->destType)
16849 FreeType(exp->__anon1.op.exp1->destType);
16850 exp->__anon1.op.exp1->destType = type2;
16852 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16855 FreeType(exp->expType);
16856 exp->expType = exp->__anon1.op.exp1->destType;
16857 if(exp->__anon1.op.exp1->destType)
16858 exp->__anon1.op.exp1->destType->refCount++;
16862 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16864 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16866 if(exp->__anon1.op.exp1->destType)
16867 FreeType(exp->__anon1.op.exp1->destType);
16868 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16869 if(type2->__anon1._class->__anon1.registered->dataType)
16870 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16871 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16873 if(exp->__anon1.op.op == '!')
16875 exp->expType = MkClassType("bool");
16876 exp->expType->truth = 1;
16880 exp->expType = type2;
16885 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16887 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16889 if(exp->__anon1.op.exp2->destType)
16890 FreeType(exp->__anon1.op.exp2->destType);
16891 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16892 if(type1->__anon1._class->__anon1.registered->dataType)
16893 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16894 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16896 exp->expType = type1;
16902 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16904 char expString[10000];
16906 expString[0] = '\0';
16909 PrintExpression(exp->__anon1.op.exp1, expString);
16910 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16913 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16915 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16917 char expString[10240];
16919 expString[0] = '\0';
16922 PrintExpression(exp->__anon1.op.exp2, expString);
16923 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16926 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16930 FreeType(exp->expType);
16931 exp->expType = MkClassType("bool");
16932 exp->expType->truth = 1;
16934 if(exp->__anon1.op.op != SIZEOF)
16935 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16936 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16938 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16940 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16941 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16942 yylloc = oldyylloc;
16951 struct Expression * e;
16953 exp->isConstant = 1;
16954 for(e = (*exp->__anon1.list).first; e; e = e->next)
16958 FreeType(e->destType);
16959 e->opDestType = exp->opDestType;
16960 e->destType = exp->destType;
16963 exp->destType->refCount++;
16966 ProcessExpressionType(e);
16967 if(!exp->expType && !e->next)
16969 exp->expType = e->expType;
16971 e->expType->refCount++;
16974 exp->isConstant = 0;
16976 e = (*exp->__anon1.list).first;
16977 if(!e->next && e->type == 8)
16979 struct Expression * next = exp->next, * prev = exp->prev;
16981 FreeType(exp->expType);
16982 FreeType(exp->destType);
16983 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16987 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16988 ProcessExpressionType(exp);
16994 struct Expression * e;
16996 exp->isConstant = 1;
16997 ProcessExpressionType(exp->__anon1.index.exp);
16998 if(!exp->__anon1.index.exp->isConstant)
16999 exp->isConstant = 0;
17000 if(exp->__anon1.index.exp->expType)
17002 struct Type * source = exp->__anon1.index.exp->expType;
17004 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17006 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17007 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17009 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17011 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17012 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17014 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17016 if(type->kind == 8)
17017 type->constant = 1;
17018 else if(type->kind == 13)
17020 struct Type * t = type;
17022 while(t->kind == 13)
17023 t = t->__anon1.type;
17026 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17031 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17033 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17036 FreeType(e->destType);
17037 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17039 ProcessExpressionType(e);
17044 exp->isConstant = 0;
17047 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17049 DeclareType(curExternal, exp->expType, 1, 0);
17054 struct Expression * e;
17055 struct Type * functionType;
17056 struct Type * methodType = (((void *)0));
17062 PrintExpression(exp->__anon1.call.exp, name);
17063 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17065 PrintExpression(exp->__anon1.call.exp, name);
17068 if(exp->__anon1.call.exp->type == 0)
17070 struct Expression * idExp = exp->__anon1.call.exp;
17071 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17073 if(!strcmp(id->string, "__builtin_frame_address"))
17075 exp->expType = ProcessTypeString("void *", 1);
17076 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17077 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17080 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17082 exp->expType = ProcessTypeString("int", 1);
17083 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17084 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17087 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17089 struct Expression * a = (((void *)0));
17090 struct Expression * b = (((void *)0));
17091 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17093 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17095 a = (*exp->__anon1.call.arguments).first;
17096 b = (*exp->__anon1.call.arguments).last;
17100 else if((*exp->__anon1.call.arguments).count == 1)
17102 a = (*exp->__anon1.call.arguments).first;
17107 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17108 idExp->__anon1.__anon1.identifier = (((void *)0));
17109 FreeExpContents(exp);
17110 ProcessExpressionType(a);
17112 ProcessExpressionType(b);
17114 exp->__anon1.list = MkList();
17115 if(a->expType && (!b || b->expType))
17117 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17121 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17122 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17123 struct Declaration * decl;
17124 char temp1[1024], temp2[1024];
17126 GetTypeSpecs(a->expType, specs);
17127 if(a && !a->isConstant && a->type != 0)
17129 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17130 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17131 tempExp1 = QMkExpId(temp1);
17132 tempExp1->expType = a->expType;
17134 a->expType->refCount++;
17135 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17137 if(b && !b->isConstant && b->type != 0)
17139 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17140 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17141 tempExp2 = QMkExpId(temp2);
17142 tempExp2->expType = b->expType;
17144 b->expType->refCount++;
17145 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17147 decl = MkDeclaration(specs, decls);
17148 if(!curCompound->__anon1.compound.declarations)
17149 curCompound->__anon1.compound.declarations = MkList();
17150 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17154 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17156 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17158 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17159 exp->expType = a->expType;
17161 a->expType->refCount++;
17163 else if(!strcmp(id->string, "Abs"))
17165 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17166 exp->expType = a->expType;
17168 a->expType->refCount++;
17170 else if(!strcmp(id->string, "Sgn"))
17172 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"))))));
17173 exp->expType = ProcessTypeString("int", 0);
17175 FreeExpression(tempExp1);
17177 FreeExpression(tempExp2);
17178 FreeIdentifier(id);
17184 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17186 if(!exp->__anon1.call.exp->destType)
17188 exp->__anon1.call.exp->destType = dummy;
17191 ProcessExpressionType(exp->__anon1.call.exp);
17192 if(exp->__anon1.call.exp->destType == dummy)
17195 exp->__anon1.call.exp->destType = (((void *)0));
17199 functionType = exp->__anon1.call.exp->expType;
17200 if(functionType && functionType->kind == 16)
17202 methodType = functionType;
17203 functionType = methodType->__anon1.__anon3.method->dataType;
17204 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17206 char typeString[1024];
17208 typeString[0] = '\0';
17210 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17212 functionType->__anon1.__anon2.thisClass = (((void *)0));
17213 PrintType(functionType, typeString, 1, 1);
17214 functionType->__anon1.__anon2.thisClass = back;
17216 if(strstr(typeString, "thisclass"))
17218 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17219 struct Declarator * decl;
17222 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17224 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17225 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))
17226 thisClassParams = 0;
17227 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17229 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17231 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17232 ProcessDeclarator(decl, 1);
17233 thisClass = backupThisClass;
17235 thisClassParams = 1;
17236 functionType = ProcessType(specs, decl);
17237 functionType->refCount = 0;
17238 FinishTemplatesContext(context);
17240 struct Type * p, * op;
17242 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)
17245 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17248 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17250 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17253 FreeList(specs, (void *)(FreeSpecifier));
17254 FreeDeclarator(decl);
17258 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17260 struct Type * type = functionType->__anon1.type;
17262 if(!functionType->refCount)
17264 functionType->__anon1.type = (((void *)0));
17265 FreeType(functionType);
17267 functionType = type;
17269 if(functionType && functionType->kind != 11)
17271 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17273 else if(functionType)
17275 unsigned int emptyParams = 0, noParams = 0;
17276 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17277 struct Type * type = functionType->__anon1.__anon2.params.first;
17278 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17280 struct Location oldyylloc = yylloc;
17284 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17286 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17289 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17291 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)
17293 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17296 e->destType = type;
17298 type = functionType->__anon1.__anon2.params.first;
17301 type->refCount = 0;
17303 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17305 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17306 type->byReference = functionType->byReference;
17307 type->typedByReference = functionType->typedByReference;
17310 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17312 e->destType = type;
17314 type = functionType->__anon1.__anon2.params.first;
17317 type->refCount = 0;
17320 if(type && type->kind == 0)
17323 if(!type->refCount)
17325 type = (((void *)0));
17327 for(; e; e = e->next)
17329 if(!type && !emptyParams)
17332 if(methodType && methodType->__anon1.__anon3.methodClass)
17333 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);
17335 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);
17338 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17340 struct Type * templatedType = (((void *)0));
17341 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17342 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17345 if(_class && _class->templateArgs)
17347 struct __ecereNameSpace__ecere__com__Class * sClass;
17349 for(sClass = _class; sClass; sClass = sClass->base)
17351 if(sClass->templateClass)
17352 sClass = sClass->templateClass;
17354 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17356 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17358 struct __ecereNameSpace__ecere__com__Class * nextClass;
17360 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17362 if(nextClass->templateClass)
17363 nextClass = nextClass->templateClass;
17364 id += nextClass->templateParams.count;
17374 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17376 unsigned int constant = type->constant;
17377 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17380 struct Context * context = SetupTemplatesContext(_class);
17382 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17383 FinishTemplatesContext(context);
17385 if(templatedType->kind == 8 && constant)
17386 templatedType->constant = 1;
17387 else if(templatedType->kind == 13)
17389 struct Type * t = templatedType->__anon1.type;
17391 while(t->kind == 13)
17392 t = t->__anon1.type;
17394 t->constant = constant;
17396 e->destType = templatedType;
17399 templatedType->passAsTemplate = 1;
17404 e->destType = type;
17411 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17413 e->destType = type->prev;
17414 e->destType->refCount++;
17418 e->destType = type;
17423 if(type && type->kind != 14)
17425 struct Type * next = type->next;
17427 if(!type->refCount)
17432 if(type && type->kind != 14)
17434 if(methodType && methodType->__anon1.__anon3.methodClass)
17435 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);
17437 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);
17439 yylloc = oldyylloc;
17440 if(type && !type->refCount)
17445 functionType = __extension__ ({
17446 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17448 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17450 if(exp->__anon1.call.exp->type == 0)
17452 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17456 struct Symbol * symbol;
17457 struct Location oldyylloc = yylloc;
17459 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17460 if(strstr(string, "__builtin_") == string)
17464 functionType->__anon1.__anon2.returnType = exp->destType;
17465 exp->destType->refCount++;
17469 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17470 symbol = __extension__ ({
17471 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17473 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17475 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17476 if(strstr(symbol->string, "::"))
17477 globalContext->hasNameSpace = 1;
17478 yylloc = oldyylloc;
17481 else if(exp->__anon1.call.exp->type == 8)
17485 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17486 if(!functionType->__anon1.__anon2.returnType)
17488 functionType->__anon1.__anon2.returnType = __extension__ ({
17489 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17491 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17495 if(functionType && functionType->kind == 11)
17497 exp->expType = functionType->__anon1.__anon2.returnType;
17498 if(functionType->__anon1.__anon2.returnType)
17499 functionType->__anon1.__anon2.returnType->refCount++;
17500 if(!functionType->refCount)
17501 FreeType(functionType);
17503 if(exp->__anon1.call.arguments)
17505 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17506 ProcessExpressionType(e);
17512 struct Type * type;
17513 struct Location oldyylloc = yylloc;
17514 unsigned int thisPtr;
17515 struct Expression * checkExp = exp->__anon1.member.exp;
17519 if(checkExp->type == 11)
17520 checkExp = checkExp->__anon1.cast.exp;
17521 else if(checkExp->type == 5)
17522 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17526 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17527 exp->thisPtr = thisPtr;
17528 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17530 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17532 ProcessExpressionType(exp->__anon1.member.exp);
17533 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)
17535 exp->isConstant = 0;
17538 exp->isConstant = exp->__anon1.member.exp->isConstant;
17539 type = exp->__anon1.member.exp->expType;
17541 if(type && (type->kind == 20))
17543 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17544 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17548 for(param = _class->templateParams.first; param; param = param->next)
17550 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17554 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17556 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17560 struct Expression * expMember = exp->__anon1.member.exp;
17561 struct Declarator * decl;
17562 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17563 char thisClassTypeString[1024];
17565 FreeIdentifier(exp->__anon1.member.member);
17566 ProcessExpressionType(argExp);
17568 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17572 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17573 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17576 strcpy(thisClassTypeString, _class->fullName);
17578 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17579 exp->expType = ProcessType(specs, decl);
17580 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17582 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17583 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17584 int paramCount = 0;
17585 int lastParam = -1;
17586 char templateString[1024];
17587 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17589 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17590 for(cClass = expClass; cClass; cClass = cClass->base)
17594 for(param = cClass->templateParams.first; param; param = param->next)
17597 struct __ecereNameSpace__ecere__com__Class * sClass;
17598 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17600 for(sClass = cClass->base; sClass; sClass = sClass->base)
17601 id += sClass->templateParams.count;
17602 arg = expClass->templateArgs[id];
17603 for(sClass = _class; sClass; sClass = sClass->base)
17605 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17607 struct __ecereNameSpace__ecere__com__Class * nextClass;
17609 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17610 p += nextClass->templateParams.count;
17611 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17613 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17615 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17617 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17618 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17625 char argument[256];
17627 argument[0] = '\0';
17628 switch(param->type)
17632 char expString[1024];
17633 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17634 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17635 struct Expression * exp;
17636 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17638 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17639 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17640 ProcessExpressionType(exp);
17641 ComputeExpression(exp);
17642 expString[0] = '\0';
17643 PrintExpression(exp, expString);
17644 strcat(argument, expString);
17645 FreeExpression(exp);
17650 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17655 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17657 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17658 strcat(argument, thisClassTypeString);
17660 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17668 strcat(templateString, ", ");
17669 if(lastParam != p - 1)
17671 strcat(templateString, param->name);
17672 strcat(templateString, " = ");
17674 strcat(templateString, argument);
17683 int len = strlen(templateString);
17685 if(templateString[len - 1] == '>')
17686 templateString[len++] = ' ';
17687 templateString[len++] = '>';
17688 templateString[len++] = '\0';
17691 struct Context * context = SetupTemplatesContext(_class);
17693 FreeType(exp->expType);
17694 exp->expType = ProcessTypeString(templateString, 0);
17695 FinishTemplatesContext(context);
17698 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17699 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17701 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")))))))));
17704 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17706 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17709 if(type && (type->kind == 20))
17711 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)))
17713 struct Identifier * id = exp->__anon1.member.member;
17714 int typeKind = type->kind;
17715 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));
17717 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17719 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17724 if(typeKind == 3 || typeKind == 15)
17725 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17728 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17730 _class = type->__anon1._class->__anon1.registered;
17732 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17734 _class = FindClass("char *")->__anon1.registered;
17736 else if(type->kind == 13)
17738 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17739 FreeType(exp->expType);
17740 exp->expType = ProcessTypeString("uintptr", 0);
17741 exp->byReference = 1;
17745 char string[1024] = "";
17746 struct Symbol * classSym;
17748 PrintTypeNoConst(type, string, 0, 1);
17749 classSym = FindClass(string);
17751 _class = classSym->__anon1.registered;
17757 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17758 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17759 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17760 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17761 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17763 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17764 exp->__anon1.member.memberType = 1;
17765 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17766 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17769 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17771 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17772 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17774 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17776 member = (((void *)0));
17778 if(!member && !prop)
17779 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17780 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17781 exp->__anon1.member.thisPtr = 1;
17785 unsigned int useMemberForNonConst = 0;
17789 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17790 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);
17791 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17792 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17794 if((!prop || useMemberForNonConst) && !member)
17796 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17799 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17800 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);
17801 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17802 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17807 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17808 prop = (((void *)0));
17810 member = (((void *)0));
17814 if(!prop && !member && !method)
17815 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17816 if(!prop && !member && !method)
17820 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17823 exp->__anon1.member.memberType = 5;
17824 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17828 char structName[1024];
17829 struct Identifier * id = exp->__anon1.member.member;
17830 struct Expression * classExp = exp->__anon1.member.exp;
17833 FreeType(classExp->expType);
17834 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17835 strcpy(structName, "__ecereClassData_");
17836 FullClassNameCat(structName, type->__anon1._class->string, 0);
17838 exp->__anon1.member.member = id;
17839 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"))))))));
17841 ProcessExpressionType(exp);
17847 struct Symbol * classSym = FindClass(id->string);
17851 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17854 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17858 if(exp->__anon1.member.exp->destType)
17859 FreeType(exp->__anon1.member.exp->destType);
17861 if(method && !method->_class->symbol)
17862 method->_class->symbol = FindClass(method->_class->fullName);
17863 if(prop && !prop->_class->symbol)
17864 prop->_class->symbol = FindClass(prop->_class->fullName);
17865 exp->__anon1.member.exp->destType = __extension__ ({
17866 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17868 __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;
17873 exp->__anon1.member.memberType = 1;
17874 if(!prop->dataType)
17875 ProcessPropertyType(prop);
17876 exp->expType = prop->dataType;
17877 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17879 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17881 CopyTypeInto(type, exp->expType);
17882 type->refCount = 1;
17883 type->constant = 1;
17884 exp->expType = type;
17886 else if(prop->dataType)
17887 prop->dataType->refCount++;
17891 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17893 FreeExpContents(exp);
17895 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17896 ProcessExpressionType(exp);
17899 exp->__anon1.member.memberType = 3;
17900 DeclareStruct(curExternal, _class->fullName, 0, 1);
17901 if(member->_class != _class)
17902 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17903 if(!member->dataType)
17905 struct Context * context = SetupTemplatesContext(_class);
17907 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17908 FinishTemplatesContext(context);
17910 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)
17911 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
17912 exp->expType = member->dataType;
17913 if(member->dataType)
17914 member->dataType->refCount++;
17916 else if(revConvert)
17918 exp->__anon1.member.memberType = 4;
17919 exp->expType = MkClassType(revConvert->_class->fullName);
17924 exp->__anon1.member.memberType = 2;
17926 if(!method->dataType)
17927 ProcessMethodType(method);
17928 exp->expType = __extension__ ({
17929 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17931 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17933 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17934 exp->expType->__anon1.__anon3.usedClass = _class;
17936 else if(!classProp)
17938 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17940 FreeExpContents(exp);
17942 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17943 FreeType(exp->expType);
17944 exp->expType = MkClassType("ecere::com::Class");
17947 yylloc = exp->__anon1.member.member->loc;
17948 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17950 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17952 if(_class && exp->expType)
17954 struct __ecereNameSpace__ecere__com__Class * tClass;
17956 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17957 while(tClass && !tClass->templateClass)
17958 tClass = tClass->base;
17959 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17962 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17963 struct __ecereNameSpace__ecere__com__Class * sClass;
17965 for(sClass = tClass; sClass; sClass = sClass->base)
17968 if(sClass->templateClass)
17969 sClass = sClass->templateClass;
17970 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17972 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17974 for(sClass = sClass->base; sClass; sClass = sClass->base)
17975 id += sClass->templateParams.count;
17983 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17985 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17986 struct Context * context = SetupTemplatesContext(tClass);
17987 unsigned int constant = exp->expType->constant;
17988 unsigned int passAsTemplate = 0;
17989 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17990 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17992 if(t && t->kind == 8 && t->__anon1._class)
17993 thisClassFrom = t->__anon1._class->__anon1.registered;
17995 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
17997 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17998 FreeType(exp->expType);
17999 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18000 exp->expType->thisClassFrom = thisClassFrom;
18001 if(exp->expType->kind == 8 && constant)
18002 exp->expType->constant = 1;
18003 else if(exp->expType->kind == 13)
18005 struct Type * t = exp->expType->__anon1.type;
18007 while(t->kind == 13)
18008 t = t->__anon1.type;
18010 t->constant = constant;
18014 if(exp->expType->kind == 21)
18016 FreeType(exp->expType);
18017 exp->expType = ReplaceThisClassType(_class);
18020 exp->expType->passAsTemplate = 1;
18023 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18024 if(exp->destType->kind == 8 && constant)
18025 exp->destType->constant = 1;
18026 else if(exp->destType->kind == 13)
18028 struct Type * t = exp->destType->__anon1.type;
18030 while(t->kind == 13)
18031 t = t->__anon1.type;
18033 t->constant = constant;
18035 if(exp->destType->kind == 21)
18037 FreeType(exp->destType);
18038 exp->destType = ReplaceThisClassType(_class);
18042 FinishTemplatesContext(context);
18045 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)
18048 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18049 struct __ecereNameSpace__ecere__com__Class * sClass;
18051 for(sClass = tClass; sClass; sClass = sClass->base)
18054 if(sClass->templateClass)
18055 sClass = sClass->templateClass;
18056 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18058 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18060 for(sClass = sClass->base; sClass; sClass = sClass->base)
18061 id += sClass->templateParams.count;
18071 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18072 struct Context * context = SetupTemplatesContext(tClass);
18073 struct Type * basicType;
18075 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18078 if(basicType->kind == 21)
18080 FreeType(basicType);
18081 basicType = ReplaceThisClassType(_class);
18083 FreeType(exp->expType);
18084 exp->expType = __extension__ ({
18085 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18087 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18091 exp->destType = exp->expType;
18092 exp->destType->refCount++;
18095 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18096 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18097 struct Declarator * decl;
18099 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18102 exp->destType->refCount++;
18104 exp->expType->refCount++;
18106 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18107 exp->__anon1.cast.exp = newExp;
18110 FinishTemplatesContext(context);
18113 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18115 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18119 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18121 int paramCount = 0;
18122 int lastParam = -1;
18123 char templateString[1024];
18124 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18126 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18127 while(cClass != expClass)
18129 struct __ecereNameSpace__ecere__com__Class * sClass;
18131 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18134 for(param = cClass->templateParams.first; param; param = param->next)
18136 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18138 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18139 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18141 while(cClassCur != tClass && !paramCur)
18143 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18145 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18147 cClassCur = sClassCur;
18148 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18150 if(!strcmp(paramCur->name, param->name))
18157 if(paramCur && paramCur->type == 0)
18158 arg = tClass->templateArgs[cp];
18160 arg = expClass->templateArgs[p];
18162 char argument[256];
18164 argument[0] = '\0';
18165 switch(param->type)
18169 char expString[1024];
18170 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18171 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18172 struct Expression * exp;
18173 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18175 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18176 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18177 ProcessExpressionType(exp);
18178 ComputeExpression(exp);
18179 expString[0] = '\0';
18180 PrintExpression(exp, expString);
18181 strcat(argument, expString);
18182 FreeExpression(exp);
18187 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18192 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18193 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18200 strcat(templateString, ", ");
18201 if(lastParam != p - 1)
18203 strcat(templateString, param->name);
18204 strcat(templateString, " = ");
18206 strcat(templateString, argument);
18215 int len = strlen(templateString);
18217 if(templateString[len - 1] == '>')
18218 templateString[len++] = ' ';
18219 templateString[len++] = '>';
18220 templateString[len++] = '\0';
18222 FreeType(exp->expType);
18224 struct Context * context = SetupTemplatesContext(tClass);
18226 exp->expType = ProcessTypeString(templateString, 0);
18227 FinishTemplatesContext(context);
18234 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)");
18236 else if(type && (type->kind == 9 || type->kind == 10))
18238 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18242 exp->expType = memberType;
18244 memberType->refCount++;
18249 char expString[10240];
18251 expString[0] = '\0';
18254 PrintExpression(exp, expString);
18255 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18257 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18259 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18261 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18263 struct Identifier * id = exp->__anon1.member.member;
18264 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));
18268 FreeType(exp->expType);
18269 exp->expType = ReplaceThisClassType(_class);
18273 yylloc = oldyylloc;
18278 struct Type * destType = exp->destType;
18280 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18282 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18284 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18288 ProcessExpressionType(exp);
18295 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18297 if(classSym && classSym->__anon1.registered)
18299 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18302 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18305 DeclareStruct(curExternal, classSym->string, 0, 1);
18306 FreeSpecifier(exp->__anon1._class);
18307 FullClassNameCat(name, classSym->string, 0);
18311 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18315 struct Expression * e;
18318 if(b->structSize == b->offset)
18319 exp->__anon1.op.exp1 = MkExpConstant("0");
18321 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18322 exp->__anon1.op.op = '+';
18324 while(b->offset != 0)
18326 struct Symbol * sym;
18327 struct Expression * typeSize;
18330 sym = FindClass(b->fullName);
18332 DeclareStruct(curExternal, sym->string, 0, 1);
18333 FullClassNameCat(name, sym->string, 0);
18334 if(b->structSize == b->offset)
18335 typeSize = MkExpConstant("0");
18337 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18338 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18339 e = e->__anon1.op.exp2;
18345 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18347 FreeSpecifier(exp->__anon1._class);
18348 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18353 char className[1024];
18355 strcpy(className, "__ecereClass_");
18356 FullClassNameCat(className, classSym->string, 1);
18357 DeclareClass(curExternal, classSym, className);
18358 FreeExpContents(exp);
18360 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18361 exp->__anon1.member.member = MkIdentifier("structSize");
18365 exp->expType = __extension__ ({
18366 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18368 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18374 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18376 exp->expType = __extension__ ({
18377 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18379 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18381 exp->isConstant = 1;
18382 DeclareType(curExternal, type, 1, 0);
18388 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18391 FreeType(exp->__anon1.cast.exp->destType);
18392 exp->__anon1.cast.exp->destType = type;
18395 ProcessExpressionType(exp->__anon1.cast.exp);
18398 exp->expType = type;
18399 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18401 void * prev = exp->prev, * next = exp->next;
18402 struct Type * expType = exp->__anon1.cast.exp->destType;
18403 struct Expression * castExp = exp->__anon1.cast.exp;
18404 struct Type * destType = exp->destType;
18407 expType->refCount++;
18408 FreeType(exp->expType);
18409 FreeTypeName(exp->__anon1.cast.typeName);
18411 FreeType(exp->expType);
18412 FreeType(exp->destType);
18413 exp->expType = expType;
18414 exp->destType = destType;
18415 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18421 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18427 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18429 exp->expType = type;
18434 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18436 ProcessExpressionType(exp->__anon1.vaArg.exp);
18437 exp->expType = type;
18442 struct Expression * e;
18443 struct Type * t = exp->destType;
18445 if(t && !exp->destType->casted)
18447 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18448 CopyTypeInto(t, exp->destType);
18453 exp->isConstant = 1;
18454 FreeType(exp->__anon1.cond.cond->destType);
18455 exp->__anon1.cond.cond->destType = MkClassType("bool");
18456 exp->__anon1.cond.cond->destType->truth = 1;
18457 ProcessExpressionType(exp->__anon1.cond.cond);
18458 if(!exp->__anon1.cond.cond->isConstant)
18459 exp->isConstant = 0;
18460 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18464 FreeType(e->destType);
18467 e->destType->refCount++;
18469 ProcessExpressionType(e);
18472 exp->expType = e->expType;
18474 e->expType->refCount++;
18477 exp->isConstant = 0;
18479 FreeType(exp->__anon1.cond.elseExp->destType);
18480 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18481 if(exp->__anon1.cond.elseExp->destType)
18482 exp->__anon1.cond.elseExp->destType->refCount++;
18483 ProcessExpressionType(exp->__anon1.cond.elseExp);
18484 if(!exp->__anon1.cond.elseExp->isConstant)
18485 exp->isConstant = 0;
18491 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18493 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18495 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18497 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18499 exp->destType->refCount++;
18501 ProcessStatement(exp->__anon1.compound);
18502 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18504 exp->expType->refCount++;
18510 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18512 if(spec && spec->type == 1)
18514 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18515 exp->expType->kind = 19;
18516 exp->byReference = 1;
18520 exp->expType = MkClassType("ecere::com::Class");
18521 exp->byReference = 1;
18527 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18531 struct Identifier * id = exp->__anon1.classData.id;
18532 char structName[1024];
18533 struct Expression * classExp;
18535 strcpy(structName, "__ecereClassData_");
18536 FullClassNameCat(structName, _class->fullName, 0);
18538 exp->__anon1.member.member = id;
18539 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18540 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18542 classExp = MkExpIdentifier(MkIdentifier("class"));
18543 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"))))))));
18544 ProcessExpressionType(exp);
18551 struct Type * type = (((void *)0));
18552 const char * typeString = (((void *)0));
18553 char typeStringBuf[1024];
18555 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))
18557 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18559 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18561 else if(exp->__anon1.list)
18563 struct Expression * e;
18565 for(e = (*exp->__anon1.list).first; e; e = e->next)
18567 ProcessExpressionType(e);
18577 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18581 e->expType = (((void *)0));
18582 e = (*exp->__anon1.list).first;
18583 ProcessExpressionType(e);
18586 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18588 FreeType(e->expType);
18589 e->expType = (((void *)0));
18591 type = (((void *)0));
18599 FreeType(e->expType);
18600 e->expType = (((void *)0));
18606 typeStringBuf[0] = '\0';
18607 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18608 typeString = typeStringBuf;
18610 type = (((void *)0));
18615 char templateString[1024];
18616 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18617 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18618 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18619 struct Expression * expExt;
18620 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18622 sprintf(templateString, "Container<%s>", typeString);
18623 if(exp->__anon1.list)
18625 struct Expression * e;
18627 type = ProcessTypeString(typeString, 0);
18628 while((e = (*exp->__anon1.list).first))
18630 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18631 e->destType = type;
18633 ProcessExpressionType(e);
18634 ListAdd(initializers, MkInitializerAssignment(e));
18637 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18639 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18640 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18641 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18642 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18643 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18644 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18645 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18646 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18647 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18648 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18649 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18651 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18653 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18654 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18655 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18656 exp->expType = ProcessTypeString(templateString, 0);
18658 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18659 ProcessExpressionType(expExt);
18663 exp->expType = ProcessTypeString("Container", 0);
18664 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18669 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18671 FreeType(exp->expType);
18672 exp->expType = ReplaceThisClassType(thisClass);
18674 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)
18676 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18680 if(exp->expType->kind != 15)
18682 struct Type * member;
18683 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18685 FreeType(exp->expType);
18686 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18687 exp->expType->kind = symbol->type->kind;
18688 exp->expType->refCount++;
18689 exp->expType->__anon1.__anon1.enumName = enumName;
18690 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18691 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18692 member->refCount++;
18696 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18698 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18700 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);
18702 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18708 if(exp->destType && (exp->destType->kind == 18))
18710 else if(exp->destType && !exp->destType->keepCast)
18712 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18713 exp->needTemplateCast = 1;
18714 if(exp->destType->kind == 0)
18716 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18718 unsigned int invalidCast = 0;
18720 if(inCompiler && exp->destType->count && exp->expType)
18722 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18723 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18725 if(c1 && c1->type != 1)
18726 c1 = (((void *)0));
18727 if(c2 && c2->type != 1)
18728 c2 = (((void *)0));
18729 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18732 if(!exp->destType->count || unresolved || invalidCast)
18737 if(exp->destType->kind != 14)
18744 char expString[10240];
18746 expString[0] = '\0';
18747 PrintType(exp->destType, type2, 0, 1);
18750 PrintExpression(exp, expString);
18751 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18754 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18755 else if(exp->type != 16)
18756 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18761 char expString[10240];
18763 expString[0] = '\0';
18766 PrintExpression(exp, expString);
18767 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18770 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18771 else if(exp->type != 16)
18772 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18784 PrintType(exp->expType, type1, 0, 1);
18785 PrintType(exp->destType, type2, 0, 1);
18787 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)))
18791 struct Expression * nbExp = GetNonBracketsExp(exp);
18792 unsigned int skipWarning = 0;
18793 int kind = exp->destType->kind;
18795 if(nbExp->type == 12 && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
18797 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
18799 int op = nbExp->__anon1.op.op;
18800 struct Expression * nbExp1, * nbExp2;
18807 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18808 from = nbExp1->expType->promotedFrom;
18809 if(from == 1 || (kind == 2 && from == 2))
18814 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18815 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18816 from = nbExp1->expType->promotedFrom;
18817 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
18819 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
18821 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
18822 int s = from == 1 ? 8 : 16;
18824 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
18825 s = nbExp1->expType->bitMemberSize;
18826 if(nbExp->__anon1.op.op == RIGHT_OP)
18830 if(s <= (kind == 1 ? 8 : 16))
18835 if(!exp->destType->isSigned)
18837 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18838 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18839 from = nbExp2->expType->promotedFrom;
18840 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
18842 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
18844 if(n == (from == 1 ? 255 : 65535))
18853 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18854 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18855 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18856 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18857 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) && ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
18865 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18866 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18867 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18868 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18869 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) || ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
18877 char expString[10240];
18879 expString[0] = '\0';
18882 PrintExpression(exp, expString);
18883 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18885 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")))
18888 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18890 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18895 FreeType(exp->expType);
18896 exp->destType->refCount++;
18897 exp->expType = exp->destType;
18903 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))
18905 struct Expression * nbExp = GetNonBracketsExp(exp);
18907 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18909 struct Expression * e = MoveExpContents(exp);
18911 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18913 exp->__anon1.cast.exp->destType = exp->destType;
18915 exp->destType->refCount++;
18916 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18920 else if(unresolved)
18922 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18923 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);
18924 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18925 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18927 else if(!exp->expType && exp->type != 16)
18929 char expString[10240];
18931 expString[0] = '\0';
18934 PrintExpression(exp, expString);
18935 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18937 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18940 ApplyAnyObjectLogic(exp);
18941 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)))
18943 exp->byReference = 1;
18945 yylloc = oldyylloc;
18948 static void ProcessFunction(struct FunctionDefinition * function)
18950 struct Identifier * id = GetDeclId(function->declarator);
18951 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18952 struct Type * type = symbol ? symbol->type : (((void *)0));
18953 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18954 struct Context * oldTopContext = topContext;
18956 yylloc = function->loc;
18957 if(type && type->__anon1.__anon2.thisClass)
18959 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18960 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18961 char className[1024];
18962 char structName[1024];
18963 struct Declarator * funcDecl;
18964 struct Symbol * thisSymbol;
18965 unsigned int typedObject = 0;
18967 if(_class && !_class->base)
18969 _class = currentClass;
18970 if(_class && !_class->symbol)
18971 _class->symbol = FindClass(_class->fullName);
18972 classSym = _class ? _class->symbol : (((void *)0));
18975 thisClass = _class;
18976 if(inCompiler && _class)
18978 if(type->kind == 11)
18980 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18982 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18984 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18987 if(type->classObjectType != 1)
18989 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18990 symbol->type->__anon1.__anon2.staticMethod = 1;
18991 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18992 symbol->type->extraParam = 0;
18995 strcpy(className, "__ecereClass_");
18996 FullClassNameCat(className, _class->fullName, 1);
18998 FullClassNameCat(structName, _class->fullName, 0);
18999 funcDecl = GetFuncDecl(function->declarator);
19002 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19004 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19006 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19008 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19009 FreeTypeName(param);
19012 if(!function->propertyNoThis)
19014 struct TypeName * thisParam = (((void *)0));
19016 if(type->classObjectType != 1)
19018 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19019 if(!funcDecl->__anon1.function.parameters)
19020 funcDecl->__anon1.function.parameters = MkList();
19021 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19025 if(type->classObjectType != 1)
19027 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19028 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19030 thisParam = __extension__ ({
19031 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19033 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19035 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19036 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19040 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19042 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19044 funcDecl = GetFuncDecl(initDecl->declarator);
19047 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19049 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19051 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19053 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19054 FreeTypeName(param);
19057 if(type->classObjectType != 1)
19059 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19061 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19063 if(!funcDecl->__anon1.function.parameters)
19064 funcDecl->__anon1.function.parameters = MkList();
19065 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19073 if(type->classObjectType != 1)
19075 thisSymbol = __extension__ ({
19076 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19078 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19080 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19081 if(typedObject && thisSymbol->type)
19083 thisSymbol->type->classObjectType = 2;
19084 thisSymbol->type->byReference = type->byReference;
19085 thisSymbol->type->typedByReference = type->byReference;
19089 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19091 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19094 struct __ecereNameSpace__ecere__com__Class * base;
19096 for(base = _class; base && base->type != 1000; base = base->next)
19098 for(member = base->membersAndProperties.first; member; member = member->next)
19099 if(!member->isProperty)
19105 for(member = _class->membersAndProperties.first; member; member = member->next)
19106 if(!member->isProperty)
19110 char pointerName[1024];
19111 struct Declaration * decl;
19112 struct Initializer * initializer;
19113 struct Expression * exp, * bytePtr;
19115 strcpy(pointerName, "__ecerePointer_");
19116 FullClassNameCat(pointerName, _class->fullName, 0);
19118 char className[1024];
19120 strcpy(className, "__ecereClass_");
19121 FullClassNameCat(className, classSym->string, 1);
19122 DeclareClass(curExternal, classSym, className);
19124 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19127 struct Expression * e;
19129 if(_class->offset && _class->offset == _class->base->structSize)
19131 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19132 ProcessExpressionType(e);
19138 sprintf(string, "%d", _class->offset);
19139 e = MkExpConstant(string);
19141 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19145 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19147 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19148 exp->expType = __extension__ ({
19149 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19151 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19152 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19154 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19155 }), __ecereInstance2;
19159 yylloc = function->body->loc;
19160 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19162 struct Context * prevContext = curContext;
19163 struct __ecereNameSpace__ecere__sys__OldList * list;
19165 curContext = function->body->__anon1.compound.context;
19166 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19167 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19168 curContext = prevContext;
19170 decl->symbol = (((void *)0));
19171 if(!function->body->__anon1.compound.declarations)
19172 function->body->__anon1.compound.declarations = MkList();
19173 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19179 thisClass = (((void *)0));
19182 FreeSpecifier(id->_class);
19183 id->_class = (((void *)0));
19184 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19186 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19188 id = GetDeclId(initDecl->declarator);
19189 FreeSpecifier(id->_class);
19190 id->_class = (((void *)0));
19194 topContext = function->body->__anon1.compound.context;
19196 struct FunctionDefinition * oldFunction = curFunction;
19198 curFunction = function;
19200 ProcessStatement(function->body);
19201 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19203 struct Statement * prevCompound = curCompound;
19204 struct Context * prevContext = curContext;
19205 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19207 if(!function->body->__anon1.compound.statements)
19208 function->body->__anon1.compound.statements = MkList();
19209 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19210 curCompound = function->body;
19211 curContext = function->body->__anon1.compound.context;
19212 ProcessStatement(fireWatchers);
19213 curContext = prevContext;
19214 curCompound = prevCompound;
19216 curFunction = oldFunction;
19218 if(function->declarator)
19220 ProcessDeclarator(function->declarator, 1);
19222 topContext = oldTopContext;
19223 thisClass = oldThisClass;
19226 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19228 struct ClassDef * def;
19229 struct External * external = curExternal;
19230 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19232 for(def = definitions->first; def; def = def->next)
19236 if(def->__anon1.function->declarator)
19237 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19239 curExternal = external;
19240 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19242 else if(def->type == 2)
19244 if(def->__anon1.decl->type == 2)
19246 thisClass = regClass;
19247 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19248 thisClass = (((void *)0));
19252 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19255 thisClass = regClass;
19256 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19257 thisClass = backThisClass;
19260 else if(def->type == 1 && def->__anon1.defProperties)
19262 struct MemberInit * defProperty;
19263 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);
19265 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19266 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19268 thisClass = regClass;
19269 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19270 thisClass = (((void *)0));
19272 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19273 FreeSymbol(thisSymbol);
19275 else if(def->type == 3 && def->__anon1.propertyDef)
19277 struct PropertyDef * prop = def->__anon1.propertyDef;
19279 thisClass = regClass;
19284 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19286 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19288 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19289 ProcessStatement(prop->setStmt);
19295 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19297 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19299 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19300 ProcessStatement(prop->getStmt);
19302 if(prop->issetStmt)
19306 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19308 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19310 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19311 ProcessStatement(prop->issetStmt);
19313 thisClass = (((void *)0));
19315 else if(def->type == 4 && def->__anon1.propertyWatch)
19317 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19319 thisClass = regClass;
19320 if(propertyWatch->compound)
19322 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);
19324 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19325 curExternal = (((void *)0));
19326 ProcessStatement(propertyWatch->compound);
19328 thisClass = (((void *)0));
19333 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19335 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19337 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19338 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19339 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19340 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19341 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19342 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19343 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19344 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19345 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19346 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19347 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19348 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19349 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19350 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19351 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19352 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19353 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19354 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19355 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19356 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19357 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19358 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19359 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19360 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19361 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19362 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19363 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19364 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19365 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19366 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19367 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19368 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19369 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19370 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19371 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19372 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19373 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19374 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19375 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19376 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19377 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19378 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19379 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19380 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19381 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19382 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19383 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19384 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19385 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19386 __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);
19387 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19388 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19389 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19390 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19391 __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);
19392 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19393 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19394 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19395 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19396 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19397 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19398 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19399 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19400 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19401 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19402 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19403 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19404 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19405 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19406 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19407 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)
19408 __ecereClass_Conversion = class;
19409 __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);
19410 __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);
19411 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19412 __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);
19413 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19414 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19415 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19416 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19417 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19418 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19419 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19420 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19421 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19422 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19423 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19424 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19425 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19426 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19427 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19428 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19429 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19430 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19431 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19432 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19433 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19434 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);