1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 #include <sys/types.h>
42 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
45 extern int returnCode;
47 extern unsigned int yydebug;
49 extern unsigned int echoOn;
55 int expression_yyparse();
57 static char * thisNameSpace;
59 unsigned int thisClassParams = 1;
61 unsigned int internalValueCounter;
63 extern unsigned int outputLineNumbers;
65 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
67 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
69 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
71 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
73 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
75 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
77 extern int targetBits;
79 extern unsigned int inCompiler;
81 extern unsigned int inPreCompiler;
83 extern unsigned int inDebugger;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
89 int UnescapeString(char * d, char * s, int len)
94 while(j < len && (ch = s[j]))
145 char * OffsetEscapedString(char * s, int len, int offset)
150 while(j < len && k < offset && (ch = s[j]))
156 return (k == offset) ? s + j : (((void *)0));
159 extern int __ecereVMethodID_class_OnGetString;
161 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
163 extern unsigned int parseError;
165 static int definedExpStackPos;
167 static void * definedExpStack[512];
169 extern const char * sourceFile;
171 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
173 extern unsigned int memoryGuard;
175 struct __ecereNameSpace__ecere__sys__OldList
182 } __attribute__ ((gcc_struct));
184 struct __ecereNameSpace__ecere__com__DataValue
199 } __attribute__ ((gcc_struct)) __anon1;
200 } __attribute__ ((gcc_struct));
202 struct __ecereNameSpace__ecere__com__SerialBuffer
204 unsigned char * _buffer;
208 } __attribute__ ((gcc_struct));
210 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
212 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
214 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
216 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
218 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
226 struct TemplateArgument;
240 } __attribute__ ((gcc_struct));
242 extern size_t strlen(const char * );
244 extern int strcmp(const char * , const char * );
246 extern int sprintf(char * , const char * , ...);
248 extern char * strcat(char * , const char * );
250 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
252 extern int isprint(int c);
254 extern char * strcpy(char * , const char * );
256 extern void Compiler_Error(const char * format, ...);
258 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
260 struct __ecereNameSpace__ecere__com__LinkList
265 } __attribute__ ((gcc_struct));
267 extern char * strchr(const char * , int);
269 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
271 extern void * memcpy(void * , const void * , size_t size);
273 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
275 extern void Compiler_Warning(const char * format, ...);
277 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
279 extern long long strtoll(const char * nptr, char * * endptr, int base);
281 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
283 extern int strtol(const char * , char * * , int base);
285 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
287 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
289 extern double strtod(const char * , char * * );
291 extern int strncmp(const char * , const char * , size_t n);
293 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
295 extern char * QMkString(const char * source);
297 extern char * strncpy(char * , const char * , size_t n);
299 extern int printf(const char * , ...);
301 extern char * strstr(const char * , const char * );
303 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
305 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
307 extern int (* __ecereProp_float_Get_signBit)(float this);
309 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
311 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
313 extern int (* __ecereProp_double_Get_signBit)(double this);
315 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
317 extern float (* __ecereMethod_float_inf)(void);
319 extern float (* __ecereMethod_float_nan)(void);
321 extern double (* __ecereMethod_double_inf)(void);
323 extern double (* __ecereMethod_double_nan)(void);
325 int __ecereVMethodID_class_OnGetString;
327 void SetYydebug(unsigned int b)
332 unsigned int GetParseError()
337 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
339 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
341 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
343 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
345 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
347 struct __ecereNameSpace__ecere__com__EnumClassData
349 struct __ecereNameSpace__ecere__sys__OldList values;
351 } __attribute__ ((gcc_struct));
353 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
355 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
357 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
359 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
361 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
363 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
365 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
367 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
371 struct CodePosition start;
372 struct CodePosition end;
373 } __attribute__ ((gcc_struct));
375 void ReadString(char * output, char * string)
377 int len = strlen(string);
379 unsigned int quoted = 0, escaped = 0;
381 for(c = 0; c < len; c++)
441 char * PrintInt(long long result)
445 if(result > (((int)0x7fffffff)))
446 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
448 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
449 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
451 return __ecereNameSpace__ecere__sys__CopyString(temp);
454 char * PrintUInt(uint64 result)
458 if(result > (0xffffffff))
459 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
460 else if(result > (((int)0x7fffffff)))
461 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
463 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
464 return __ecereNameSpace__ecere__sys__CopyString(temp);
467 char * PrintInt64(long long result)
471 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
472 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
474 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
475 return __ecereNameSpace__ecere__sys__CopyString(temp);
478 char * PrintUInt64(uint64 result)
482 if(result > (0xffffffff))
483 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
484 else if(result > (((int)0x7fffffff)))
485 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
487 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
488 return __ecereNameSpace__ecere__sys__CopyString(temp);
491 char * PrintHexUInt(uint64 result)
495 if(result > (0xffffffff))
496 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
498 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
499 if(result > (0xffffffff))
501 return __ecereNameSpace__ecere__sys__CopyString(temp);
504 char * PrintHexUInt64(uint64 result)
508 if(result > (0xffffffff))
509 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
511 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 return __ecereNameSpace__ecere__sys__CopyString(temp);
515 char * PrintShort(short result)
519 sprintf(temp, "%d", (unsigned short)result);
520 return __ecereNameSpace__ecere__sys__CopyString(temp);
523 char * PrintUShort(unsigned short result)
527 if(result > (unsigned short)32767)
528 sprintf(temp, "0x%X", (int)result);
530 sprintf(temp, "%d", (int)result);
531 return __ecereNameSpace__ecere__sys__CopyString(temp);
534 char * PrintUChar(unsigned char result)
538 sprintf(temp, "0x%X", result);
539 return __ecereNameSpace__ecere__sys__CopyString(temp);
542 char * PrintChar(char result)
546 if(result > (char)0 && isprint(result))
547 sprintf(temp, "'%c'", result);
548 else if(result < (char)0)
549 sprintf(temp, "%d", (int)result);
551 sprintf(temp, "0x%X", (unsigned char)result);
552 return __ecereNameSpace__ecere__sys__CopyString(temp);
555 char * PrintFloat(float result)
559 if(__ecereProp_float_Get_isInf(result))
561 if(__ecereProp_float_Get_signBit(result))
562 strcpy(temp, "-inf");
566 else if(__ecereProp_float_Get_isNan(result))
568 if(__ecereProp_float_Get_signBit(result))
569 strcpy(temp, "-nan");
574 sprintf(temp, "%.16ff", result);
575 return __ecereNameSpace__ecere__sys__CopyString(temp);
578 char * PrintDouble(double result)
582 if(__ecereProp_double_Get_isInf(result))
584 if(__ecereProp_double_Get_signBit(result))
585 strcpy(temp, "-inf");
589 else if(__ecereProp_double_Get_isNan(result))
591 if(__ecereProp_double_Get_signBit(result))
592 strcpy(temp, "-nan");
597 sprintf(temp, "%.16f", result);
598 return __ecereNameSpace__ecere__sys__CopyString(temp);
601 extern struct Location yylloc;
610 struct Attrib * attr;
611 } __attribute__ ((gcc_struct)) __anon1;
612 } __attribute__ ((gcc_struct));
614 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
618 extern struct Expression * parsedExpression;
620 extern struct Expression * QMkExpId(const char * id);
622 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
624 void ComputeExpression(struct Expression * exp);
626 extern struct Expression * MkExpConstant(const char * string);
628 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
630 extern void FreeExpression(struct Expression * exp);
632 extern void FreeExpContents(struct Expression * exp);
634 extern struct Expression * CopyExpression(struct Expression * exp);
636 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
638 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
640 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
642 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
644 extern struct Expression * MoveExpContents(struct Expression * exp);
646 extern struct Expression * QBrackets(struct Expression * exp);
648 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
652 static struct Statement * curCompound;
654 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
656 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
658 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
660 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
662 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
664 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
668 struct External * curExternal, * afterExternal;
670 extern void FreeExternal(struct External * external);
674 static struct Type * curSwitchType;
676 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
678 extern void FreeType(struct Type * type);
680 extern struct Type * MkClassType(const char * name);
682 extern void CopyTypeInto(struct Type * type, struct Type * src);
684 struct __ecereNameSpace__ecere__com__Class;
686 struct __ecereNameSpace__ecere__com__Instance
689 struct __ecereNameSpace__ecere__com__Class * _class;
691 } __attribute__ ((gcc_struct));
693 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
695 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
697 static struct __ecereNameSpace__ecere__com__Class * currentClass;
699 struct __ecereNameSpace__ecere__com__Class * thisClass;
701 struct __ecereNameSpace__ecere__com__Class * containerClass;
703 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
705 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
707 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
709 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
711 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
713 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
715 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
717 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
719 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
721 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
723 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
725 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
730 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
737 extern struct Context * curContext;
739 extern struct Context * topContext;
741 extern struct Context * PushContext(void);
743 extern void PopContext(struct Context * ctx);
745 extern void FreeContext(struct Context * context);
747 extern struct Context * globalContext;
751 extern struct ModuleImport * mainModule;
755 struct ModuleImport * prev;
756 struct ModuleImport * next;
758 struct __ecereNameSpace__ecere__sys__OldList classes;
759 struct __ecereNameSpace__ecere__sys__OldList functions;
762 } __attribute__ ((gcc_struct));
766 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
768 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
770 static void ProcessDeclaration(struct Declaration * decl);
772 struct __ecereNameSpace__ecere__com__NameSpace;
774 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
776 struct FunctionDefinition;
778 static struct FunctionDefinition * curFunction;
780 struct __ecereNameSpace__ecere__sys__BTNode;
782 struct __ecereNameSpace__ecere__sys__BTNode
785 struct __ecereNameSpace__ecere__sys__BTNode * parent;
786 struct __ecereNameSpace__ecere__sys__BTNode * left;
787 struct __ecereNameSpace__ecere__sys__BTNode * right;
789 } __attribute__ ((gcc_struct));
791 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
793 struct __ecereNameSpace__ecere__com__Property;
795 struct __ecereNameSpace__ecere__com__Property
797 struct __ecereNameSpace__ecere__com__Property * prev;
798 struct __ecereNameSpace__ecere__com__Property * next;
800 unsigned int isProperty;
803 struct __ecereNameSpace__ecere__com__Class * _class;
804 const char * dataTypeString;
805 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
806 struct Type * dataType;
807 void (* Set)(void * , int);
808 int (* Get)(void * );
809 unsigned int (* IsSet)(void * );
813 unsigned int conversion;
814 unsigned int watcherOffset;
815 const char * category;
816 unsigned int compiled;
817 unsigned int selfWatchable;
818 unsigned int isWatchable;
819 } __attribute__ ((gcc_struct));
821 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
823 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
825 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
827 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
831 extern void FreeIdentifier(struct Identifier * id);
833 extern struct Identifier * MkIdentifier(const char * string);
835 extern struct Expression * MkExpIdentifier(struct Identifier * id);
837 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
839 extern struct Identifier * CopyIdentifier(struct Identifier * id);
841 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
843 struct __ecereNameSpace__ecere__sys__OldLink;
845 struct __ecereNameSpace__ecere__sys__OldLink
847 struct __ecereNameSpace__ecere__sys__OldLink * prev;
848 struct __ecereNameSpace__ecere__sys__OldLink * next;
850 } __attribute__ ((gcc_struct));
854 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
856 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
858 extern struct Specifier * MkSpecifier(int specifier);
860 extern struct Specifier * MkSpecifierName(const char * name);
862 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
864 extern void FreeSpecifier(struct Specifier * spec);
866 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
870 struct Statement * prev;
871 struct Statement * next;
876 struct __ecereNameSpace__ecere__sys__OldList * expressions;
879 struct Identifier * id;
880 struct Statement * stmt;
881 } __attribute__ ((gcc_struct)) labeled;
884 struct Expression * exp;
885 struct Statement * stmt;
886 } __attribute__ ((gcc_struct)) caseStmt;
889 struct __ecereNameSpace__ecere__sys__OldList * declarations;
890 struct __ecereNameSpace__ecere__sys__OldList * statements;
891 struct Context * context;
892 unsigned int isSwitch;
893 } __attribute__ ((gcc_struct)) compound;
896 struct __ecereNameSpace__ecere__sys__OldList * exp;
897 struct Statement * stmt;
898 struct Statement * elseStmt;
899 } __attribute__ ((gcc_struct)) ifStmt;
902 struct __ecereNameSpace__ecere__sys__OldList * exp;
903 struct Statement * stmt;
904 } __attribute__ ((gcc_struct)) switchStmt;
907 struct __ecereNameSpace__ecere__sys__OldList * exp;
908 struct Statement * stmt;
909 } __attribute__ ((gcc_struct)) whileStmt;
912 struct __ecereNameSpace__ecere__sys__OldList * exp;
913 struct Statement * stmt;
914 } __attribute__ ((gcc_struct)) doWhile;
917 struct Statement * init;
918 struct Statement * check;
919 struct __ecereNameSpace__ecere__sys__OldList * increment;
920 struct Statement * stmt;
921 } __attribute__ ((gcc_struct)) forStmt;
924 struct Identifier * id;
925 } __attribute__ ((gcc_struct)) gotoStmt;
928 struct Specifier * spec;
930 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
931 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
932 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
933 } __attribute__ ((gcc_struct)) asmStmt;
936 struct Expression * watcher;
937 struct Expression * object;
938 struct __ecereNameSpace__ecere__sys__OldList * watches;
939 } __attribute__ ((gcc_struct)) _watch;
942 struct Identifier * id;
943 struct __ecereNameSpace__ecere__sys__OldList * exp;
944 struct __ecereNameSpace__ecere__sys__OldList * filter;
945 struct Statement * stmt;
946 } __attribute__ ((gcc_struct)) forEachStmt;
947 struct Declaration * decl;
948 } __attribute__ ((gcc_struct)) __anon1;
949 } __attribute__ ((gcc_struct));
951 extern struct Specifier * CopySpecifier(struct Specifier * spec);
953 extern struct Expression * MkExpClassSize(struct Specifier * _class);
959 struct Identifier * prev;
960 struct Identifier * next;
962 struct Symbol * classSym;
963 struct Specifier * _class;
965 struct Identifier * badID;
966 } __attribute__ ((gcc_struct));
968 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
970 extern struct Symbol * FindClass(const char * name);
972 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
974 extern struct Symbol * FindType(struct Context * ctx, const char * name);
976 extern void FreeSymbol(struct Symbol * symbol);
980 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
982 extern void FreeClassDef(struct ClassDef * def);
986 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
988 struct TemplateDatatype
990 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
991 struct Declarator * decl;
992 } __attribute__ ((gcc_struct));
994 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
996 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
998 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1000 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1002 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1006 struct Declarator * prev;
1007 struct Declarator * next;
1008 struct Location loc;
1010 struct Symbol * symbol;
1011 struct Declarator * declarator;
1014 struct Identifier * identifier;
1017 struct Expression * exp;
1018 struct Expression * posExp;
1019 struct Attrib * attrib;
1020 } __attribute__ ((gcc_struct)) structDecl;
1023 struct Expression * exp;
1024 struct Specifier * enumClass;
1025 } __attribute__ ((gcc_struct)) array;
1028 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1029 } __attribute__ ((gcc_struct)) function;
1032 struct Pointer * pointer;
1033 } __attribute__ ((gcc_struct)) pointer;
1036 struct ExtDecl * extended;
1037 } __attribute__ ((gcc_struct)) extended;
1038 } __attribute__ ((gcc_struct)) __anon1;
1039 } __attribute__ ((gcc_struct));
1041 extern struct Identifier * GetDeclId(struct Declarator * decl);
1043 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1045 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1047 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1049 extern void FreeDeclarator(struct Declarator * decl);
1051 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1053 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1055 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1057 struct FunctionDefinition
1059 struct FunctionDefinition * prev;
1060 struct FunctionDefinition * next;
1061 struct Location loc;
1062 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1063 struct Declarator * declarator;
1064 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1065 struct Statement * body;
1066 struct __ecereNameSpace__ecere__com__Class * _class;
1067 struct __ecereNameSpace__ecere__sys__OldList attached;
1070 struct Symbol * propSet;
1072 unsigned int propertyNoThis;
1073 } __attribute__ ((gcc_struct));
1075 extern struct Declarator * QMkPtrDecl(const char * id);
1077 struct ClassFunction;
1079 struct ClassFunction
1081 struct ClassFunction * prev;
1082 struct ClassFunction * next;
1083 struct Location loc;
1084 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1085 struct Declarator * declarator;
1086 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1087 struct Statement * body;
1088 struct __ecereNameSpace__ecere__com__Class * _class;
1089 struct __ecereNameSpace__ecere__sys__OldList attached;
1092 struct Symbol * propSet;
1093 unsigned int isVirtual;
1094 unsigned int isConstructor;
1095 unsigned int isDestructor;
1096 unsigned int dontMangle;
1099 } __attribute__ ((gcc_struct));
1101 extern struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic);
1103 extern void FreeClassFunction(struct ClassFunction * func);
1105 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1107 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1111 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1113 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1117 struct TypeName * prev;
1118 struct TypeName * next;
1119 struct Location loc;
1120 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1121 struct Declarator * declarator;
1122 int classObjectType;
1123 struct Expression * bitCount;
1124 } __attribute__ ((gcc_struct));
1126 extern void FreeTypeName(struct TypeName * typeName);
1128 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1130 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1132 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1134 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1136 struct __ecereNameSpace__ecere__com__BTNamedLink;
1138 struct __ecereNameSpace__ecere__com__BTNamedLink
1141 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1142 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1143 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1146 } __attribute__ ((gcc_struct));
1148 struct __ecereNameSpace__ecere__sys__NamedLink64;
1150 struct __ecereNameSpace__ecere__sys__NamedLink64
1152 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1153 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1156 } __attribute__ ((gcc_struct));
1158 struct Instantiation;
1162 struct Declaration * prev;
1163 struct Declaration * next;
1164 struct Location loc;
1170 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1171 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1172 } __attribute__ ((gcc_struct)) __anon1;
1173 struct Instantiation * inst;
1176 struct Identifier * id;
1177 struct Expression * exp;
1178 } __attribute__ ((gcc_struct)) __anon2;
1179 } __attribute__ ((gcc_struct)) __anon1;
1180 struct Specifier * extStorage;
1181 struct Symbol * symbol;
1183 } __attribute__ ((gcc_struct));
1185 struct Instantiation
1187 struct Instantiation * prev;
1188 struct Instantiation * next;
1189 struct Location loc;
1190 struct Specifier * _class;
1191 struct Expression * exp;
1192 struct __ecereNameSpace__ecere__sys__OldList * members;
1193 struct Symbol * symbol;
1194 unsigned int fullSet;
1195 unsigned int isConstant;
1196 unsigned char * data;
1197 struct Location nameLoc;
1198 struct Location insideLoc;
1200 } __attribute__ ((gcc_struct));
1202 extern void FreeInstance(struct Instantiation * inst);
1204 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1206 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1208 struct InitDeclarator;
1210 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1212 struct PropertyWatch;
1214 struct PropertyWatch
1216 struct PropertyWatch * prev;
1217 struct PropertyWatch * next;
1218 struct Location loc;
1219 struct Statement * compound;
1220 struct __ecereNameSpace__ecere__sys__OldList * properties;
1221 unsigned int deleteWatch;
1222 } __attribute__ ((gcc_struct));
1224 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1226 struct PropertyImport;
1228 struct PropertyImport
1230 struct PropertyImport * prev;
1231 struct PropertyImport * next;
1233 unsigned int isVirtual;
1234 unsigned int hasSet;
1235 unsigned int hasGet;
1236 } __attribute__ ((gcc_struct));
1238 struct MethodImport;
1242 struct MethodImport * prev;
1243 struct MethodImport * next;
1245 unsigned int isVirtual;
1246 } __attribute__ ((gcc_struct));
1248 struct FunctionImport;
1250 struct FunctionImport
1252 struct FunctionImport * prev;
1253 struct FunctionImport * next;
1255 } __attribute__ ((gcc_struct));
1261 struct ClassImport * prev;
1262 struct ClassImport * next;
1264 struct __ecereNameSpace__ecere__sys__OldList methods;
1265 struct __ecereNameSpace__ecere__sys__OldList properties;
1266 unsigned int itself;
1268 } __attribute__ ((gcc_struct));
1274 struct Expression * prev;
1275 struct Expression * next;
1276 struct Location loc;
1283 struct Identifier * identifier;
1284 } __attribute__ ((gcc_struct)) __anon1;
1285 struct Statement * compound;
1286 struct Instantiation * instance;
1290 unsigned int intlString;
1291 unsigned int wideString;
1292 } __attribute__ ((gcc_struct)) __anon2;
1293 struct __ecereNameSpace__ecere__sys__OldList * list;
1296 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1297 struct Declarator * decl;
1298 } __attribute__ ((gcc_struct)) _classExp;
1301 struct Identifier * id;
1302 } __attribute__ ((gcc_struct)) classData;
1305 struct Expression * exp;
1306 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1307 struct Location argLoc;
1308 } __attribute__ ((gcc_struct)) call;
1311 struct Expression * exp;
1312 struct __ecereNameSpace__ecere__sys__OldList * index;
1313 } __attribute__ ((gcc_struct)) index;
1316 struct Expression * exp;
1317 struct Identifier * member;
1319 unsigned int thisPtr;
1320 } __attribute__ ((gcc_struct)) member;
1324 struct Expression * exp1;
1325 struct Expression * exp2;
1326 } __attribute__ ((gcc_struct)) op;
1327 struct TypeName * typeName;
1328 struct Specifier * _class;
1331 struct TypeName * typeName;
1332 struct Expression * exp;
1333 } __attribute__ ((gcc_struct)) cast;
1336 struct Expression * cond;
1337 struct __ecereNameSpace__ecere__sys__OldList * exp;
1338 struct Expression * elseExp;
1339 } __attribute__ ((gcc_struct)) cond;
1342 struct TypeName * typeName;
1343 struct Expression * size;
1344 } __attribute__ ((gcc_struct)) _new;
1347 struct TypeName * typeName;
1348 struct Expression * size;
1349 struct Expression * exp;
1350 } __attribute__ ((gcc_struct)) _renew;
1354 struct Identifier * id;
1355 } __attribute__ ((gcc_struct)) db;
1358 struct Expression * ds;
1359 struct Expression * name;
1360 } __attribute__ ((gcc_struct)) dbopen;
1363 struct TypeName * typeName;
1364 struct Initializer * initializer;
1365 } __attribute__ ((gcc_struct)) initializer;
1368 struct Expression * exp;
1369 struct TypeName * typeName;
1370 } __attribute__ ((gcc_struct)) vaArg;
1371 } __attribute__ ((gcc_struct)) __anon1;
1372 unsigned int debugValue;
1373 struct __ecereNameSpace__ecere__com__DataValue val;
1375 unsigned int hasAddress;
1376 struct Type * expType;
1377 struct Type * destType;
1380 unsigned int byReference;
1381 unsigned int isConstant;
1382 unsigned int addedThis;
1383 unsigned int needCast;
1384 unsigned int thisPtr;
1385 unsigned int opDestType;
1386 unsigned int needTemplateCast;
1387 } __attribute__ ((gcc_struct));
1389 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1393 struct Initializer * prev;
1394 struct Initializer * next;
1395 struct Location loc;
1399 struct Expression * exp;
1400 struct __ecereNameSpace__ecere__sys__OldList * list;
1401 } __attribute__ ((gcc_struct)) __anon1;
1402 unsigned int isConstant;
1403 struct Identifier * id;
1404 } __attribute__ ((gcc_struct));
1406 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1408 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1410 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1412 struct InitDeclarator
1414 struct InitDeclarator * prev;
1415 struct InitDeclarator * next;
1416 struct Location loc;
1417 struct Declarator * declarator;
1418 struct Initializer * initializer;
1419 } __attribute__ ((gcc_struct));
1421 void ApplyLocation(struct Expression * exp, struct Location * loc)
1427 if(exp->__anon1.op.exp1)
1428 ApplyLocation(exp->__anon1.op.exp1, loc);
1429 if(exp->__anon1.op.exp2)
1430 ApplyLocation(exp->__anon1.op.exp2, loc);
1433 if(exp->__anon1.list)
1435 struct Expression * e;
1437 for(e = (*exp->__anon1.list).first; e; e = e->next)
1438 ApplyLocation(e, loc);
1442 if(exp->__anon1.index.index)
1444 struct Expression * e;
1446 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1447 ApplyLocation(e, loc);
1449 if(exp->__anon1.index.exp)
1450 ApplyLocation(exp->__anon1.index.exp, loc);
1453 if(exp->__anon1.call.arguments)
1455 struct Expression * arg;
1457 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1458 ApplyLocation(arg, loc);
1460 if(exp->__anon1.call.exp)
1461 ApplyLocation(exp->__anon1.call.exp, loc);
1465 if(exp->__anon1.member.exp)
1466 ApplyLocation(exp->__anon1.member.exp, loc);
1469 if(exp->__anon1.cast.exp)
1470 ApplyLocation(exp->__anon1.cast.exp, loc);
1473 if(exp->__anon1.cond.exp)
1475 struct Expression * e;
1477 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1478 ApplyLocation(e, loc);
1480 if(exp->__anon1.cond.cond)
1481 ApplyLocation(exp->__anon1.cond.cond, loc);
1482 if(exp->__anon1.cond.elseExp)
1483 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1486 if(exp->__anon1.vaArg.exp)
1487 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1494 void __ecereMethod_Expression_Clear();
1500 struct MembersInit * prev;
1501 struct MembersInit * next;
1502 struct Location loc;
1506 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1507 struct ClassFunction * function;
1508 } __attribute__ ((gcc_struct)) __anon1;
1509 } __attribute__ ((gcc_struct));
1511 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1517 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1518 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1519 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1520 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1521 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1522 unsigned int (* Neg)(struct Expression *, struct Operand *);
1523 unsigned int (* Inc)(struct Expression *, struct Operand *);
1524 unsigned int (* Dec)(struct Expression *, struct Operand *);
1525 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1526 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1527 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1528 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1529 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1530 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1531 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1532 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1533 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1534 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1535 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1537 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* Not)(struct Expression *, struct Operand *);
1543 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1552 } __attribute__ ((gcc_struct));
1558 unsigned int ptrSize;
1571 } __attribute__ ((gcc_struct)) __anon1;
1573 } __attribute__ ((gcc_struct));
1575 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1577 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1579 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1582 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1584 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1586 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1589 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1591 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1594 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1596 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1598 _PrintType(type, string, printName, fullName, 1);
1601 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1603 _PrintType(type, string, printName, fullName, 0);
1606 struct __ecereNameSpace__ecere__com__Method;
1608 struct __ecereNameSpace__ecere__com__Method
1611 struct __ecereNameSpace__ecere__com__Method * parent;
1612 struct __ecereNameSpace__ecere__com__Method * left;
1613 struct __ecereNameSpace__ecere__com__Method * right;
1618 struct __ecereNameSpace__ecere__com__Class * _class;
1620 const char * dataTypeString;
1621 struct Type * dataType;
1623 } __attribute__ ((gcc_struct));
1628 struct Symbol * parent;
1629 struct Symbol * left;
1630 struct Symbol * right;
1635 struct __ecereNameSpace__ecere__com__Method * method;
1636 struct __ecereNameSpace__ecere__com__Property * _property;
1637 struct __ecereNameSpace__ecere__com__Class * registered;
1638 } __attribute__ ((gcc_struct)) __anon1;
1639 unsigned int notYetDeclared;
1644 struct External * pointerExternal;
1645 struct External * structExternal;
1646 } __attribute__ ((gcc_struct)) __anon1;
1649 struct External * externalGet;
1650 struct External * externalSet;
1651 struct External * externalPtr;
1652 struct External * externalIsSet;
1653 } __attribute__ ((gcc_struct)) __anon2;
1656 struct External * methodExternal;
1657 struct External * methodCodeExternal;
1658 } __attribute__ ((gcc_struct)) __anon3;
1659 } __attribute__ ((gcc_struct)) __anon2;
1660 unsigned int imported;
1661 unsigned int declaredStructSym;
1662 struct __ecereNameSpace__ecere__com__Class * _class;
1663 unsigned int declaredStruct;
1664 unsigned int needConstructor;
1665 unsigned int needDestructor;
1666 char * constructorName;
1669 char * destructorName;
1670 struct ModuleImport * module;
1671 struct ClassImport * _import;
1672 struct Location nameLoc;
1673 unsigned int isParam;
1674 unsigned int isRemote;
1675 unsigned int isStruct;
1676 unsigned int fireWatchersDone;
1678 unsigned int classData;
1679 unsigned int isStatic;
1681 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1682 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1683 struct Context * ctx;
1685 struct Expression * propCategory;
1686 } __attribute__ ((gcc_struct));
1688 struct __ecereNameSpace__ecere__com__ClassProperty;
1690 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1692 struct __ecereNameSpace__ecere__com__ClassProperty
1695 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1696 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1697 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1699 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1700 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1701 const char * dataTypeString;
1702 struct Type * dataType;
1703 unsigned int constant;
1704 } __attribute__ ((gcc_struct));
1706 struct __ecereNameSpace__ecere__com__BitMember;
1708 struct __ecereNameSpace__ecere__com__BitMember
1710 struct __ecereNameSpace__ecere__com__BitMember * prev;
1711 struct __ecereNameSpace__ecere__com__BitMember * next;
1713 unsigned int isProperty;
1716 struct __ecereNameSpace__ecere__com__Class * _class;
1717 const char * dataTypeString;
1718 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1719 struct Type * dataType;
1724 } __attribute__ ((gcc_struct));
1726 struct __ecereNameSpace__ecere__com__DataMember;
1728 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1734 const char * dataTypeString;
1735 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1736 } __attribute__ ((gcc_struct)) __anon1;
1737 struct __ecereNameSpace__ecere__com__DataValue expression;
1740 const char * memberString;
1743 struct __ecereNameSpace__ecere__com__DataMember * member;
1744 struct __ecereNameSpace__ecere__com__Property * prop;
1745 struct __ecereNameSpace__ecere__com__Method * method;
1746 } __attribute__ ((gcc_struct)) __anon1;
1747 } __attribute__ ((gcc_struct)) __anon2;
1748 } __attribute__ ((gcc_struct)) __anon1;
1749 } __attribute__ ((gcc_struct));
1751 extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
1753 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
1755 struct TemplateParameter;
1757 struct TemplateParameter
1759 struct TemplateParameter * prev;
1760 struct TemplateParameter * next;
1761 struct Location loc;
1763 struct Identifier * identifier;
1766 struct TemplateDatatype * dataType;
1768 } __attribute__ ((gcc_struct)) __anon1;
1769 struct TemplateArgument * defaultArgument;
1770 const char * dataTypeString;
1771 struct Type * baseType;
1772 } __attribute__ ((gcc_struct));
1781 struct Symbol * _class;
1784 struct __ecereNameSpace__ecere__sys__OldList members;
1786 } __attribute__ ((gcc_struct)) __anon1;
1789 struct Type * returnType;
1790 struct __ecereNameSpace__ecere__sys__OldList params;
1791 struct Symbol * thisClass;
1792 unsigned int staticMethod;
1793 struct TemplateParameter * thisClassTemplate;
1794 } __attribute__ ((gcc_struct)) __anon2;
1797 struct __ecereNameSpace__ecere__com__Method * method;
1798 struct __ecereNameSpace__ecere__com__Class * methodClass;
1799 struct __ecereNameSpace__ecere__com__Class * usedClass;
1800 } __attribute__ ((gcc_struct)) __anon3;
1803 struct Type * arrayType;
1805 struct Expression * arraySizeExp;
1806 unsigned int freeExp;
1807 struct Symbol * enumClass;
1808 } __attribute__ ((gcc_struct)) __anon4;
1810 struct TemplateParameter * templateParameter;
1811 } __attribute__ ((gcc_struct)) __anon1;
1816 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1817 int classObjectType;
1819 unsigned int offset;
1822 unsigned int isSigned : 1;
1823 unsigned int constant : 1;
1824 unsigned int truth : 1;
1825 unsigned int byReference : 1;
1826 unsigned int extraParam : 1;
1827 unsigned int directClassAccess : 1;
1828 unsigned int computing : 1;
1829 unsigned int keepCast : 1;
1830 unsigned int passAsTemplate : 1;
1831 unsigned int dllExport : 1;
1832 unsigned int attrStdcall : 1;
1833 unsigned int declaredWithStruct : 1;
1834 unsigned int typedByReference : 1;
1835 unsigned int casted : 1;
1836 unsigned int pointerAlignment : 1;
1837 } __attribute__ ((gcc_struct));
1841 struct Specifier * prev;
1842 struct Specifier * next;
1843 struct Location loc;
1850 struct ExtDecl * extDecl;
1852 struct Symbol * symbol;
1853 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1854 } __attribute__ ((gcc_struct)) __anon1;
1857 struct Identifier * id;
1858 struct __ecereNameSpace__ecere__sys__OldList * list;
1859 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1860 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1861 unsigned int addNameSpace;
1862 struct Context * ctx;
1863 struct ExtDecl * extDeclStruct;
1864 } __attribute__ ((gcc_struct)) __anon2;
1865 struct Expression * expression;
1866 struct Specifier * _class;
1867 struct TemplateParameter * templateParameter;
1868 } __attribute__ ((gcc_struct)) __anon1;
1869 } __attribute__ ((gcc_struct));
1871 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1873 struct TemplatedType
1876 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1877 struct __ecereNameSpace__ecere__sys__BTNode * left;
1878 struct __ecereNameSpace__ecere__sys__BTNode * right;
1880 struct TemplateParameter * param;
1881 } __attribute__ ((gcc_struct));
1883 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1885 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1887 if(!param->baseType)
1889 if(param->dataTypeString)
1890 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1892 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1894 return param->baseType;
1896 return (((void *)0));
1899 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1901 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1903 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1907 if(type1->kind == type2->kind)
1918 if(type1->passAsTemplate && !type2->passAsTemplate)
1920 return type1->isSigned != type2->isSigned;
1922 return type1->__anon1._class != type2->__anon1._class;
1924 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1932 unsigned int GetOpInt(struct Operand * op2, int * value2)
1934 if(op2->kind == 3 && op2->type->isSigned)
1935 *value2 = op2->__anon1.i;
1936 else if(op2->kind == 3)
1937 *value2 = (int)op2->__anon1.ui;
1938 else if(op2->kind == 4 && op2->type->isSigned)
1939 *value2 = (int)op2->__anon1.i64;
1940 else if(op2->kind == 4)
1941 *value2 = (int)op2->__anon1.ui64;
1942 else if(op2->kind == 23 && op2->type->isSigned)
1943 *value2 = (int)op2->__anon1.i64;
1944 else if(op2->kind == 23)
1945 *value2 = (int)op2->__anon1.ui64;
1946 else if(op2->kind == 22 && op2->type->isSigned)
1947 *value2 = (int)op2->__anon1.i64;
1948 else if(op2->kind == 22)
1949 *value2 = (int)op2->__anon1.ui64;
1950 else if(op2->kind == 2 && op2->type->isSigned)
1951 *value2 = (int)op2->__anon1.s;
1952 else if(op2->kind == 2)
1953 *value2 = (int)op2->__anon1.us;
1954 else if(op2->kind == 1 && op2->type->isSigned)
1955 *value2 = (int)op2->__anon1.c;
1956 else if(op2->kind == 24 || op2->kind == 1)
1957 *value2 = (int)op2->__anon1.uc;
1958 else if(op2->kind == 6)
1959 *value2 = (int)op2->__anon1.f;
1960 else if(op2->kind == 7)
1961 *value2 = (int)op2->__anon1.d;
1962 else if(op2->kind == 13)
1963 *value2 = (int)op2->__anon1.ui64;
1969 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1971 if(op2->kind == 3 && op2->type->isSigned)
1972 *value2 = (unsigned int)op2->__anon1.i;
1973 else if(op2->kind == 3)
1974 *value2 = op2->__anon1.ui;
1975 else if(op2->kind == 4 && op2->type->isSigned)
1976 *value2 = (unsigned int)op2->__anon1.i64;
1977 else if(op2->kind == 4)
1978 *value2 = (unsigned int)op2->__anon1.ui64;
1979 else if(op2->kind == 23 && op2->type->isSigned)
1980 *value2 = (unsigned int)op2->__anon1.i64;
1981 else if(op2->kind == 23)
1982 *value2 = (unsigned int)op2->__anon1.ui64;
1983 else if(op2->kind == 22 && op2->type->isSigned)
1984 *value2 = (unsigned int)op2->__anon1.i64;
1985 else if(op2->kind == 22)
1986 *value2 = (unsigned int)op2->__anon1.ui64;
1987 else if(op2->kind == 2 && op2->type->isSigned)
1988 *value2 = (unsigned int)op2->__anon1.s;
1989 else if(op2->kind == 2)
1990 *value2 = (unsigned int)op2->__anon1.us;
1991 else if(op2->kind == 1 && op2->type->isSigned)
1992 *value2 = (unsigned int)op2->__anon1.c;
1993 else if(op2->kind == 24 || op2->kind == 1)
1994 *value2 = (unsigned int)op2->__anon1.uc;
1995 else if(op2->kind == 6)
1996 *value2 = (unsigned int)op2->__anon1.f;
1997 else if(op2->kind == 7)
1998 *value2 = (unsigned int)op2->__anon1.d;
1999 else if(op2->kind == 13)
2000 *value2 = (unsigned int)op2->__anon1.ui64;
2006 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2008 if(op2->kind == 3 && op2->type->isSigned)
2009 *value2 = (long long)op2->__anon1.i;
2010 else if(op2->kind == 3)
2011 *value2 = (long long)op2->__anon1.ui;
2012 else if(op2->kind == 4 && op2->type->isSigned)
2013 *value2 = op2->__anon1.i64;
2014 else if(op2->kind == 4)
2015 *value2 = (long long)op2->__anon1.ui64;
2016 else if(op2->kind == 23 && op2->type->isSigned)
2017 *value2 = op2->__anon1.i64;
2018 else if(op2->kind == 23)
2019 *value2 = (long long)op2->__anon1.ui64;
2020 else if(op2->kind == 22 && op2->type->isSigned)
2021 *value2 = op2->__anon1.i64;
2022 else if(op2->kind == 22)
2023 *value2 = (long long)op2->__anon1.ui64;
2024 else if(op2->kind == 2 && op2->type->isSigned)
2025 *value2 = (long long)op2->__anon1.s;
2026 else if(op2->kind == 2)
2027 *value2 = (long long)op2->__anon1.us;
2028 else if(op2->kind == 1 && op2->type->isSigned)
2029 *value2 = (long long)op2->__anon1.c;
2030 else if(op2->kind == 24 || op2->kind == 1)
2031 *value2 = (long long)op2->__anon1.uc;
2032 else if(op2->kind == 6)
2033 *value2 = (long long)op2->__anon1.f;
2034 else if(op2->kind == 7)
2035 *value2 = (long long)op2->__anon1.d;
2036 else if(op2->kind == 13)
2037 *value2 = (long long)op2->__anon1.ui64;
2043 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2045 if(op2->kind == 3 && op2->type->isSigned)
2046 *value2 = (uint64)op2->__anon1.i;
2047 else if(op2->kind == 3)
2048 *value2 = (uint64)op2->__anon1.ui;
2049 else if(op2->kind == 4 && op2->type->isSigned)
2050 *value2 = (uint64)op2->__anon1.i64;
2051 else if(op2->kind == 4)
2052 *value2 = op2->__anon1.ui64;
2053 else if(op2->kind == 23 && op2->type->isSigned)
2054 *value2 = (uint64)op2->__anon1.i64;
2055 else if(op2->kind == 23)
2056 *value2 = op2->__anon1.ui64;
2057 else if(op2->kind == 22 && op2->type->isSigned)
2058 *value2 = (uint64)op2->__anon1.i64;
2059 else if(op2->kind == 22)
2060 *value2 = op2->__anon1.ui64;
2061 else if(op2->kind == 2 && op2->type->isSigned)
2062 *value2 = (uint64)op2->__anon1.s;
2063 else if(op2->kind == 2)
2064 *value2 = (uint64)op2->__anon1.us;
2065 else if(op2->kind == 1 && op2->type->isSigned)
2066 *value2 = (uint64)op2->__anon1.c;
2067 else if(op2->kind == 24 || op2->kind == 1)
2068 *value2 = (uint64)op2->__anon1.uc;
2069 else if(op2->kind == 6)
2070 *value2 = (uint64)op2->__anon1.f;
2071 else if(op2->kind == 7)
2072 *value2 = (uint64)op2->__anon1.d;
2073 else if(op2->kind == 13)
2074 *value2 = op2->__anon1.ui64;
2080 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2082 if(op2->kind == 3 && op2->type->isSigned)
2083 *value2 = (intptr_t)op2->__anon1.i;
2084 else if(op2->kind == 3)
2085 *value2 = (intptr_t)op2->__anon1.ui;
2086 else if(op2->kind == 4 && op2->type->isSigned)
2087 *value2 = (intptr_t)op2->__anon1.i64;
2088 else if(op2->kind == 4)
2089 *value2 = (intptr_t)op2->__anon1.ui64;
2090 else if(op2->kind == 23 && op2->type->isSigned)
2091 *value2 = (intptr_t)op2->__anon1.i64;
2092 else if(op2->kind == 23)
2093 *value2 = (intptr_t)op2->__anon1.ui64;
2094 else if(op2->kind == 22 && op2->type->isSigned)
2095 *value2 = (intptr_t)op2->__anon1.i64;
2096 else if(op2->kind == 22)
2097 *value2 = (intptr_t)op2->__anon1.ui64;
2098 else if(op2->kind == 2 && op2->type->isSigned)
2099 *value2 = (intptr_t)op2->__anon1.s;
2100 else if(op2->kind == 2)
2101 *value2 = (intptr_t)op2->__anon1.us;
2102 else if(op2->kind == 1 && op2->type->isSigned)
2103 *value2 = (intptr_t)op2->__anon1.c;
2104 else if(op2->kind == 24 || op2->kind == 1)
2105 *value2 = (intptr_t)op2->__anon1.uc;
2106 else if(op2->kind == 6)
2107 *value2 = (intptr_t)op2->__anon1.f;
2108 else if(op2->kind == 7)
2109 *value2 = (intptr_t)op2->__anon1.d;
2110 else if(op2->kind == 13)
2111 *value2 = (intptr_t)op2->__anon1.ui64;
2117 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2119 if(op2->kind == 3 && op2->type->isSigned)
2120 *value2 = (uintptr_t)op2->__anon1.i;
2121 else if(op2->kind == 3)
2122 *value2 = (uintptr_t)op2->__anon1.ui;
2123 else if(op2->kind == 4 && op2->type->isSigned)
2124 *value2 = (uintptr_t)op2->__anon1.i64;
2125 else if(op2->kind == 4)
2126 *value2 = (uintptr_t)op2->__anon1.ui64;
2127 else if(op2->kind == 23 && op2->type->isSigned)
2128 *value2 = (uintptr_t)op2->__anon1.i64;
2129 else if(op2->kind == 23)
2130 *value2 = (uintptr_t)op2->__anon1.ui64;
2131 else if(op2->kind == 22 && op2->type->isSigned)
2132 *value2 = (uintptr_t)op2->__anon1.i64;
2133 else if(op2->kind == 22)
2134 *value2 = (uintptr_t)op2->__anon1.ui64;
2135 else if(op2->kind == 2 && op2->type->isSigned)
2136 *value2 = (uintptr_t)op2->__anon1.s;
2137 else if(op2->kind == 2)
2138 *value2 = (uintptr_t)op2->__anon1.us;
2139 else if(op2->kind == 1 && op2->type->isSigned)
2140 *value2 = (uintptr_t)op2->__anon1.c;
2141 else if(op2->kind == 24 || op2->kind == 1)
2142 *value2 = (uintptr_t)op2->__anon1.uc;
2143 else if(op2->kind == 6)
2144 *value2 = (uintptr_t)op2->__anon1.f;
2145 else if(op2->kind == 7)
2146 *value2 = (uintptr_t)op2->__anon1.d;
2147 else if(op2->kind == 13)
2148 *value2 = (uintptr_t)op2->__anon1.ui64;
2154 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2156 if(op2->kind == 3 && op2->type->isSigned)
2157 *value2 = (ssize_t)op2->__anon1.i;
2158 else if(op2->kind == 3)
2159 *value2 = (ssize_t)op2->__anon1.ui;
2160 else if(op2->kind == 4 && op2->type->isSigned)
2161 *value2 = (ssize_t)op2->__anon1.i64;
2162 else if(op2->kind == 4)
2163 *value2 = (ssize_t)op2->__anon1.ui64;
2164 else if(op2->kind == 23 && op2->type->isSigned)
2165 *value2 = (ssize_t)op2->__anon1.i64;
2166 else if(op2->kind == 23)
2167 *value2 = (ssize_t)op2->__anon1.ui64;
2168 else if(op2->kind == 22 && op2->type->isSigned)
2169 *value2 = (ssize_t)op2->__anon1.i64;
2170 else if(op2->kind == 22)
2171 *value2 = (ssize_t)op2->__anon1.ui64;
2172 else if(op2->kind == 2 && op2->type->isSigned)
2173 *value2 = (ssize_t)op2->__anon1.s;
2174 else if(op2->kind == 2)
2175 *value2 = (ssize_t)op2->__anon1.us;
2176 else if(op2->kind == 1 && op2->type->isSigned)
2177 *value2 = (ssize_t)op2->__anon1.c;
2178 else if(op2->kind == 24 || op2->kind == 1)
2179 *value2 = (ssize_t)op2->__anon1.uc;
2180 else if(op2->kind == 6)
2181 *value2 = (ssize_t)op2->__anon1.f;
2182 else if(op2->kind == 7)
2183 *value2 = (ssize_t)op2->__anon1.d;
2184 else if(op2->kind == 13)
2185 *value2 = (ssize_t)op2->__anon1.ui64;
2191 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2193 if(op2->kind == 3 && op2->type->isSigned)
2194 *value2 = (size_t)op2->__anon1.i;
2195 else if(op2->kind == 3)
2196 *value2 = (size_t)op2->__anon1.ui;
2197 else if(op2->kind == 4 && op2->type->isSigned)
2198 *value2 = (size_t)op2->__anon1.i64;
2199 else if(op2->kind == 4)
2200 *value2 = (size_t)op2->__anon1.ui64;
2201 else if(op2->kind == 23 && op2->type->isSigned)
2202 *value2 = (size_t)op2->__anon1.i64;
2203 else if(op2->kind == 23)
2204 *value2 = (size_t)op2->__anon1.ui64;
2205 else if(op2->kind == 22 && op2->type->isSigned)
2206 *value2 = (size_t)op2->__anon1.i64;
2207 else if(op2->kind == 22)
2208 *value2 = (size_t)op2->__anon1.ui64;
2209 else if(op2->kind == 2 && op2->type->isSigned)
2210 *value2 = (size_t)op2->__anon1.s;
2211 else if(op2->kind == 2)
2212 *value2 = (size_t)op2->__anon1.us;
2213 else if(op2->kind == 1 && op2->type->isSigned)
2214 *value2 = (size_t)op2->__anon1.c;
2215 else if(op2->kind == 24 || op2->kind == 1)
2216 *value2 = (size_t)op2->__anon1.uc;
2217 else if(op2->kind == 6)
2218 *value2 = (size_t)op2->__anon1.f;
2219 else if(op2->kind == 7)
2220 *value2 = (size_t)op2->__anon1.d;
2221 else if(op2->kind == 13)
2222 *value2 = (size_t)op2->__anon1.ui64;
2228 unsigned int GetOpShort(struct Operand * op2, short * value2)
2230 if(op2->kind == 3 && op2->type->isSigned)
2231 *value2 = (short)op2->__anon1.i;
2232 else if(op2->kind == 3)
2233 *value2 = (short)op2->__anon1.ui;
2234 else if(op2->kind == 4 && op2->type->isSigned)
2235 *value2 = (short)op2->__anon1.i64;
2236 else if(op2->kind == 4)
2237 *value2 = (short)op2->__anon1.ui64;
2238 else if(op2->kind == 23 && op2->type->isSigned)
2239 *value2 = (short)op2->__anon1.i64;
2240 else if(op2->kind == 23)
2241 *value2 = (short)op2->__anon1.ui64;
2242 else if(op2->kind == 22 && op2->type->isSigned)
2243 *value2 = (short)op2->__anon1.i64;
2244 else if(op2->kind == 22)
2245 *value2 = (short)op2->__anon1.ui64;
2246 else if(op2->kind == 2 && op2->type->isSigned)
2247 *value2 = op2->__anon1.s;
2248 else if(op2->kind == 2)
2249 *value2 = (short)op2->__anon1.us;
2250 else if(op2->kind == 1 && op2->type->isSigned)
2251 *value2 = (short)op2->__anon1.c;
2252 else if(op2->kind == 24 || op2->kind == 1)
2253 *value2 = (short)op2->__anon1.uc;
2254 else if(op2->kind == 6)
2255 *value2 = (short)op2->__anon1.f;
2256 else if(op2->kind == 7)
2257 *value2 = (short)op2->__anon1.d;
2258 else if(op2->kind == 13)
2259 *value2 = (short)op2->__anon1.ui64;
2265 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2267 if(op2->kind == 3 && op2->type->isSigned)
2268 *value2 = (unsigned short)op2->__anon1.i;
2269 else if(op2->kind == 3)
2270 *value2 = (unsigned short)op2->__anon1.ui;
2271 else if(op2->kind == 4 && op2->type->isSigned)
2272 *value2 = (unsigned short)op2->__anon1.i64;
2273 else if(op2->kind == 4)
2274 *value2 = (unsigned short)op2->__anon1.ui64;
2275 else if(op2->kind == 23 && op2->type->isSigned)
2276 *value2 = (unsigned short)op2->__anon1.i64;
2277 else if(op2->kind == 23)
2278 *value2 = (unsigned short)op2->__anon1.ui64;
2279 else if(op2->kind == 22 && op2->type->isSigned)
2280 *value2 = (unsigned short)op2->__anon1.i64;
2281 else if(op2->kind == 22)
2282 *value2 = (unsigned short)op2->__anon1.ui64;
2283 else if(op2->kind == 2 && op2->type->isSigned)
2284 *value2 = (unsigned short)op2->__anon1.s;
2285 else if(op2->kind == 2)
2286 *value2 = op2->__anon1.us;
2287 else if(op2->kind == 1 && op2->type->isSigned)
2288 *value2 = (unsigned short)op2->__anon1.c;
2289 else if(op2->kind == 24 || op2->kind == 1)
2290 *value2 = (unsigned short)op2->__anon1.uc;
2291 else if(op2->kind == 6)
2292 *value2 = (unsigned short)op2->__anon1.f;
2293 else if(op2->kind == 7)
2294 *value2 = (unsigned short)op2->__anon1.d;
2295 else if(op2->kind == 13)
2296 *value2 = (unsigned short)op2->__anon1.ui64;
2302 unsigned int GetOpChar(struct Operand * op2, char * value2)
2304 if(op2->kind == 3 && op2->type->isSigned)
2305 *value2 = (char)op2->__anon1.i;
2306 else if(op2->kind == 3)
2307 *value2 = (char)op2->__anon1.ui;
2308 else if(op2->kind == 4 && op2->type->isSigned)
2309 *value2 = (char)op2->__anon1.i64;
2310 else if(op2->kind == 4)
2311 *value2 = (char)op2->__anon1.ui64;
2312 else if(op2->kind == 23 && op2->type->isSigned)
2313 *value2 = (char)op2->__anon1.i64;
2314 else if(op2->kind == 23)
2315 *value2 = (char)op2->__anon1.ui64;
2316 else if(op2->kind == 22 && op2->type->isSigned)
2317 *value2 = (char)op2->__anon1.i64;
2318 else if(op2->kind == 22)
2319 *value2 = (char)op2->__anon1.ui64;
2320 else if(op2->kind == 2 && op2->type->isSigned)
2321 *value2 = (char)op2->__anon1.s;
2322 else if(op2->kind == 2)
2323 *value2 = (char)op2->__anon1.us;
2324 else if(op2->kind == 1 && op2->type->isSigned)
2325 *value2 = op2->__anon1.c;
2326 else if(op2->kind == 24 || op2->kind == 1)
2327 *value2 = (char)op2->__anon1.uc;
2328 else if(op2->kind == 6)
2329 *value2 = (char)op2->__anon1.f;
2330 else if(op2->kind == 7)
2331 *value2 = (char)op2->__anon1.d;
2332 else if(op2->kind == 13)
2333 *value2 = (char)op2->__anon1.ui64;
2339 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2341 if(op2->kind == 3 && op2->type->isSigned)
2342 *value2 = (unsigned char)op2->__anon1.i;
2343 else if(op2->kind == 3)
2344 *value2 = (unsigned char)op2->__anon1.ui;
2345 else if(op2->kind == 4 && op2->type->isSigned)
2346 *value2 = (unsigned char)op2->__anon1.i64;
2347 else if(op2->kind == 4)
2348 *value2 = (unsigned char)op2->__anon1.ui64;
2349 else if(op2->kind == 23 && op2->type->isSigned)
2350 *value2 = (unsigned char)op2->__anon1.i64;
2351 else if(op2->kind == 23)
2352 *value2 = (unsigned char)op2->__anon1.ui64;
2353 else if(op2->kind == 22 && op2->type->isSigned)
2354 *value2 = (unsigned char)op2->__anon1.i64;
2355 else if(op2->kind == 22)
2356 *value2 = (unsigned char)op2->__anon1.ui64;
2357 else if(op2->kind == 2 && op2->type->isSigned)
2358 *value2 = (unsigned char)op2->__anon1.s;
2359 else if(op2->kind == 2)
2360 *value2 = (unsigned char)op2->__anon1.us;
2361 else if(op2->kind == 1 && op2->type->isSigned)
2362 *value2 = (unsigned char)op2->__anon1.c;
2363 else if(op2->kind == 24 || op2->kind == 1)
2364 *value2 = op2->__anon1.uc;
2365 else if(op2->kind == 6)
2366 *value2 = (unsigned char)op2->__anon1.f;
2367 else if(op2->kind == 7)
2368 *value2 = (unsigned char)op2->__anon1.d;
2369 else if(op2->kind == 13)
2370 *value2 = (unsigned char)op2->__anon1.ui64;
2376 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2378 if(op2->kind == 3 && op2->type->isSigned)
2379 *value2 = (float)(float)op2->__anon1.i;
2380 else if(op2->kind == 3)
2381 *value2 = (float)(float)op2->__anon1.ui;
2382 else if(op2->kind == 4 && op2->type->isSigned)
2383 *value2 = (float)(float)op2->__anon1.i64;
2384 else if(op2->kind == 4)
2385 *value2 = (float)(float)op2->__anon1.ui64;
2386 else if(op2->kind == 23 && op2->type->isSigned)
2387 *value2 = (float)(float)op2->__anon1.i64;
2388 else if(op2->kind == 23)
2389 *value2 = (float)(float)op2->__anon1.ui64;
2390 else if(op2->kind == 22 && op2->type->isSigned)
2391 *value2 = (float)(float)op2->__anon1.i64;
2392 else if(op2->kind == 22)
2393 *value2 = (float)(float)op2->__anon1.ui64;
2394 else if(op2->kind == 2 && op2->type->isSigned)
2395 *value2 = (float)(float)op2->__anon1.s;
2396 else if(op2->kind == 2)
2397 *value2 = (float)(float)op2->__anon1.us;
2398 else if(op2->kind == 1 && op2->type->isSigned)
2399 *value2 = (float)(float)op2->__anon1.c;
2400 else if(op2->kind == 24 || op2->kind == 1)
2401 *value2 = (float)(float)op2->__anon1.uc;
2402 else if(op2->kind == 6)
2403 *value2 = (float)op2->__anon1.f;
2404 else if(op2->kind == 7)
2405 *value2 = (float)op2->__anon1.d;
2406 else if(op2->kind == 13)
2407 *value2 = (float)(float)op2->__anon1.ui64;
2413 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2415 if(op2->kind == 3 && op2->type->isSigned)
2416 *value2 = (double)(double)op2->__anon1.i;
2417 else if(op2->kind == 3)
2418 *value2 = (double)(double)op2->__anon1.ui;
2419 else if(op2->kind == 4 && op2->type->isSigned)
2420 *value2 = (double)(double)op2->__anon1.i64;
2421 else if(op2->kind == 4)
2422 *value2 = (double)(double)op2->__anon1.ui64;
2423 else if(op2->kind == 23 && op2->type->isSigned)
2424 *value2 = (double)(double)op2->__anon1.i64;
2425 else if(op2->kind == 23)
2426 *value2 = (double)(double)op2->__anon1.ui64;
2427 else if(op2->kind == 22 && op2->type->isSigned)
2428 *value2 = (double)(double)op2->__anon1.i64;
2429 else if(op2->kind == 22)
2430 *value2 = (double)(double)op2->__anon1.ui64;
2431 else if(op2->kind == 2 && op2->type->isSigned)
2432 *value2 = (double)(double)op2->__anon1.s;
2433 else if(op2->kind == 2)
2434 *value2 = (double)(double)op2->__anon1.us;
2435 else if(op2->kind == 1 && op2->type->isSigned)
2436 *value2 = (double)(double)op2->__anon1.c;
2437 else if(op2->kind == 24 || op2->kind == 1)
2438 *value2 = (double)(double)op2->__anon1.uc;
2439 else if(op2->kind == 6)
2440 *value2 = (double)op2->__anon1.f;
2441 else if(op2->kind == 7)
2442 *value2 = (double)op2->__anon1.d;
2443 else if(op2->kind == 13)
2444 *value2 = (double)(double)op2->__anon1.ui64;
2450 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2452 int value2 = op2->__anon1.i;
2455 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2458 exp->expType = op1->type;
2460 op1->type->refCount++;
2465 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2467 unsigned int value2 = op2->__anon1.ui;
2470 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2473 exp->expType = op1->type;
2475 op1->type->refCount++;
2480 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2482 long long value2 = op2->__anon1.i64;
2485 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2488 exp->expType = op1->type;
2490 op1->type->refCount++;
2495 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2497 uint64 value2 = op2->__anon1.ui64;
2500 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2503 exp->expType = op1->type;
2505 op1->type->refCount++;
2510 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2512 short value2 = op2->__anon1.s;
2515 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
2518 exp->expType = op1->type;
2520 op1->type->refCount++;
2525 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2527 unsigned short value2 = op2->__anon1.us;
2530 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
2533 exp->expType = op1->type;
2535 op1->type->refCount++;
2540 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2542 char value2 = op2->__anon1.c;
2545 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
2548 exp->expType = op1->type;
2550 op1->type->refCount++;
2555 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2557 unsigned char value2 = op2->__anon1.uc;
2560 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
2563 exp->expType = op1->type;
2565 op1->type->refCount++;
2570 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2572 float value2 = op2->__anon1.f;
2575 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2578 exp->expType = op1->type;
2580 op1->type->refCount++;
2585 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2587 double value2 = op2->__anon1.d;
2590 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2593 exp->expType = op1->type;
2595 op1->type->refCount++;
2600 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2602 int value2 = op2->__anon1.i;
2605 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2608 exp->expType = op1->type;
2610 op1->type->refCount++;
2615 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2617 unsigned int value2 = op2->__anon1.ui;
2620 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2623 exp->expType = op1->type;
2625 op1->type->refCount++;
2630 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2632 long long value2 = op2->__anon1.i64;
2635 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2638 exp->expType = op1->type;
2640 op1->type->refCount++;
2645 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2647 uint64 value2 = op2->__anon1.ui64;
2650 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2653 exp->expType = op1->type;
2655 op1->type->refCount++;
2660 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2662 short value2 = op2->__anon1.s;
2665 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
2668 exp->expType = op1->type;
2670 op1->type->refCount++;
2675 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2677 unsigned short value2 = op2->__anon1.us;
2680 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
2683 exp->expType = op1->type;
2685 op1->type->refCount++;
2690 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2692 char value2 = op2->__anon1.c;
2695 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
2698 exp->expType = op1->type;
2700 op1->type->refCount++;
2705 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2707 unsigned char value2 = op2->__anon1.uc;
2710 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
2713 exp->expType = op1->type;
2715 op1->type->refCount++;
2720 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2722 float value2 = op2->__anon1.f;
2725 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2728 exp->expType = op1->type;
2730 op1->type->refCount++;
2735 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2737 double value2 = op2->__anon1.d;
2740 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2743 exp->expType = op1->type;
2745 op1->type->refCount++;
2750 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2752 int value2 = op2->__anon1.i;
2755 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2758 exp->expType = op1->type;
2760 op1->type->refCount++;
2765 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2767 unsigned int value2 = op2->__anon1.ui;
2770 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2773 exp->expType = op1->type;
2775 op1->type->refCount++;
2780 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2782 long long value2 = op2->__anon1.i64;
2785 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2788 exp->expType = op1->type;
2790 op1->type->refCount++;
2795 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2797 uint64 value2 = op2->__anon1.ui64;
2800 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2803 exp->expType = op1->type;
2805 op1->type->refCount++;
2810 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2812 short value2 = op2->__anon1.s;
2815 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
2818 exp->expType = op1->type;
2820 op1->type->refCount++;
2825 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2827 unsigned short value2 = op2->__anon1.us;
2830 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
2833 exp->expType = op1->type;
2835 op1->type->refCount++;
2840 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2842 char value2 = op2->__anon1.c;
2845 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
2848 exp->expType = op1->type;
2850 op1->type->refCount++;
2855 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2857 unsigned char value2 = op2->__anon1.uc;
2860 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
2863 exp->expType = op1->type;
2865 op1->type->refCount++;
2870 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2872 float value2 = op2->__anon1.f;
2875 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2878 exp->expType = op1->type;
2880 op1->type->refCount++;
2885 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2887 double value2 = op2->__anon1.d;
2890 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2893 exp->expType = op1->type;
2895 op1->type->refCount++;
2900 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2902 int value2 = op2->__anon1.i;
2905 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
2908 exp->expType = op1->type;
2910 op1->type->refCount++;
2915 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2917 unsigned int value2 = op2->__anon1.ui;
2920 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
2923 exp->expType = op1->type;
2925 op1->type->refCount++;
2930 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2932 long long value2 = op2->__anon1.i64;
2935 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
2938 exp->expType = op1->type;
2940 op1->type->refCount++;
2945 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2947 uint64 value2 = op2->__anon1.ui64;
2950 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
2953 exp->expType = op1->type;
2955 op1->type->refCount++;
2960 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2962 short value2 = op2->__anon1.s;
2965 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
2968 exp->expType = op1->type;
2970 op1->type->refCount++;
2975 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2977 unsigned short value2 = op2->__anon1.us;
2980 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
2983 exp->expType = op1->type;
2985 op1->type->refCount++;
2990 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2992 char value2 = op2->__anon1.c;
2995 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
2998 exp->expType = op1->type;
3000 op1->type->refCount++;
3005 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3007 unsigned char value2 = op2->__anon1.uc;
3010 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
3013 exp->expType = op1->type;
3015 op1->type->refCount++;
3020 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3022 float value2 = op2->__anon1.f;
3025 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
3028 exp->expType = op1->type;
3030 op1->type->refCount++;
3035 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3037 double value2 = op2->__anon1.d;
3040 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
3043 exp->expType = op1->type;
3045 op1->type->refCount++;
3050 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3052 int value2 = op2->__anon1.i;
3055 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
3058 exp->expType = op1->type;
3060 op1->type->refCount++;
3065 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3067 unsigned int value2 = op2->__anon1.ui;
3070 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
3073 exp->expType = op1->type;
3075 op1->type->refCount++;
3080 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3082 long long value2 = op2->__anon1.i64;
3085 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
3088 exp->expType = op1->type;
3090 op1->type->refCount++;
3095 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3097 uint64 value2 = op2->__anon1.ui64;
3100 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
3103 exp->expType = op1->type;
3105 op1->type->refCount++;
3110 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3112 short value2 = op2->__anon1.s;
3115 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
3118 exp->expType = op1->type;
3120 op1->type->refCount++;
3125 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3127 unsigned short value2 = op2->__anon1.us;
3130 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
3133 exp->expType = op1->type;
3135 op1->type->refCount++;
3140 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3142 char value2 = op2->__anon1.c;
3145 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
3148 exp->expType = op1->type;
3150 op1->type->refCount++;
3155 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3157 unsigned char value2 = op2->__anon1.uc;
3160 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
3163 exp->expType = op1->type;
3165 op1->type->refCount++;
3170 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3173 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3176 exp->expType = op1->type;
3178 op1->type->refCount++;
3183 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3186 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3189 exp->expType = op1->type;
3191 op1->type->refCount++;
3196 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3199 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3202 exp->expType = op1->type;
3204 op1->type->refCount++;
3209 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3212 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3215 exp->expType = op1->type;
3217 op1->type->refCount++;
3222 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3225 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3228 exp->expType = op1->type;
3230 op1->type->refCount++;
3235 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3238 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3241 exp->expType = op1->type;
3243 op1->type->refCount++;
3248 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3251 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3254 exp->expType = op1->type;
3256 op1->type->refCount++;
3261 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3264 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3267 exp->expType = op1->type;
3269 op1->type->refCount++;
3274 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3277 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3280 exp->expType = op1->type;
3282 op1->type->refCount++;
3287 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3290 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3293 exp->expType = op1->type;
3295 op1->type->refCount++;
3300 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3303 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3306 exp->expType = op1->type;
3308 op1->type->refCount++;
3313 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3316 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3319 exp->expType = op1->type;
3321 op1->type->refCount++;
3326 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3329 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3332 exp->expType = op1->type;
3334 op1->type->refCount++;
3339 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3342 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3345 exp->expType = op1->type;
3347 op1->type->refCount++;
3352 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3355 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3358 exp->expType = op1->type;
3360 op1->type->refCount++;
3365 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3368 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3371 exp->expType = op1->type;
3373 op1->type->refCount++;
3378 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3381 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3384 exp->expType = op1->type;
3386 op1->type->refCount++;
3391 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3394 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3397 exp->expType = op1->type;
3399 op1->type->refCount++;
3404 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3407 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3410 exp->expType = op1->type;
3412 op1->type->refCount++;
3417 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3420 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3423 exp->expType = op1->type;
3425 op1->type->refCount++;
3430 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3433 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3436 exp->expType = op1->type;
3438 op1->type->refCount++;
3443 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3446 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3449 exp->expType = op1->type;
3451 op1->type->refCount++;
3456 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3459 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3462 exp->expType = op1->type;
3464 op1->type->refCount++;
3469 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3472 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3475 exp->expType = op1->type;
3477 op1->type->refCount++;
3482 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3485 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3488 exp->expType = op1->type;
3490 op1->type->refCount++;
3495 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3498 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3501 exp->expType = op1->type;
3503 op1->type->refCount++;
3508 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3511 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3514 exp->expType = op1->type;
3516 op1->type->refCount++;
3521 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3524 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3527 exp->expType = op1->type;
3529 op1->type->refCount++;
3534 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3537 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3540 exp->expType = op1->type;
3542 op1->type->refCount++;
3547 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3550 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3553 exp->expType = op1->type;
3555 op1->type->refCount++;
3560 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3562 int value2 = op2->__anon1.i;
3565 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3568 exp->expType = op1->type;
3570 op1->type->refCount++;
3575 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3577 unsigned int value2 = op2->__anon1.ui;
3580 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3583 exp->expType = op1->type;
3585 op1->type->refCount++;
3590 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3592 long long value2 = op2->__anon1.i64;
3595 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3598 exp->expType = op1->type;
3600 op1->type->refCount++;
3605 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3607 uint64 value2 = op2->__anon1.ui64;
3610 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3613 exp->expType = op1->type;
3615 op1->type->refCount++;
3620 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3622 short value2 = op2->__anon1.s;
3625 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3628 exp->expType = op1->type;
3630 op1->type->refCount++;
3635 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3637 unsigned short value2 = op2->__anon1.us;
3640 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3643 exp->expType = op1->type;
3645 op1->type->refCount++;
3650 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3652 char value2 = op2->__anon1.c;
3655 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3658 exp->expType = op1->type;
3660 op1->type->refCount++;
3665 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3667 unsigned char value2 = op2->__anon1.uc;
3670 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3673 exp->expType = op1->type;
3675 op1->type->refCount++;
3680 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3682 float value2 = op2->__anon1.f;
3685 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3688 exp->expType = op1->type;
3690 op1->type->refCount++;
3695 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3697 double value2 = op2->__anon1.d;
3700 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3703 exp->expType = op1->type;
3705 op1->type->refCount++;
3710 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3712 int value2 = op2->__anon1.i;
3715 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3718 exp->expType = op1->type;
3720 op1->type->refCount++;
3725 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3727 unsigned int value2 = op2->__anon1.ui;
3730 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3733 exp->expType = op1->type;
3735 op1->type->refCount++;
3740 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3742 long long value2 = op2->__anon1.i64;
3745 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3748 exp->expType = op1->type;
3750 op1->type->refCount++;
3755 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3757 uint64 value2 = op2->__anon1.ui64;
3760 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3763 exp->expType = op1->type;
3765 op1->type->refCount++;
3770 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3772 short value2 = op2->__anon1.s;
3775 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3778 exp->expType = op1->type;
3780 op1->type->refCount++;
3785 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3787 unsigned short value2 = op2->__anon1.us;
3790 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3793 exp->expType = op1->type;
3795 op1->type->refCount++;
3800 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3802 char value2 = op2->__anon1.c;
3805 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3808 exp->expType = op1->type;
3810 op1->type->refCount++;
3815 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3817 unsigned char value2 = op2->__anon1.uc;
3820 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3823 exp->expType = op1->type;
3825 op1->type->refCount++;
3830 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3832 float value2 = op2->__anon1.f;
3835 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3838 exp->expType = op1->type;
3840 op1->type->refCount++;
3845 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3847 double value2 = op2->__anon1.d;
3850 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3853 exp->expType = op1->type;
3855 op1->type->refCount++;
3860 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3862 int value2 = op2->__anon1.i;
3865 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3868 exp->expType = op1->type;
3870 op1->type->refCount++;
3875 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3877 unsigned int value2 = op2->__anon1.ui;
3880 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3883 exp->expType = op1->type;
3885 op1->type->refCount++;
3890 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3892 long long value2 = op2->__anon1.i64;
3895 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3898 exp->expType = op1->type;
3900 op1->type->refCount++;
3905 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3907 uint64 value2 = op2->__anon1.ui64;
3910 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3913 exp->expType = op1->type;
3915 op1->type->refCount++;
3920 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3922 short value2 = op2->__anon1.s;
3925 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3928 exp->expType = op1->type;
3930 op1->type->refCount++;
3935 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3937 unsigned short value2 = op2->__anon1.us;
3940 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3943 exp->expType = op1->type;
3945 op1->type->refCount++;
3950 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3952 char value2 = op2->__anon1.c;
3955 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3958 exp->expType = op1->type;
3960 op1->type->refCount++;
3965 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3967 unsigned char value2 = op2->__anon1.uc;
3970 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3973 exp->expType = op1->type;
3975 op1->type->refCount++;
3980 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3982 float value2 = op2->__anon1.f;
3985 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
3988 exp->expType = op1->type;
3990 op1->type->refCount++;
3995 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3997 double value2 = op2->__anon1.d;
4000 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4003 exp->expType = op1->type;
4005 op1->type->refCount++;
4010 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4012 int value2 = op2->__anon1.i;
4015 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4018 exp->expType = op1->type;
4020 op1->type->refCount++;
4025 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4027 unsigned int value2 = op2->__anon1.ui;
4030 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4033 exp->expType = op1->type;
4035 op1->type->refCount++;
4040 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4042 long long value2 = op2->__anon1.i64;
4045 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4048 exp->expType = op1->type;
4050 op1->type->refCount++;
4055 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4057 uint64 value2 = op2->__anon1.ui64;
4060 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4063 exp->expType = op1->type;
4065 op1->type->refCount++;
4070 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4072 short value2 = op2->__anon1.s;
4075 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4078 exp->expType = op1->type;
4080 op1->type->refCount++;
4085 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4087 unsigned short value2 = op2->__anon1.us;
4090 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4093 exp->expType = op1->type;
4095 op1->type->refCount++;
4100 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4102 char value2 = op2->__anon1.c;
4105 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4108 exp->expType = op1->type;
4110 op1->type->refCount++;
4115 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4117 unsigned char value2 = op2->__anon1.uc;
4120 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4123 exp->expType = op1->type;
4125 op1->type->refCount++;
4130 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4132 float value2 = op2->__anon1.f;
4135 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4138 exp->expType = op1->type;
4140 op1->type->refCount++;
4145 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4147 double value2 = op2->__anon1.d;
4150 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4153 exp->expType = op1->type;
4155 op1->type->refCount++;
4160 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4162 int value2 = op2->__anon1.i;
4165 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
4168 exp->expType = op1->type;
4170 op1->type->refCount++;
4175 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4177 unsigned int value2 = op2->__anon1.ui;
4180 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
4183 exp->expType = op1->type;
4185 op1->type->refCount++;
4190 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4192 long long value2 = op2->__anon1.i64;
4195 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
4198 exp->expType = op1->type;
4200 op1->type->refCount++;
4205 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4207 uint64 value2 = op2->__anon1.ui64;
4210 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
4213 exp->expType = op1->type;
4215 op1->type->refCount++;
4220 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4222 short value2 = op2->__anon1.s;
4225 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
4228 exp->expType = op1->type;
4230 op1->type->refCount++;
4235 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4237 unsigned short value2 = op2->__anon1.us;
4240 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
4243 exp->expType = op1->type;
4245 op1->type->refCount++;
4250 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4252 char value2 = op2->__anon1.c;
4255 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
4258 exp->expType = op1->type;
4260 op1->type->refCount++;
4265 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4267 unsigned char value2 = op2->__anon1.uc;
4270 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
4273 exp->expType = op1->type;
4275 op1->type->refCount++;
4280 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4282 float value2 = op2->__anon1.f;
4285 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
4288 exp->expType = op1->type;
4290 op1->type->refCount++;
4295 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4297 double value2 = op2->__anon1.d;
4300 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
4303 exp->expType = op1->type;
4305 op1->type->refCount++;
4310 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4312 int value2 = op2->__anon1.i;
4315 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
4318 exp->expType = op1->type;
4320 op1->type->refCount++;
4325 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4327 unsigned int value2 = op2->__anon1.ui;
4330 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
4333 exp->expType = op1->type;
4335 op1->type->refCount++;
4340 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4342 long long value2 = op2->__anon1.i64;
4345 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
4348 exp->expType = op1->type;
4350 op1->type->refCount++;
4355 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4357 uint64 value2 = op2->__anon1.ui64;
4360 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
4363 exp->expType = op1->type;
4365 op1->type->refCount++;
4370 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4372 short value2 = op2->__anon1.s;
4375 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
4378 exp->expType = op1->type;
4380 op1->type->refCount++;
4385 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4387 unsigned short value2 = op2->__anon1.us;
4390 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
4393 exp->expType = op1->type;
4395 op1->type->refCount++;
4400 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4402 char value2 = op2->__anon1.c;
4405 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
4408 exp->expType = op1->type;
4410 op1->type->refCount++;
4415 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4417 unsigned char value2 = op2->__anon1.uc;
4420 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
4423 exp->expType = op1->type;
4425 op1->type->refCount++;
4430 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4432 int value2 = op2->__anon1.i;
4435 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4438 exp->expType = op1->type;
4440 op1->type->refCount++;
4445 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4447 unsigned int value2 = op2->__anon1.ui;
4450 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4453 exp->expType = op1->type;
4455 op1->type->refCount++;
4460 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4462 long long value2 = op2->__anon1.i64;
4465 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4468 exp->expType = op1->type;
4470 op1->type->refCount++;
4475 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4477 uint64 value2 = op2->__anon1.ui64;
4480 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4483 exp->expType = op1->type;
4485 op1->type->refCount++;
4490 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4492 short value2 = op2->__anon1.s;
4495 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
4498 exp->expType = op1->type;
4500 op1->type->refCount++;
4505 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4507 unsigned short value2 = op2->__anon1.us;
4510 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
4513 exp->expType = op1->type;
4515 op1->type->refCount++;
4520 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4522 char value2 = op2->__anon1.c;
4525 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
4528 exp->expType = op1->type;
4530 op1->type->refCount++;
4535 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4537 unsigned char value2 = op2->__anon1.uc;
4540 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
4543 exp->expType = op1->type;
4545 op1->type->refCount++;
4550 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4552 int value2 = op2->__anon1.i;
4555 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4558 exp->expType = op1->type;
4560 op1->type->refCount++;
4565 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4567 unsigned int value2 = op2->__anon1.ui;
4570 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4573 exp->expType = op1->type;
4575 op1->type->refCount++;
4580 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4582 long long value2 = op2->__anon1.i64;
4585 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4588 exp->expType = op1->type;
4590 op1->type->refCount++;
4595 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4597 uint64 value2 = op2->__anon1.ui64;
4600 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4603 exp->expType = op1->type;
4605 op1->type->refCount++;
4610 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4612 short value2 = op2->__anon1.s;
4615 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
4618 exp->expType = op1->type;
4620 op1->type->refCount++;
4625 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4627 unsigned short value2 = op2->__anon1.us;
4630 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
4633 exp->expType = op1->type;
4635 op1->type->refCount++;
4640 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4642 char value2 = op2->__anon1.c;
4645 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
4648 exp->expType = op1->type;
4650 op1->type->refCount++;
4655 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4657 unsigned char value2 = op2->__anon1.uc;
4660 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
4663 exp->expType = op1->type;
4665 op1->type->refCount++;
4670 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4672 int value2 = op2->__anon1.i;
4675 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4678 exp->expType = op1->type;
4680 op1->type->refCount++;
4685 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4687 unsigned int value2 = op2->__anon1.ui;
4690 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4693 exp->expType = op1->type;
4695 op1->type->refCount++;
4700 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4702 long long value2 = op2->__anon1.i64;
4705 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4708 exp->expType = op1->type;
4710 op1->type->refCount++;
4715 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4717 uint64 value2 = op2->__anon1.ui64;
4720 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4723 exp->expType = op1->type;
4725 op1->type->refCount++;
4730 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4732 short value2 = op2->__anon1.s;
4735 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
4738 exp->expType = op1->type;
4740 op1->type->refCount++;
4745 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4747 unsigned short value2 = op2->__anon1.us;
4750 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
4753 exp->expType = op1->type;
4755 op1->type->refCount++;
4760 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4762 char value2 = op2->__anon1.c;
4765 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
4768 exp->expType = op1->type;
4770 op1->type->refCount++;
4775 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4777 unsigned char value2 = op2->__anon1.uc;
4780 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
4783 exp->expType = op1->type;
4785 op1->type->refCount++;
4790 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4792 int value2 = op2->__anon1.i;
4795 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4798 exp->expType = op1->type;
4800 op1->type->refCount++;
4805 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4807 unsigned int value2 = op2->__anon1.ui;
4810 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4813 exp->expType = op1->type;
4815 op1->type->refCount++;
4820 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4822 long long value2 = op2->__anon1.i64;
4825 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4828 exp->expType = op1->type;
4830 op1->type->refCount++;
4835 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4837 uint64 value2 = op2->__anon1.ui64;
4840 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4843 exp->expType = op1->type;
4845 op1->type->refCount++;
4850 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4852 short value2 = op2->__anon1.s;
4855 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
4858 exp->expType = op1->type;
4860 op1->type->refCount++;
4865 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4867 unsigned short value2 = op2->__anon1.us;
4870 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
4873 exp->expType = op1->type;
4875 op1->type->refCount++;
4880 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4882 char value2 = op2->__anon1.c;
4885 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
4888 exp->expType = op1->type;
4890 op1->type->refCount++;
4895 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4897 unsigned char value2 = op2->__anon1.uc;
4900 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
4903 exp->expType = op1->type;
4905 op1->type->refCount++;
4910 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4912 int value2 = op2->__anon1.i;
4915 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4918 exp->expType = op1->type;
4920 op1->type->refCount++;
4925 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4927 unsigned int value2 = op2->__anon1.ui;
4930 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4933 exp->expType = op1->type;
4935 op1->type->refCount++;
4940 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4942 long long value2 = op2->__anon1.i64;
4945 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4948 exp->expType = op1->type;
4950 op1->type->refCount++;
4955 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4957 uint64 value2 = op2->__anon1.ui64;
4960 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4963 exp->expType = op1->type;
4965 op1->type->refCount++;
4970 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4972 short value2 = op2->__anon1.s;
4975 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
4978 exp->expType = op1->type;
4980 op1->type->refCount++;
4985 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4987 unsigned short value2 = op2->__anon1.us;
4990 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
4993 exp->expType = op1->type;
4995 op1->type->refCount++;
5000 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5002 char value2 = op2->__anon1.c;
5005 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
5008 exp->expType = op1->type;
5010 op1->type->refCount++;
5015 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5017 unsigned char value2 = op2->__anon1.uc;
5020 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
5023 exp->expType = op1->type;
5025 op1->type->refCount++;
5030 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5033 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5036 exp->expType = op1->type;
5038 op1->type->refCount++;
5043 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5046 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5049 exp->expType = op1->type;
5051 op1->type->refCount++;
5056 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5059 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5062 exp->expType = op1->type;
5064 op1->type->refCount++;
5069 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5072 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5075 exp->expType = op1->type;
5077 op1->type->refCount++;
5082 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5085 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5088 exp->expType = op1->type;
5090 op1->type->refCount++;
5095 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5098 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5101 exp->expType = op1->type;
5103 op1->type->refCount++;
5108 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5111 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5114 exp->expType = op1->type;
5116 op1->type->refCount++;
5121 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5124 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5127 exp->expType = op1->type;
5129 op1->type->refCount++;
5134 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5136 int value2 = op2->__anon1.i;
5139 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5142 exp->expType = op1->type;
5144 op1->type->refCount++;
5149 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5151 unsigned int value2 = op2->__anon1.ui;
5154 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5157 exp->expType = op1->type;
5159 op1->type->refCount++;
5164 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5166 long long value2 = op2->__anon1.i64;
5169 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5172 exp->expType = op1->type;
5174 op1->type->refCount++;
5179 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5181 uint64 value2 = op2->__anon1.ui64;
5184 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5187 exp->expType = op1->type;
5189 op1->type->refCount++;
5194 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5196 short value2 = op2->__anon1.s;
5199 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5202 exp->expType = op1->type;
5204 op1->type->refCount++;
5209 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5211 unsigned short value2 = op2->__anon1.us;
5214 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5217 exp->expType = op1->type;
5219 op1->type->refCount++;
5224 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5226 char value2 = op2->__anon1.c;
5229 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5232 exp->expType = op1->type;
5234 op1->type->refCount++;
5239 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5241 unsigned char value2 = op2->__anon1.uc;
5244 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5247 exp->expType = op1->type;
5249 op1->type->refCount++;
5254 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5256 int value2 = op2->__anon1.i;
5259 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5262 exp->expType = op1->type;
5264 op1->type->refCount++;
5269 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5271 unsigned int value2 = op2->__anon1.ui;
5274 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5277 exp->expType = op1->type;
5279 op1->type->refCount++;
5284 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5286 long long value2 = op2->__anon1.i64;
5289 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5292 exp->expType = op1->type;
5294 op1->type->refCount++;
5299 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5301 uint64 value2 = op2->__anon1.ui64;
5304 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5307 exp->expType = op1->type;
5309 op1->type->refCount++;
5314 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5316 short value2 = op2->__anon1.s;
5319 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5322 exp->expType = op1->type;
5324 op1->type->refCount++;
5329 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5331 unsigned short value2 = op2->__anon1.us;
5334 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5337 exp->expType = op1->type;
5339 op1->type->refCount++;
5344 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5346 char value2 = op2->__anon1.c;
5349 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5352 exp->expType = op1->type;
5354 op1->type->refCount++;
5359 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5361 unsigned char value2 = op2->__anon1.uc;
5364 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5367 exp->expType = op1->type;
5369 op1->type->refCount++;
5374 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5376 int value2 = op2->__anon1.i;
5379 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5382 exp->expType = op1->type;
5384 op1->type->refCount++;
5389 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5391 unsigned int value2 = op2->__anon1.ui;
5394 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5397 exp->expType = op1->type;
5399 op1->type->refCount++;
5404 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5406 long long value2 = op2->__anon1.i64;
5409 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5412 exp->expType = op1->type;
5414 op1->type->refCount++;
5419 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5421 uint64 value2 = op2->__anon1.ui64;
5424 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5427 exp->expType = op1->type;
5429 op1->type->refCount++;
5434 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5436 short value2 = op2->__anon1.s;
5439 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5442 exp->expType = op1->type;
5444 op1->type->refCount++;
5449 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5451 unsigned short value2 = op2->__anon1.us;
5454 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5457 exp->expType = op1->type;
5459 op1->type->refCount++;
5464 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5466 char value2 = op2->__anon1.c;
5469 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5472 exp->expType = op1->type;
5474 op1->type->refCount++;
5479 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5481 unsigned char value2 = op2->__anon1.uc;
5484 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5487 exp->expType = op1->type;
5489 op1->type->refCount++;
5494 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5496 int value2 = op2->__anon1.i;
5499 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5502 exp->expType = op1->type;
5504 op1->type->refCount++;
5509 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5511 unsigned int value2 = op2->__anon1.ui;
5514 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5517 exp->expType = op1->type;
5519 op1->type->refCount++;
5524 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5526 long long value2 = op2->__anon1.i64;
5529 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5532 exp->expType = op1->type;
5534 op1->type->refCount++;
5539 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5541 uint64 value2 = op2->__anon1.ui64;
5544 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5547 exp->expType = op1->type;
5549 op1->type->refCount++;
5554 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5556 short value2 = op2->__anon1.s;
5559 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5562 exp->expType = op1->type;
5564 op1->type->refCount++;
5569 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5571 unsigned short value2 = op2->__anon1.us;
5574 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5577 exp->expType = op1->type;
5579 op1->type->refCount++;
5584 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5586 char value2 = op2->__anon1.c;
5589 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5592 exp->expType = op1->type;
5594 op1->type->refCount++;
5599 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5601 unsigned char value2 = op2->__anon1.uc;
5604 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5607 exp->expType = op1->type;
5609 op1->type->refCount++;
5614 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5616 int value2 = op2->__anon1.i;
5619 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5622 exp->expType = op1->type;
5624 op1->type->refCount++;
5629 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5631 unsigned int value2 = op2->__anon1.ui;
5634 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5637 exp->expType = op1->type;
5639 op1->type->refCount++;
5644 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5646 long long value2 = op2->__anon1.i64;
5649 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5652 exp->expType = op1->type;
5654 op1->type->refCount++;
5659 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5661 uint64 value2 = op2->__anon1.ui64;
5664 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5667 exp->expType = op1->type;
5669 op1->type->refCount++;
5674 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5676 short value2 = op2->__anon1.s;
5679 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5682 exp->expType = op1->type;
5684 op1->type->refCount++;
5689 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5691 unsigned short value2 = op2->__anon1.us;
5694 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5697 exp->expType = op1->type;
5699 op1->type->refCount++;
5704 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5706 char value2 = op2->__anon1.c;
5709 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5712 exp->expType = op1->type;
5714 op1->type->refCount++;
5719 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5721 unsigned char value2 = op2->__anon1.uc;
5724 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5727 exp->expType = op1->type;
5729 op1->type->refCount++;
5734 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5737 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5740 exp->expType = op1->type;
5742 op1->type->refCount++;
5747 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5750 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5753 exp->expType = op1->type;
5755 op1->type->refCount++;
5760 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5763 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5766 exp->expType = op1->type;
5768 op1->type->refCount++;
5773 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5776 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5779 exp->expType = op1->type;
5781 op1->type->refCount++;
5786 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5789 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5792 exp->expType = op1->type;
5794 op1->type->refCount++;
5799 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5802 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5805 exp->expType = op1->type;
5807 op1->type->refCount++;
5812 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5815 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5818 exp->expType = op1->type;
5820 op1->type->refCount++;
5825 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5828 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5831 exp->expType = op1->type;
5833 op1->type->refCount++;
5838 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5840 int value2 = op2->__anon1.i;
5843 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5846 exp->expType = op1->type;
5848 op1->type->refCount++;
5853 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5855 unsigned int value2 = op2->__anon1.ui;
5858 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5861 exp->expType = op1->type;
5863 op1->type->refCount++;
5868 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5870 long long value2 = op2->__anon1.i64;
5873 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5876 exp->expType = op1->type;
5878 op1->type->refCount++;
5883 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5885 uint64 value2 = op2->__anon1.ui64;
5888 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5891 exp->expType = op1->type;
5893 op1->type->refCount++;
5898 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5900 short value2 = op2->__anon1.s;
5903 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5906 exp->expType = op1->type;
5908 op1->type->refCount++;
5913 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5915 unsigned short value2 = op2->__anon1.us;
5918 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5921 exp->expType = op1->type;
5923 op1->type->refCount++;
5928 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5930 char value2 = op2->__anon1.c;
5933 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5936 exp->expType = op1->type;
5938 op1->type->refCount++;
5943 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5945 unsigned char value2 = op2->__anon1.uc;
5948 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5951 exp->expType = op1->type;
5953 op1->type->refCount++;
5958 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5960 float value2 = op2->__anon1.f;
5963 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5966 exp->expType = op1->type;
5968 op1->type->refCount++;
5973 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5975 double value2 = op2->__anon1.d;
5978 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5981 exp->expType = op1->type;
5983 op1->type->refCount++;
5988 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5990 int value2 = op2->__anon1.i;
5993 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
5996 exp->expType = op1->type;
5998 op1->type->refCount++;
6003 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6005 unsigned int value2 = op2->__anon1.ui;
6008 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6011 exp->expType = op1->type;
6013 op1->type->refCount++;
6018 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6020 long long value2 = op2->__anon1.i64;
6023 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6026 exp->expType = op1->type;
6028 op1->type->refCount++;
6033 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6035 uint64 value2 = op2->__anon1.ui64;
6038 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6041 exp->expType = op1->type;
6043 op1->type->refCount++;
6048 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6050 short value2 = op2->__anon1.s;
6053 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6056 exp->expType = op1->type;
6058 op1->type->refCount++;
6063 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6065 unsigned short value2 = op2->__anon1.us;
6068 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6071 exp->expType = op1->type;
6073 op1->type->refCount++;
6078 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6080 char value2 = op2->__anon1.c;
6083 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6086 exp->expType = op1->type;
6088 op1->type->refCount++;
6093 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6095 unsigned char value2 = op2->__anon1.uc;
6098 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6101 exp->expType = op1->type;
6103 op1->type->refCount++;
6108 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6110 float value2 = op2->__anon1.f;
6113 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6116 exp->expType = op1->type;
6118 op1->type->refCount++;
6123 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6125 double value2 = op2->__anon1.d;
6128 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6131 exp->expType = op1->type;
6133 op1->type->refCount++;
6138 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6140 int value2 = op2->__anon1.i;
6143 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6146 exp->expType = op1->type;
6148 op1->type->refCount++;
6153 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6155 unsigned int value2 = op2->__anon1.ui;
6158 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6161 exp->expType = op1->type;
6163 op1->type->refCount++;
6168 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6170 long long value2 = op2->__anon1.i64;
6173 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6176 exp->expType = op1->type;
6178 op1->type->refCount++;
6183 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6185 uint64 value2 = op2->__anon1.ui64;
6188 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6191 exp->expType = op1->type;
6193 op1->type->refCount++;
6198 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6200 short value2 = op2->__anon1.s;
6203 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6206 exp->expType = op1->type;
6208 op1->type->refCount++;
6213 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6215 unsigned short value2 = op2->__anon1.us;
6218 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6221 exp->expType = op1->type;
6223 op1->type->refCount++;
6228 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6230 char value2 = op2->__anon1.c;
6233 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6236 exp->expType = op1->type;
6238 op1->type->refCount++;
6243 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6245 unsigned char value2 = op2->__anon1.uc;
6248 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6251 exp->expType = op1->type;
6253 op1->type->refCount++;
6258 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6260 float value2 = op2->__anon1.f;
6263 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6266 exp->expType = op1->type;
6268 op1->type->refCount++;
6273 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6275 double value2 = op2->__anon1.d;
6278 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6281 exp->expType = op1->type;
6283 op1->type->refCount++;
6288 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6290 int value2 = op2->__anon1.i;
6293 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6296 exp->expType = op1->type;
6298 op1->type->refCount++;
6303 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6305 unsigned int value2 = op2->__anon1.ui;
6308 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6311 exp->expType = op1->type;
6313 op1->type->refCount++;
6318 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6320 long long value2 = op2->__anon1.i64;
6323 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6326 exp->expType = op1->type;
6328 op1->type->refCount++;
6333 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6335 uint64 value2 = op2->__anon1.ui64;
6338 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6341 exp->expType = op1->type;
6343 op1->type->refCount++;
6348 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6350 short value2 = op2->__anon1.s;
6353 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6356 exp->expType = op1->type;
6358 op1->type->refCount++;
6363 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6365 unsigned short value2 = op2->__anon1.us;
6368 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6371 exp->expType = op1->type;
6373 op1->type->refCount++;
6378 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6380 char value2 = op2->__anon1.c;
6383 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6386 exp->expType = op1->type;
6388 op1->type->refCount++;
6393 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6395 unsigned char value2 = op2->__anon1.uc;
6398 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6401 exp->expType = op1->type;
6403 op1->type->refCount++;
6408 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6410 float value2 = op2->__anon1.f;
6413 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6416 exp->expType = op1->type;
6418 op1->type->refCount++;
6423 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6425 double value2 = op2->__anon1.d;
6428 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6431 exp->expType = op1->type;
6433 op1->type->refCount++;
6438 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6440 int value2 = op2->__anon1.i;
6443 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6446 exp->expType = op1->type;
6448 op1->type->refCount++;
6453 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6455 unsigned int value2 = op2->__anon1.ui;
6458 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6461 exp->expType = op1->type;
6463 op1->type->refCount++;
6468 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6470 long long value2 = op2->__anon1.i64;
6473 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6476 exp->expType = op1->type;
6478 op1->type->refCount++;
6483 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6485 uint64 value2 = op2->__anon1.ui64;
6488 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6491 exp->expType = op1->type;
6493 op1->type->refCount++;
6498 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6500 short value2 = op2->__anon1.s;
6503 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6506 exp->expType = op1->type;
6508 op1->type->refCount++;
6513 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6515 unsigned short value2 = op2->__anon1.us;
6518 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6521 exp->expType = op1->type;
6523 op1->type->refCount++;
6528 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6530 char value2 = op2->__anon1.c;
6533 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6536 exp->expType = op1->type;
6538 op1->type->refCount++;
6543 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6545 unsigned char value2 = op2->__anon1.uc;
6548 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6551 exp->expType = op1->type;
6553 op1->type->refCount++;
6558 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6560 float value2 = op2->__anon1.f;
6563 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6566 exp->expType = op1->type;
6568 op1->type->refCount++;
6573 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6575 double value2 = op2->__anon1.d;
6578 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6581 exp->expType = op1->type;
6583 op1->type->refCount++;
6588 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6590 int value2 = op2->__anon1.i;
6593 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6596 exp->expType = op1->type;
6598 op1->type->refCount++;
6603 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6605 unsigned int value2 = op2->__anon1.ui;
6608 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6611 exp->expType = op1->type;
6613 op1->type->refCount++;
6618 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6620 long long value2 = op2->__anon1.i64;
6623 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6626 exp->expType = op1->type;
6628 op1->type->refCount++;
6633 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6635 uint64 value2 = op2->__anon1.ui64;
6638 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6641 exp->expType = op1->type;
6643 op1->type->refCount++;
6648 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6650 short value2 = op2->__anon1.s;
6653 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6656 exp->expType = op1->type;
6658 op1->type->refCount++;
6663 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6665 unsigned short value2 = op2->__anon1.us;
6668 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6671 exp->expType = op1->type;
6673 op1->type->refCount++;
6678 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6680 char value2 = op2->__anon1.c;
6683 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6686 exp->expType = op1->type;
6688 op1->type->refCount++;
6693 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6695 unsigned char value2 = op2->__anon1.uc;
6698 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6701 exp->expType = op1->type;
6703 op1->type->refCount++;
6708 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6710 float value2 = op2->__anon1.f;
6713 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6716 exp->expType = op1->type;
6718 op1->type->refCount++;
6723 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6725 double value2 = op2->__anon1.d;
6728 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6731 exp->expType = op1->type;
6733 op1->type->refCount++;
6738 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6740 int value2 = op2->__anon1.i;
6743 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6746 exp->expType = op1->type;
6748 op1->type->refCount++;
6753 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6755 unsigned int value2 = op2->__anon1.ui;
6758 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6761 exp->expType = op1->type;
6763 op1->type->refCount++;
6768 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6770 long long value2 = op2->__anon1.i64;
6773 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6776 exp->expType = op1->type;
6778 op1->type->refCount++;
6783 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6785 uint64 value2 = op2->__anon1.ui64;
6788 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6791 exp->expType = op1->type;
6793 op1->type->refCount++;
6798 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6800 short value2 = op2->__anon1.s;
6803 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6806 exp->expType = op1->type;
6808 op1->type->refCount++;
6813 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6815 unsigned short value2 = op2->__anon1.us;
6818 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6821 exp->expType = op1->type;
6823 op1->type->refCount++;
6828 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6830 char value2 = op2->__anon1.c;
6833 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6836 exp->expType = op1->type;
6838 op1->type->refCount++;
6843 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6845 unsigned char value2 = op2->__anon1.uc;
6848 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6851 exp->expType = op1->type;
6853 op1->type->refCount++;
6858 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6860 float value2 = op2->__anon1.f;
6863 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6866 exp->expType = op1->type;
6868 op1->type->refCount++;
6873 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6875 double value2 = op2->__anon1.d;
6878 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6881 exp->expType = op1->type;
6883 op1->type->refCount++;
6888 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6890 int value2 = op2->__anon1.i;
6893 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6896 exp->expType = op1->type;
6898 op1->type->refCount++;
6903 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6905 unsigned int value2 = op2->__anon1.ui;
6908 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6911 exp->expType = op1->type;
6913 op1->type->refCount++;
6918 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6920 long long value2 = op2->__anon1.i64;
6923 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6926 exp->expType = op1->type;
6928 op1->type->refCount++;
6933 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6935 uint64 value2 = op2->__anon1.ui64;
6938 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6941 exp->expType = op1->type;
6943 op1->type->refCount++;
6948 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6950 short value2 = op2->__anon1.s;
6953 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6956 exp->expType = op1->type;
6958 op1->type->refCount++;
6963 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6965 unsigned short value2 = op2->__anon1.us;
6968 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6971 exp->expType = op1->type;
6973 op1->type->refCount++;
6978 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6980 char value2 = op2->__anon1.c;
6983 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
6986 exp->expType = op1->type;
6988 op1->type->refCount++;
6993 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6995 unsigned char value2 = op2->__anon1.uc;
6998 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7001 exp->expType = op1->type;
7003 op1->type->refCount++;
7008 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7010 float value2 = op2->__anon1.f;
7013 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7016 exp->expType = op1->type;
7018 op1->type->refCount++;
7023 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7025 double value2 = op2->__anon1.d;
7028 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7031 exp->expType = op1->type;
7033 op1->type->refCount++;
7038 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7041 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7044 exp->expType = op1->type;
7046 op1->type->refCount++;
7051 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7054 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7057 exp->expType = op1->type;
7059 op1->type->refCount++;
7064 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7067 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7070 exp->expType = op1->type;
7072 op1->type->refCount++;
7077 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7080 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7083 exp->expType = op1->type;
7085 op1->type->refCount++;
7090 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7093 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7096 exp->expType = op1->type;
7098 op1->type->refCount++;
7103 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7106 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7109 exp->expType = op1->type;
7111 op1->type->refCount++;
7116 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7119 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7122 exp->expType = op1->type;
7124 op1->type->refCount++;
7129 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7132 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7135 exp->expType = op1->type;
7137 op1->type->refCount++;
7142 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7144 if(type->name && type->name[0])
7147 strcat(string, type->name);
7150 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7156 strcat(string, name);
7161 static void PrintAttribs(struct Type * type, char * string)
7166 strcat(string, "dllexport ");
7167 if(type->attrStdcall)
7168 strcat(string, "stdcall ");
7172 static struct Type * FindMember(struct Type * type, char * string)
7174 struct Type * memberType;
7176 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7178 if(!memberType->name)
7180 struct Type * subType = FindMember(memberType, string);
7185 else if(!strcmp(memberType->name, string))
7188 return (((void *)0));
7191 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7193 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7195 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7197 unsigned int result = 0;
7202 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7203 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7207 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7208 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7211 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)
7212 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7215 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)
7216 result = GetOpFloat(op, &op->__anon1.f);
7219 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)
7220 result = GetOpDouble(op, &op->__anon1.d);
7223 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)
7224 result = GetOpUInt64(op, &op->__anon1.ui64);
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 ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7231 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7232 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7235 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7236 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7242 struct OpTable floatOps =
7244 (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)
7247 struct OpTable doubleOps =
7249 (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)
7252 struct OpTable intOps =
7254 (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)
7257 struct OpTable uintOps =
7259 (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)
7262 struct OpTable int64Ops =
7264 (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)
7267 struct OpTable uint64Ops =
7269 (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)
7272 struct OpTable shortOps =
7274 (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)
7277 struct OpTable ushortOps =
7279 (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)
7282 struct OpTable charOps =
7284 (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)
7287 struct OpTable ucharOps =
7289 (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)
7292 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7294 struct Type * memberType;
7296 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7298 if(!memberType->name)
7300 struct Type * subType = FindMember(memberType, string);
7304 *offset += memberType->offset;
7308 else if(!strcmp(memberType->name, string))
7310 *offset += memberType->offset;
7314 return (((void *)0));
7317 struct __ecereNameSpace__ecere__com__Module;
7319 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);
7321 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7323 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);
7325 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);
7327 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7329 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7334 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7335 struct __ecereNameSpace__ecere__sys__BTNode * left;
7336 struct __ecereNameSpace__ecere__sys__BTNode * right;
7338 struct __ecereNameSpace__ecere__com__Instance * module;
7339 char * dataTypeString;
7340 struct Type * dataType;
7343 } __attribute__ ((gcc_struct));
7345 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);
7347 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7349 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);
7351 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7353 struct __ecereNameSpace__ecere__com__DefinedExpression;
7355 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7357 struct __ecereNameSpace__ecere__com__DefinedExpression
7359 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7360 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7363 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7364 } __attribute__ ((gcc_struct));
7366 struct __ecereNameSpace__ecere__sys__BinaryTree;
7368 struct __ecereNameSpace__ecere__sys__BinaryTree
7370 struct __ecereNameSpace__ecere__sys__BTNode * root;
7372 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7373 void (* FreeKey)(void * key);
7374 } __attribute__ ((gcc_struct));
7376 struct __ecereNameSpace__ecere__com__Class
7378 struct __ecereNameSpace__ecere__com__Class * prev;
7379 struct __ecereNameSpace__ecere__com__Class * next;
7385 unsigned int (* Constructor)(void * );
7386 void (* Destructor)(void * );
7389 struct __ecereNameSpace__ecere__com__Class * base;
7390 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7391 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7392 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7393 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7394 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7395 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7399 struct __ecereNameSpace__ecere__com__Instance * module;
7400 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7401 const char * dataTypeString;
7402 struct Type * dataType;
7404 int defaultAlignment;
7405 void (* Initialize)();
7407 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7408 const char * designerClass;
7409 unsigned int noExpansion;
7410 const char * defaultProperty;
7411 unsigned int comRedefinition;
7414 unsigned int internalDecl;
7416 unsigned int computeSize;
7417 short structAlignment;
7418 short pointerAlignment;
7419 int destructionWatchOffset;
7421 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7422 int inheritanceAccess;
7423 const char * fullName;
7425 struct __ecereNameSpace__ecere__sys__OldList conversions;
7426 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7427 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7428 struct __ecereNameSpace__ecere__com__Class * templateClass;
7429 struct __ecereNameSpace__ecere__sys__OldList templatized;
7431 unsigned int isInstanceClass;
7432 unsigned int byValueSystemClass;
7433 } __attribute__ ((gcc_struct));
7435 struct __ecereNameSpace__ecere__com__NameSpace
7438 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7439 struct __ecereNameSpace__ecere__com__NameSpace * left;
7440 struct __ecereNameSpace__ecere__com__NameSpace * right;
7442 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7443 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7444 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7445 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7446 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7447 } __attribute__ ((gcc_struct));
7449 struct __ecereNameSpace__ecere__com__DataMember
7451 struct __ecereNameSpace__ecere__com__DataMember * prev;
7452 struct __ecereNameSpace__ecere__com__DataMember * next;
7454 unsigned int isProperty;
7457 struct __ecereNameSpace__ecere__com__Class * _class;
7458 const char * dataTypeString;
7459 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7460 struct Type * dataType;
7464 struct __ecereNameSpace__ecere__sys__OldList members;
7465 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7467 short structAlignment;
7468 short pointerAlignment;
7469 } __attribute__ ((gcc_struct));
7471 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7473 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7475 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7477 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7479 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7481 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7483 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7487 if(type->kind == 11)
7489 struct Type * param;
7491 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7492 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7493 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7495 else if(type->kind == 13)
7496 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7497 else if(type->kind == 8)
7499 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7501 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7503 else if(type->kind == 9 || type->kind == 10)
7505 struct Type * member;
7507 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7508 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7510 else if(type->kind == 12)
7511 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7515 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7517 unsigned int status = 1;
7519 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))
7521 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7522 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7524 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7526 struct Type * sourceType = source, * destType = dest;
7528 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7529 sourceType = sourceType->__anon1.type;
7530 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7531 destType = destType->__anon1.type;
7532 if(!destType->constant && sourceType->constant)
7536 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7543 struct Operand GetOperand(struct Expression * exp)
7552 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7555 struct Type * type = exp->expType;
7559 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))
7561 if(!type->__anon1._class->__anon1.registered->dataType)
7562 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7563 type = type->__anon1._class->__anon1.registered->dataType;
7565 if(exp->type == 3 && op.kind == 13)
7567 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7571 else if(exp->isConstant && exp->type == 2)
7573 op.kind = type->kind;
7580 if(exp->__anon1.__anon1.constant[0] == '\'')
7582 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7585 else if(type->isSigned)
7587 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7592 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7600 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7605 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7613 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7618 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7626 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7631 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7639 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7644 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7652 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7657 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7663 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7664 op.__anon1.f = __ecereMethod_float_inf();
7665 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7666 op.__anon1.f = -__ecereMethod_float_inf();
7667 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7668 op.__anon1.f = __ecereMethod_float_nan();
7669 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7670 op.__anon1.f = -__ecereMethod_float_nan();
7672 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7676 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7677 op.__anon1.d = __ecereMethod_double_inf();
7678 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7679 op.__anon1.d = -__ecereMethod_double_inf();
7680 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7681 op.__anon1.d = __ecereMethod_double_nan();
7682 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7683 op.__anon1.d = -__ecereMethod_double_nan();
7685 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7691 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7701 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7705 switch(_class->typeSize)
7708 if(!strcmp(_class->dataTypeString, "uint64"))
7709 v = (long long)*(uint64 *)ptr;
7711 v = *(long long *)ptr;
7714 if(!strcmp(_class->dataTypeString, "uint"))
7715 v = (long long)*(unsigned int *)ptr;
7717 v = (long long)*(int *)ptr;
7720 if(!strcmp(_class->dataTypeString, "uint16"))
7721 v = (long long)*(unsigned short *)ptr;
7723 v = (long long)*(short *)ptr;
7726 if(!strcmp(_class->dataTypeString, "byte"))
7727 v = (long long)*(unsigned char *)ptr;
7729 v = (long long)*(char *)ptr;
7735 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7737 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7738 ListAdd(specs, MkSpecifier(UNSIGNED));
7743 if(type->__anon1._class->__anon1.registered)
7745 if(!type->__anon1._class->__anon1.registered->dataType)
7746 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7747 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7752 ListAdd(specs, MkSpecifier(DOUBLE));
7755 ListAdd(specs, MkSpecifier(FLOAT));
7758 ListAdd(specs, MkSpecifier(CHAR));
7761 ListAdd(specs, MkSpecifier(_BOOL));
7764 ListAdd(specs, MkSpecifier(SHORT));
7767 ListAdd(specs, MkSpecifier(INT64));
7770 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7773 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7777 ListAdd(specs, MkSpecifier(INT));
7782 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7786 if(printConst && type->constant)
7787 strcat(string, "const ");
7792 struct Symbol * c = type->__anon1._class;
7793 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7795 if(type->classObjectType == 2 && isObjectBaseClass)
7796 strcat(string, "typed_object");
7797 else if(type->classObjectType == 3 && isObjectBaseClass)
7798 strcat(string, "any_object");
7802 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7804 if(type->byReference)
7805 strcat(string, " &");
7809 strcat(string, "void");
7812 strcat(string, type->isSigned ? "int" : "uint");
7815 strcat(string, type->isSigned ? "int64" : "uint64");
7818 strcat(string, type->isSigned ? "intptr" : "uintptr");
7821 strcat(string, type->isSigned ? "intsize" : "uintsize");
7824 strcat(string, type->isSigned ? "char" : "byte");
7827 strcat(string, "_Bool");
7830 strcat(string, type->isSigned ? "short" : "uint16");
7833 strcat(string, "float");
7836 strcat(string, "double");
7839 if(type->__anon1.__anon1.enumName)
7841 strcat(string, "struct ");
7842 strcat(string, type->__anon1.__anon1.enumName);
7844 else if(type->typeName)
7845 strcat(string, type->typeName);
7848 struct Type * member;
7850 strcat(string, "struct { ");
7851 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7853 PrintType(member, string, 1, fullName);
7854 strcat(string, "; ");
7856 strcat(string, "}");
7860 if(type->__anon1.__anon1.enumName)
7862 strcat(string, "union ");
7863 strcat(string, type->__anon1.__anon1.enumName);
7865 else if(type->typeName)
7866 strcat(string, type->typeName);
7869 strcat(string, "union ");
7870 strcat(string, "(unnamed)");
7874 if(type->__anon1.__anon1.enumName)
7876 strcat(string, "enum ");
7877 strcat(string, type->__anon1.__anon1.enumName);
7879 else if(type->typeName)
7880 strcat(string, type->typeName);
7882 strcat(string, "int");
7885 strcat(string, "...");
7888 strcat(string, "subclass(");
7889 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7890 strcat(string, ")");
7893 strcat(string, type->__anon1.templateParameter->identifier->string);
7896 strcat(string, "thisclass");
7899 strcat(string, "__builtin_va_list");
7905 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7907 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7909 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7911 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7913 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7915 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7917 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7919 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7921 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7923 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7925 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7927 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7929 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7931 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7933 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7935 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7939 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7941 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7943 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7945 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7949 struct __ecereNameSpace__ecere__com__Application
7952 const char * * argv;
7954 unsigned int isGUIApp;
7955 struct __ecereNameSpace__ecere__sys__OldList allModules;
7956 char * parsedCommand;
7957 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7958 } __attribute__ ((gcc_struct));
7960 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)
7964 *curMember = (*curMember)->next;
7965 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7967 *curMember = subMemberStack[--(*subMemberStackPos)];
7968 *curMember = (*curMember)->next;
7970 while((*curMember) && (*curMember)->isProperty)
7971 *curMember = (*curMember)->next;
7972 if(subMemberStackPos)
7974 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
7976 subMemberStack[(*subMemberStackPos)++] = *curMember;
7977 *curMember = (*curMember)->members.first;
7978 while(*curMember && (*curMember)->isProperty)
7979 *curMember = (*curMember)->next;
7987 if(subMemberStackPos && *subMemberStackPos)
7989 *curMember = subMemberStack[--(*subMemberStackPos)];
7990 *curMember = (*curMember)->next;
7994 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
7996 if(*curClass == _class)
7998 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8000 *curMember = (*curClass)->membersAndProperties.first;
8002 while((*curMember) && (*curMember)->isProperty)
8003 *curMember = (*curMember)->next;
8004 if(subMemberStackPos)
8006 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8008 subMemberStack[(*subMemberStackPos)++] = *curMember;
8009 *curMember = (*curMember)->members.first;
8010 while(*curMember && (*curMember)->isProperty)
8011 *curMember = (*curMember)->next;
8018 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8020 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8021 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8022 struct __ecereNameSpace__ecere__com__NameSpace * child;
8026 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)))
8028 data = ScanGlobalData(child, name);
8036 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8038 int nsLen = strlen(nameSpace);
8039 struct Symbol * symbol;
8041 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)))
8043 char * s = symbol->string;
8045 if(!strncmp(s, nameSpace, nsLen))
8050 for(c = strlen(s) - 1; c >= 0; c--)
8053 namePart = s + c + 1;
8054 if(!strcmp(namePart, name))
8062 return (((void *)0));
8065 unsigned int GetInt(struct Expression * exp, int * value2)
8067 struct Operand op2 = GetOperand(exp);
8069 return GetOpInt(&op2, value2);
8072 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8074 struct Operand op2 = GetOperand(exp);
8076 return GetOpUInt(&op2, value2);
8079 unsigned int GetInt64(struct Expression * exp, long long * value2)
8081 struct Operand op2 = GetOperand(exp);
8083 return GetOpInt64(&op2, value2);
8086 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8088 struct Operand op2 = GetOperand(exp);
8090 return GetOpUInt64(&op2, value2);
8093 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8095 struct Operand op2 = GetOperand(exp);
8097 return GetOpIntPtr(&op2, value2);
8100 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8102 struct Operand op2 = GetOperand(exp);
8104 return GetOpUIntPtr(&op2, value2);
8107 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8109 struct Operand op2 = GetOperand(exp);
8111 return GetOpIntSize(&op2, value2);
8114 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8116 struct Operand op2 = GetOperand(exp);
8118 return GetOpUIntSize(&op2, value2);
8121 unsigned int GetShort(struct Expression * exp, short * value2)
8123 struct Operand op2 = GetOperand(exp);
8125 return GetOpShort(&op2, value2);
8128 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8130 struct Operand op2 = GetOperand(exp);
8132 return GetOpUShort(&op2, value2);
8135 unsigned int GetChar(struct Expression * exp, char * value2)
8137 struct Operand op2 = GetOperand(exp);
8139 return GetOpChar(&op2, value2);
8142 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8144 struct Operand op2 = GetOperand(exp);
8146 return GetOpUChar(&op2, value2);
8149 unsigned int GetFloat(struct Expression * exp, float * value2)
8151 struct Operand op2 = GetOperand(exp);
8153 return GetOpFloat(&op2, value2);
8156 unsigned int GetDouble(struct Expression * exp, double * value2)
8158 struct Operand op2 = GetOperand(exp);
8160 return GetOpDouble(&op2, value2);
8163 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8165 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8167 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8168 PrintAttribs(type, string);
8169 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8170 strcat(string, " const");
8171 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8172 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8173 strcat(string, " (");
8174 if(type->kind == 13)
8176 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8177 PrintAttribs(type->__anon1.type, string);
8179 if(type->kind == 13)
8181 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8182 strcat(string, "*");
8184 strcat(string, " *");
8186 if(printConst && type->constant && type->kind == 13)
8187 strcat(string, " const");
8190 PrintTypeSpecs(type, string, fullName, printConst);
8193 void PrintExpression(struct Expression * exp, char * string)
8196 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8198 unsigned int backOutputLineNumbers = outputLineNumbers;
8200 outputLineNumbers = 0;
8202 OutputExpression(exp, f);
8203 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8204 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8206 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8207 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8208 count = strlen(string);
8209 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8210 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8212 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8213 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8214 string[count] = '\0';
8215 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8216 outputLineNumbers = backOutputLineNumbers;
8220 struct Type * Dereference(struct Type * source)
8222 struct Type * type = (((void *)0));
8226 if(source->kind == 13 || source->kind == 12)
8228 type = source->__anon1.type;
8229 source->__anon1.type->refCount++;
8231 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8233 type = __extension__ ({
8234 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8236 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8239 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8245 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8250 static struct Type * Reference(struct Type * source)
8252 struct Type * type = (((void *)0));
8256 type = __extension__ ({
8257 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8259 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8266 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8268 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8270 FreeExpContents(checkedExp);
8271 FreeType(checkedExp->expType);
8272 FreeType(checkedExp->destType);
8273 *checkedExp = *newExp;
8274 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8275 checkedExp->prev = prev;
8276 checkedExp->next = next;
8279 void FinishTemplatesContext(struct Context * context)
8281 PopContext(context);
8282 FreeContext(context);
8283 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8286 static __attribute__((unused)) void UnusedFunction()
8290 ((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);
8293 struct Expression * ParseExpressionString(char * expression)
8296 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8297 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8298 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8300 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8301 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8303 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8305 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8306 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8308 parsedExpression = (((void *)0));
8310 expression_yyparse();
8311 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8312 return parsedExpression;
8315 struct __ecereNameSpace__ecere__com__Module
8317 struct __ecereNameSpace__ecere__com__Instance * application;
8318 struct __ecereNameSpace__ecere__sys__OldList classes;
8319 struct __ecereNameSpace__ecere__sys__OldList defines;
8320 struct __ecereNameSpace__ecere__sys__OldList functions;
8321 struct __ecereNameSpace__ecere__sys__OldList modules;
8322 struct __ecereNameSpace__ecere__com__Instance * prev;
8323 struct __ecereNameSpace__ecere__com__Instance * next;
8329 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8330 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8331 } __attribute__ ((gcc_struct));
8333 static struct GlobalData * FindGlobalData(char * name)
8336 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8338 nameSpace = globalData;
8339 for(c = 0; name[c]; c++)
8341 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8343 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8344 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8346 strncpy(spaceName, name + start, c - start);
8347 spaceName[c - start] = '\0';
8348 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8349 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8351 return (((void *)0));
8352 nameSpace = newSpace;
8360 return ScanGlobalData(nameSpace, name + start);
8362 return (((void *)0));
8365 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8368 char nameSpace[1024];
8369 const char * namePart;
8370 unsigned int gotColon = 0;
8372 nameSpace[0] = '\0';
8373 for(c = strlen(name) - 1; c >= 0; c--)
8379 namePart = name + c + 1;
8380 while(c >= 0 && name[c] == ':')
8384 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8388 memcpy(nameSpace, name, c + 1);
8389 nameSpace[c + 1] = (char)0;
8390 return ScanWithNameSpace(tree, nameSpace, namePart);
8394 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8400 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8404 return ScanWithNameSpace(tree, "", namePart);
8406 return (((void *)0));
8409 static void PrintArraySize(struct Type * arrayType, char * string)
8415 if(arrayType->__anon1.__anon4.enumClass)
8416 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8417 else if(arrayType->__anon1.__anon4.arraySizeExp)
8418 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8420 strcat(string, size);
8423 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8428 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8430 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8431 strcat(string, ")");
8432 if(type->kind == 12)
8433 PrintArraySize(type, string);
8434 else if(type->kind == 11)
8436 struct Type * param;
8438 strcat(string, "(");
8439 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8441 PrintType(param, string, 1, fullName);
8443 strcat(string, ", ");
8445 strcat(string, ")");
8447 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8448 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8451 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8453 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8454 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8455 strcat(string, " ");
8456 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8458 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8460 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8462 if(type->classObjectType == 1)
8463 strcat(string, "class");
8465 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8467 else if(_class && _class->string)
8469 char * s = _class->string;
8475 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8481 strcat(string, name);
8484 strcat(string, "::");
8486 if(printName && type->name)
8487 PrintName(type, string, fullName);
8488 PostPrintType(type, string, fullName);
8489 if(type->bitFieldCount)
8493 sprintf(count, ":%d", type->bitFieldCount);
8494 strcat(string, count);
8502 struct Conversion * prev, * next;
8503 struct __ecereNameSpace__ecere__com__Property * convert;
8505 struct Type * resultType;
8506 } __attribute__ ((gcc_struct));
8508 static void FreeConvert(struct Conversion * convert)
8510 if(convert->resultType)
8511 FreeType(convert->resultType);
8518 struct Enumerator * prev;
8519 struct Enumerator * next;
8520 struct Location loc;
8521 struct Identifier * id;
8522 struct Expression * exp;
8523 } __attribute__ ((gcc_struct));
8529 struct AsmField * prev;
8530 struct AsmField * next;
8531 struct Location loc;
8533 struct Expression * expression;
8534 struct Identifier * symbolic;
8535 } __attribute__ ((gcc_struct));
8537 struct ClassDefinition;
8541 struct Context * parent;
8542 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8543 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8544 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8545 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8548 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8549 struct ClassDefinition * classDef;
8550 unsigned int templateTypesOnly;
8551 unsigned int hasNameSpace;
8552 } __attribute__ ((gcc_struct));
8556 struct External * prev;
8557 struct External * next;
8558 struct Location loc;
8560 struct Symbol * symbol;
8563 struct FunctionDefinition * function;
8564 struct ClassDefinition * _class;
8565 struct Declaration * declaration;
8566 char * importString;
8567 struct Identifier * id;
8568 struct DBTableDef * table;
8569 } __attribute__ ((gcc_struct)) __anon1;
8571 struct External * fwdDecl;
8572 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8573 struct __ecereNameSpace__ecere__com__Instance * incoming;
8574 int nonBreakableIncoming;
8575 } __attribute__ ((gcc_struct));
8577 struct ClassDefinition
8579 struct ClassDefinition * prev;
8580 struct ClassDefinition * next;
8581 struct Location loc;
8582 struct Specifier * _class;
8583 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8584 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8585 struct Symbol * symbol;
8586 struct Location blockStart;
8587 struct Location nameLoc;
8589 unsigned int deleteWatchable;
8590 } __attribute__ ((gcc_struct));
8592 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8594 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8596 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8598 struct Symbol * symbol = data->symbol;
8600 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8605 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8608 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8611 struct Declaration * decl;
8612 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8613 struct Declarator * d;
8614 struct External * external;
8616 specifiers = MkList();
8617 declarators = MkList();
8618 ListAdd(specifiers, MkSpecifier(EXTERN));
8619 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8620 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8621 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8622 decl = MkDeclaration(specifiers, declarators);
8623 external = MkExternalDeclaration(decl);
8625 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8626 external->symbol = symbol;
8627 symbol->__anon2.__anon1.pointerExternal = external;
8628 DeclareType(external, data->dataType, 1, 1);
8631 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8632 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8635 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8637 struct Context * ctx;
8638 struct Symbol * symbol = (((void *)0));
8640 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8642 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8644 symbol = (((void *)0));
8649 strcpy(curName, thisNameSpace);
8650 strcat(curName, "::");
8651 strcat(curName, name);
8652 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8655 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8658 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8659 if(symbol || ctx == endContext)
8662 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8663 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8671 struct ClassDef * prev;
8672 struct ClassDef * next;
8673 struct Location loc;
8677 struct Declaration * decl;
8678 struct ClassFunction * function;
8679 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8680 struct PropertyDef * propertyDef;
8681 struct PropertyWatch * propertyWatch;
8683 struct Identifier * defaultProperty;
8686 struct Identifier * id;
8687 struct Initializer * initializer;
8688 } __attribute__ ((gcc_struct)) __anon1;
8689 } __attribute__ ((gcc_struct)) __anon1;
8692 } __attribute__ ((gcc_struct));
8696 struct PropertyDef * prev;
8697 struct PropertyDef * next;
8698 struct Location loc;
8699 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8700 struct Declarator * declarator;
8701 struct Identifier * id;
8702 struct Statement * getStmt;
8703 struct Statement * setStmt;
8704 struct Statement * issetStmt;
8705 struct Symbol * symbol;
8706 struct Expression * category;
8709 unsigned int conversion : 1;
8710 unsigned int isWatchable : 1;
8711 unsigned int isDBProp : 1;
8712 } __attribute__ ((gcc_struct)) __anon1;
8713 } __attribute__ ((gcc_struct));
8715 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8717 struct ClassDef * def;
8720 for(def = (*definitions).first; def; def = def->next)
8724 struct Declaration * decl = def->__anon1.decl;
8726 if(decl && decl->__anon1.__anon1.specifiers)
8728 struct Specifier * spec;
8729 unsigned int isStruct = 0;
8731 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8733 if(spec->type == 3 || spec->type == 4)
8735 if(spec->__anon1.__anon2.definitions)
8736 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8742 struct Declarator * d = (((void *)0));
8744 if(decl->__anon1.__anon1.declarators)
8746 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8748 struct Identifier * idDecl = GetDeclId(d);
8758 sprintf(id, "__anon%d", anonID++);
8759 if(!decl->__anon1.__anon1.declarators)
8760 decl->__anon1.__anon1.declarators = MkList();
8761 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8771 typedef union YYSTYPE
8776 struct Identifier * id;
8777 struct Expression * exp;
8778 struct Specifier * specifier;
8779 struct __ecereNameSpace__ecere__sys__OldList * list;
8780 struct Enumerator * enumerator;
8781 struct Declarator * declarator;
8782 struct Pointer * pointer;
8783 struct Initializer * initializer;
8784 struct InitDeclarator * initDeclarator;
8785 struct TypeName * typeName;
8786 struct Declaration * declaration;
8787 struct Statement * stmt;
8788 struct FunctionDefinition * function;
8789 struct External * external;
8790 struct Context * context;
8791 struct AsmField * asmField;
8792 struct Attrib * attrib;
8793 struct ExtDecl * extDecl;
8794 struct Attribute * attribute;
8795 struct Instantiation * instance;
8796 struct MembersInit * membersInit;
8797 struct MemberInit * memberInit;
8798 struct ClassFunction * classFunction;
8799 struct ClassDefinition * _class;
8800 struct ClassDef * classDef;
8801 struct PropertyDef * prop;
8803 struct Symbol * symbol;
8804 struct PropertyWatch * propertyWatch;
8805 struct TemplateParameter * templateParameter;
8806 struct TemplateArgument * templateArgument;
8807 struct TemplateDatatype * templateDatatype;
8808 struct DBTableEntry * dbtableEntry;
8809 struct DBIndexItem * dbindexItem;
8810 struct DBTableDef * dbtableDef;
8811 } __attribute__ ((gcc_struct)) YYSTYPE;
8813 extern YYSTYPE yylval;
8817 struct MemberInit * prev;
8818 struct MemberInit * next;
8819 struct Location loc;
8820 struct Location realLoc;
8821 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8822 struct Initializer * initializer;
8824 unsigned int variable;
8825 unsigned int takeOutExp;
8826 } __attribute__ ((gcc_struct));
8828 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8830 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8832 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8834 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8835 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8840 const char * dataTypeString;
8842 } __attribute__ ((gcc_struct)) __anon1;
8843 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8845 } __attribute__ ((gcc_struct));
8847 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8849 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8851 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8852 struct __ecereNameSpace__ecere__com__Class * sClass;
8854 for(sClass = _class; sClass; sClass = sClass->base)
8857 if(sClass->templateClass)
8858 sClass = sClass->templateClass;
8859 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8861 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8863 for(sClass = sClass->base; sClass; sClass = sClass->base)
8865 if(sClass->templateClass)
8866 sClass = sClass->templateClass;
8867 id += sClass->templateParams.count;
8878 arg = &_class->templateArgs[id];
8879 if(arg && param->type == 0)
8880 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8885 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8887 struct Context * context = PushContext();
8889 context->templateTypesOnly = 1;
8890 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8892 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8894 for(; param; param = param->next)
8896 if(param->type == 0 && param->identifier)
8898 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8900 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8906 struct __ecereNameSpace__ecere__com__Class * sClass;
8908 for(sClass = _class; sClass; sClass = sClass->base)
8910 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8912 for(p = sClass->templateParams.first; p; p = p->next)
8916 struct TemplateParameter * param = p->param;
8917 struct TemplatedType * type;
8921 p->param = param = __extension__ ({
8922 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8924 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8927 type = __extension__ ({
8928 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8930 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8932 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8940 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8942 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8944 unsigned int first = 1;
8946 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8948 char className[1024];
8950 strcpy(className, _class->fullName);
8951 for(param = _class->templateParams.first; param; param = param->next)
8955 strcat(className, "<");
8957 strcat(className, ", ");
8958 if(lastParam + 1 != p)
8960 strcat(className, param->name);
8961 strcat(className, " = ");
8963 strcat(className, param->name);
8971 int len = strlen(className);
8973 if(className[len - 1] == '>')
8974 className[len++] = ' ';
8975 className[len++] = '>';
8976 className[len++] = '\0';
8978 return __ecereNameSpace__ecere__sys__CopyString(className);
8981 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
8984 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
8988 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8990 unsigned int first = 1;
8992 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8994 char className[1024];
8996 strcpy(className, _class->fullName);
8997 for(param = _class->templateParams.first; param; param = param->next)
9001 strcat(className, "<");
9003 strcat(className, ", ");
9004 if(lastParam + 1 != p)
9006 strcat(className, param->name);
9007 strcat(className, " = ");
9009 strcat(className, param->name);
9017 int len = strlen(className);
9019 if(className[len - 1] == '>')
9020 className[len++] = ' ';
9021 className[len++] = '>';
9022 className[len++] = '\0';
9024 type = MkClassType(className);
9028 type = MkClassType(_class->fullName);
9033 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9035 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9036 struct __ecereNameSpace__ecere__com__DataMember * member;
9037 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9039 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9040 DeclareMembers(neededBy, _class->base, 0);
9041 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9043 if(!member->isProperty)
9045 switch(member->type)
9049 if(!member->dataType && member->dataTypeString)
9050 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9051 if(member->dataType)
9052 DeclareType(neededBy, member->dataType, 1, 0);
9058 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9065 FinishTemplatesContext(context);
9066 return topMember ? topMember->memberID : _class->memberID;
9069 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9071 if(!method->dataType)
9073 struct Context * context = SetupTemplatesContext(method->_class);
9075 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9076 FinishTemplatesContext(context);
9077 if(method->type != 1 && method->dataType)
9079 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9081 if(!method->_class->symbol)
9082 method->_class->symbol = FindClass(method->_class->fullName);
9083 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9089 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9093 struct Context * context = SetupTemplatesContext(prop->_class);
9095 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9096 FinishTemplatesContext(context);
9100 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9102 if(specs != (((void *)0)) && _class)
9104 struct Specifier * spec;
9106 for(spec = specs->first; spec; spec = spec->next)
9108 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9111 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9112 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9118 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9120 struct Identifier * id = exp->__anon1.__anon1.identifier;
9121 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9122 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9123 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9124 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9126 if(_class && _class->type == 4)
9128 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9129 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9133 struct __ecereNameSpace__ecere__com__Class * baseClass;
9135 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9137 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9139 for(value = e->values.first; value; value = value->next)
9141 if(!strcmp(value->name, id->string))
9146 exp->isConstant = 1;
9147 if(inCompiler || inPreCompiler || inDebugger)
9151 FreeExpContents(exp);
9153 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9154 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9156 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9157 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9159 exp->expType = MkClassType(baseClass->fullName);
9167 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9169 ProcessMethodType(method);
9170 exp->expType = __extension__ ({
9171 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9173 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9177 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9180 ProcessPropertyType(prop);
9181 exp->expType = prop->dataType;
9183 prop->dataType->refCount++;
9186 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9188 if(!member->dataType)
9189 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9190 exp->expType = member->dataType;
9191 if(member->dataType)
9192 member->dataType->refCount++;
9195 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9197 if(!classProp->dataType)
9198 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9199 if(classProp->constant)
9201 FreeExpContents(exp);
9202 exp->isConstant = 1;
9203 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9206 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9213 sprintf(constant, "%d", (int)classProp->Get(_class));
9214 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9220 exp->expType = classProp->dataType;
9221 if(classProp->dataType)
9222 classProp->dataType->refCount++;
9228 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9230 struct Symbol * symbol = prop->symbol;
9231 unsigned int imported = 0;
9232 unsigned int dllImport = 0;
9233 struct External * structExternal = (((void *)0));
9234 struct External * instExternal = (((void *)0));
9236 strcpy(setName, "__ecereProp_");
9237 FullClassNameCat(setName, prop->_class->fullName, 0);
9238 strcat(setName, "_Set_");
9239 FullClassNameCat(setName, prop->name, 1);
9240 strcpy(getName, "__ecereProp_");
9241 FullClassNameCat(getName, prop->_class->fullName, 0);
9242 strcat(getName, "_Get_");
9243 FullClassNameCat(getName, prop->name, 1);
9244 if(!symbol || symbol->_import)
9248 struct Symbol * classSym;
9250 if(!prop->_class->symbol)
9251 prop->_class->symbol = FindClass(prop->_class->fullName);
9252 classSym = prop->_class->symbol;
9253 if(classSym && !classSym->_import)
9255 struct ModuleImport * module;
9257 if(prop->_class->module)
9258 module = FindModule(prop->_class->module);
9260 module = mainModule;
9261 classSym->_import = __extension__ ({
9262 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9264 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9266 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9268 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9269 symbol->_import = (struct ClassImport *)__extension__ ({
9270 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9272 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9275 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9278 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)
9283 struct Context * context = SetupTemplatesContext(prop->_class);
9285 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9286 FinishTemplatesContext(context);
9288 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9290 if(prop->_class->type == 0 && prop->_class->structSize)
9291 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9292 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9294 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9296 struct Declaration * decl;
9297 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9298 struct Declarator * d;
9299 struct __ecereNameSpace__ecere__sys__OldList * params;
9300 struct Specifier * spec = (((void *)0));
9301 struct External * external;
9302 struct Declarator * typeDecl;
9303 unsigned int simple = 0;
9304 unsigned int needReference;
9306 specifiers = MkList();
9307 declarators = MkList();
9309 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9310 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9312 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9314 struct Context * context = SetupTemplatesContext(prop->_class);
9316 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9317 FinishTemplatesContext(context);
9319 needReference = !typeDecl || typeDecl->type == 1;
9320 for(spec = (*specifiers).first; spec; spec = spec->next)
9324 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9328 symbol->_class = classSym->__anon1.registered;
9329 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9336 d = PlugDeclarator(typeDecl, d);
9339 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9340 specifiers = MkList();
9342 d = MkDeclaratorFunction(d, params);
9344 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9345 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9346 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9348 ListAdd(specifiers, MkSpecifier(VOID));
9349 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9350 decl = MkDeclaration(specifiers, declarators);
9351 external = MkExternalDeclaration(decl);
9353 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9355 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9357 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9358 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9359 external->symbol = symbol;
9360 symbol->__anon2.__anon2.externalGet = external;
9361 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9363 FreeDeclarator(typeDecl);
9365 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9367 struct Declaration * decl;
9368 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9369 struct Declarator * d;
9370 struct __ecereNameSpace__ecere__sys__OldList * params;
9371 struct Specifier * spec = (((void *)0));
9372 struct External * external;
9373 struct Declarator * typeDecl;
9374 unsigned int needReference;
9376 declarators = MkList();
9378 if(!prop->conversion || prop->_class->type == 1)
9380 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9382 specifiers = MkList();
9384 struct Context * context = SetupTemplatesContext(prop->_class);
9386 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9387 FinishTemplatesContext(context);
9389 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9390 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9391 ListAdd(params, MkTypeName(specifiers, d));
9392 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9394 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9395 d = MkDeclaratorFunction(d, params);
9396 needReference = !typeDecl || typeDecl->type == 1;
9397 for(spec = (*specifiers).first; spec; spec = spec->next)
9401 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9404 symbol->_class = classSym->__anon1.registered;
9408 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9409 specifiers = MkList();
9411 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9412 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9413 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9414 if(!prop->conversion || prop->_class->type == 1)
9415 ListAdd(specifiers, MkSpecifier(VOID));
9417 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9418 decl = MkDeclaration(specifiers, declarators);
9419 external = MkExternalDeclaration(decl);
9421 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9423 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9425 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9426 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9427 external->symbol = symbol;
9428 symbol->__anon2.__anon2.externalSet = external;
9429 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9431 if(!symbol->__anon2.__anon2.externalPtr)
9433 struct Declaration * decl;
9434 struct External * external;
9435 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9436 char propName[1024];
9439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9442 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9443 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9445 ListAdd(specifiers, MkSpecifierName("Property"));
9446 strcpy(propName, "__ecereProp_");
9447 FullClassNameCat(propName, prop->_class->fullName, 0);
9448 strcat(propName, "_");
9449 FullClassNameCat(propName, prop->name, 1);
9451 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9453 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9456 strcpy(propName, "__ecerePropM_");
9457 FullClassNameCat(propName, prop->_class->fullName, 0);
9458 strcat(propName, "_");
9459 FullClassNameCat(propName, prop->name, 1);
9460 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9462 decl = MkDeclaration(specifiers, list);
9464 external = MkExternalDeclaration(decl);
9465 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9466 external->symbol = symbol;
9467 symbol->__anon2.__anon2.externalPtr = external;
9469 if(inCompiler && neededBy)
9471 if(symbol->__anon2.__anon2.externalPtr)
9472 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9473 if(symbol->__anon2.__anon2.externalGet)
9474 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9475 if(symbol->__anon2.__anon2.externalSet)
9476 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9480 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9482 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9484 struct Symbol * symbol = method->symbol;
9486 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9488 unsigned int dllImport = 0;
9490 if(!method->dataType)
9491 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9493 if(!symbol || method->type == 1)
9495 struct Symbol * classSym;
9497 if(!method->_class->symbol)
9498 method->_class->symbol = FindClass(method->_class->fullName);
9499 classSym = method->_class->symbol;
9500 if(!classSym->_import)
9502 struct ModuleImport * module;
9504 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9505 module = FindModule(method->_class->module);
9507 module = mainModule;
9508 classSym->_import = __extension__ ({
9509 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9511 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9513 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9517 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9519 if(!symbol->_import)
9521 symbol->_import = (struct ClassImport *)__extension__ ({
9522 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9524 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9526 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9530 symbol->type = method->dataType;
9532 symbol->type->refCount++;
9535 if(!method->dataType->dllExport)
9537 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)
9543 struct Declaration * decl;
9544 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9545 struct Declarator * d;
9546 struct Declarator * funcDecl;
9547 struct External * external;
9549 specifiers = MkList();
9550 declarators = MkList();
9552 ListAdd(specifiers, MkSpecifier(EXTERN));
9553 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9554 ListAdd(specifiers, MkSpecifier(STATIC));
9555 if(method->type == 1)
9557 ListAdd(specifiers, MkSpecifier(INT));
9558 d = MkDeclaratorIdentifier(MkIdentifier(name));
9562 d = MkDeclaratorIdentifier(MkIdentifier(name));
9564 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9566 struct Context * context = SetupTemplatesContext(method->_class);
9568 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9569 FinishTemplatesContext(context);
9571 funcDecl = GetFuncDecl(d);
9574 struct Specifier * spec, * next;
9576 for(spec = (*specifiers).first; spec; spec = next)
9581 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9582 FreeSpecifier(spec);
9586 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9588 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9590 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9591 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")));
9592 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9593 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9595 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9597 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9599 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9600 FreeTypeName(param);
9602 if(!funcDecl->__anon1.function.parameters)
9603 funcDecl->__anon1.function.parameters = MkList();
9604 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9608 ProcessDeclarator(d, 1);
9609 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9610 decl = MkDeclaration(specifiers, declarators);
9611 ReplaceThisClassSpecifiers(specifiers, method->_class);
9612 external = MkExternalDeclaration(decl);
9613 external->symbol = symbol;
9614 symbol->__anon2.__anon1.pointerExternal = external;
9615 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9616 DeclareStruct(external, method->_class->fullName, 1, 1);
9617 if(method->dataType)
9618 DeclareType(external, method->dataType, 1, 1);
9621 if(inCompiler && neededFor)
9623 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9625 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9629 struct __ecereNameSpace__ecere__com__GlobalFunction;
9631 struct __ecereNameSpace__ecere__com__GlobalFunction
9633 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9634 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9637 struct __ecereNameSpace__ecere__com__Instance * module;
9638 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9639 const char * dataTypeString;
9640 struct Type * dataType;
9642 } __attribute__ ((gcc_struct));
9644 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9646 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);
9648 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9650 struct Symbol * symbol = function->symbol;
9652 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9654 unsigned int imported = 0;
9655 unsigned int dllImport = 0;
9657 if(!function->dataType)
9659 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9660 if(!function->dataType->__anon1.__anon2.thisClass)
9661 function->dataType->__anon1.__anon2.staticMethod = 1;
9667 struct ModuleImport * module = FindModule(function->module);
9669 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9672 if(!function->dataType->dllExport)
9674 symbol->_import = (struct ClassImport *)__extension__ ({
9675 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9677 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9679 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9683 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9684 if(!symbol->type->__anon1.__anon2.thisClass)
9685 symbol->type->__anon1.__anon2.staticMethod = 1;
9688 imported = symbol->_import ? 1 : 0;
9689 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9695 struct Declaration * decl;
9696 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9697 struct Declarator * d;
9698 struct Declarator * funcDecl;
9699 struct External * external;
9701 specifiers = MkList();
9702 declarators = MkList();
9703 ListAdd(specifiers, MkSpecifier(EXTERN));
9704 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9706 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9707 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9708 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9710 struct Specifier * spec;
9712 for(spec = (*specifiers).first; spec; spec = spec->next)
9713 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9715 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9716 FreeSpecifier(spec);
9720 funcDecl = GetFuncDecl(d);
9721 if(funcDecl && !funcDecl->__anon1.function.parameters)
9723 funcDecl->__anon1.function.parameters = MkList();
9724 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9726 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9728 struct Context * oldCtx = curContext;
9730 curContext = globalContext;
9731 decl = MkDeclaration(specifiers, declarators);
9732 curContext = oldCtx;
9734 external = MkExternalDeclaration(decl);
9735 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9736 external->symbol = symbol;
9737 symbol->__anon2.__anon1.pointerExternal = external;
9738 DeclareType(external, function->dataType, 1, 1);
9742 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9743 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9744 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;
9747 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9749 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9756 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9757 strcpy(name, "__ecereFunction_");
9758 FullClassNameCat(name, s, 0);
9759 DeclareFunction(neededBy, function, name);
9762 FindSymbol(s, globalContext, globalContext, 0, 0);
9765 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9767 char propName[1024], propNameM[1024];
9768 char getName[1024], setName[1024];
9769 struct __ecereNameSpace__ecere__sys__OldList * args;
9771 DeclareProperty(curExternal, prop, setName, getName);
9772 strcpy(propName, "__ecereProp_");
9773 FullClassNameCat(propName, prop->_class->fullName, 0);
9774 strcat(propName, "_");
9775 FullClassNameCat(propName, prop->name, 1);
9776 strcpy(propNameM, "__ecerePropM_");
9777 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9778 strcat(propNameM, "_");
9779 FullClassNameCat(propNameM, prop->name, 1);
9780 if(prop->isWatchable)
9783 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9784 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9785 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9787 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9788 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9789 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9790 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9794 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9795 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9796 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9798 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9799 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9800 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9801 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9803 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9804 curFunction->propSet->fireWatchersDone = 1;
9807 struct __ecereNameSpace__ecere__com__SubModule;
9809 struct __ecereNameSpace__ecere__com__SubModule
9811 struct __ecereNameSpace__ecere__com__SubModule * prev;
9812 struct __ecereNameSpace__ecere__com__SubModule * next;
9813 struct __ecereNameSpace__ecere__com__Instance * module;
9815 } __attribute__ ((gcc_struct));
9817 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9819 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9821 if(searchFor == searchIn)
9823 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9825 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9827 if(ModuleVisibility(subModule->module, searchFor))
9834 void ProcessExpressionType(struct Expression * exp);
9836 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9838 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9840 struct Identifier * id = exp->__anon1.__anon1.identifier;
9841 struct Context * ctx;
9842 struct Symbol * symbol = (((void *)0));
9844 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9846 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9848 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9853 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))))
9855 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9856 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9857 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9858 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9862 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9864 if(!prop && !method)
9865 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9866 if(!prop && !method && !member)
9868 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9870 if(prop || method || member || classProp)
9873 exp->__anon1.member.member = id;
9874 exp->__anon1.member.memberType = 0;
9875 exp->__anon1.member.exp = QMkExpId("this");
9878 else if(_class && _class->templateParams.first)
9880 struct __ecereNameSpace__ecere__com__Class * sClass;
9882 for(sClass = _class; sClass; sClass = sClass->base)
9884 if(sClass->templateParams.first)
9886 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9888 for(param = sClass->templateParams.first; param; param = param->next)
9890 if(param->type == 2 && !strcmp(param->name, id->string))
9892 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9896 struct Declarator * decl;
9897 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9899 FreeIdentifier(exp->__anon1.member.member);
9900 ProcessExpressionType(argExp);
9901 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9902 exp->expType = ProcessType(specs, decl);
9904 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9915 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9917 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9919 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9921 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9922 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9925 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9926 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9928 void * ptr = inst->data + dataMember->offset + offset;
9929 char * result = (((void *)0));
9931 exp->loc = member->loc = inst->loc;
9932 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9933 if(!dataMember->dataType)
9934 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9935 type = dataMember->dataType;
9938 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9940 if(_class->type == 4)
9942 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9946 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9947 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9949 for(item = e->values.first; item; item = item->next)
9951 if(item->data == GetEnumValue(_class, ptr))
9953 result = item->name;
9959 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9961 exp->destType = MkClassType(_class->fullName);
9962 ProcessExpressionType(exp);
9966 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9968 if(!_class->dataType)
9969 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9970 type = _class->dataType;
9979 FreeExpContents(exp);
9980 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
9986 FreeExpContents(exp);
9987 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
9993 FreeExpContents(exp);
9994 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10000 FreeExpContents(exp);
10001 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10007 FreeExpContents(exp);
10008 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10014 FreeExpContents(exp);
10015 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10020 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10023 ListAdd(memberList, member);
10025 if(parentDataMember->type == 1)
10030 void CheckTemplateTypes(struct Expression * exp)
10032 struct Expression * nbExp = GetNonBracketsExp(exp);
10034 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10036 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10037 struct Context * context;
10038 int kind = exp->expType->kind;
10042 exp->destType->refCount++;
10044 exp->expType->refCount++;
10045 newExp->prev = (((void *)0));
10046 newExp->next = (((void *)0));
10047 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10049 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10051 if(c->type == 2 || c->type == 4 || c->type == 3)
10054 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10055 kind = c->dataType->kind;
10061 if(exp->destType->classObjectType)
10064 exp->destType->refCount--;
10066 exp->expType->refCount--;
10067 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10071 struct __ecereNameSpace__ecere__sys__OldList * specs;
10072 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10073 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10075 context = PushContext();
10076 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10077 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10078 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10080 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10081 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10082 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10083 exp->__anon1.compound->__anon1.compound.context = context;
10084 PopContext(context);
10089 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10090 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))
10091 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10093 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10098 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10100 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10101 struct Context * context;
10102 int kind = exp->expType->kind;
10106 exp->destType->refCount++;
10108 exp->expType->refCount++;
10109 newExp->prev = (((void *)0));
10110 newExp->next = (((void *)0));
10111 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10113 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10115 if(c->type == 2 || c->type == 4 || c->type == 3)
10118 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10119 kind = c->dataType->kind;
10125 if(exp->destType->classObjectType)
10128 exp->destType->refCount--;
10130 exp->expType->refCount--;
10131 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10135 struct __ecereNameSpace__ecere__sys__OldList * specs;
10136 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10137 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10139 context = PushContext();
10140 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10141 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10142 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10144 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10145 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10146 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10147 exp->__anon1.compound->__anon1.compound.context = context;
10148 PopContext(context);
10153 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10156 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10157 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)));
10158 ProcessExpressionType((*exp->__anon1.list).first);
10164 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10166 exp->needTemplateCast = 2;
10167 newExp->needCast = 1;
10168 newExp->needTemplateCast = 2;
10169 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10171 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10172 exp->needTemplateCast = 2;
10173 newExp->needCast = 1;
10174 newExp->needTemplateCast = 2;
10175 ProcessExpressionType((*exp->__anon1.list).first);
10181 if(exp->expType->kind == 20)
10183 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10187 FreeType(exp->destType);
10188 FreeType(exp->expType);
10189 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10194 char typeString[1024];
10195 struct Declarator * decl;
10196 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10198 typeString[0] = '\0';
10199 PrintType(exp->expType, typeString, 0, 0);
10200 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10202 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10203 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10204 exp->__anon1.cast.exp->needCast = 1;
10205 exp->needTemplateCast = 2;
10206 newExp->needTemplateCast = 2;
10214 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10219 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10221 if(init->__anon1.exp && !init->__anon1.exp->destType)
10223 FreeType(init->__anon1.exp->destType);
10224 init->__anon1.exp->destType = type;
10228 if(init->__anon1.exp)
10230 ProcessExpressionType(init->__anon1.exp);
10231 init->isConstant = init->__anon1.exp->isConstant;
10237 struct Expression * exp = init->__anon1.exp;
10238 struct Instantiation * inst = exp->__anon1.instance;
10239 struct MembersInit * members;
10242 init->__anon1.list = MkList();
10245 for(members = (*inst->members).first; members; members = members->next)
10247 if(members->type == 0)
10249 struct MemberInit * member;
10251 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10253 ListAdd(init->__anon1.list, member->initializer);
10254 member->initializer = (((void *)0));
10259 FreeExpression(exp);
10263 struct Initializer * i;
10264 struct Type * initializerType = (((void *)0));
10265 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10266 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10267 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10268 int subMemberStackPos = 0;
10270 if(type && type->kind == 12)
10271 initializerType = Dereference(type);
10272 else if(type && (type->kind == 9 || type->kind == 10))
10273 initializerType = type->__anon1.__anon1.members.first;
10274 for(i = (*init->__anon1.list).first; i; i = i->next)
10276 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10278 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10281 if(!curMember->dataType)
10282 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10283 initializerType = curMember->dataType;
10286 ProcessInitializer(i, initializerType);
10287 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10288 initializerType = initializerType->next;
10290 init->isConstant = 0;
10292 if(type && type->kind == 12)
10293 FreeType(initializerType);
10294 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))
10296 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10303 void PopulateInstance(struct Instantiation * inst)
10305 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10306 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10307 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10308 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10311 inst->members = MkListOne(MkMembersInitList(memberList));
10313 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10314 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10316 if(!dataMember->isProperty)
10318 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10319 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10322 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10323 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10324 struct Type * type;
10325 void * ptr = inst->data + dataMember->offset;
10326 char * result = (((void *)0));
10328 exp->loc = member->loc = inst->loc;
10329 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10330 if(!dataMember->dataType)
10331 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10332 type = dataMember->dataType;
10333 if(type->kind == 8)
10335 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10337 if(_class->type == 4)
10339 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10343 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10344 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10346 for(item = e->values.first; item; item = item->next)
10348 if(item->data == GetEnumValue(_class, ptr))
10350 result = item->name;
10357 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10359 exp->destType = MkClassType(_class->fullName);
10360 ProcessExpressionType(exp);
10363 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10365 if(!_class->dataType)
10366 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10367 type = _class->dataType;
10376 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10382 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10388 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10394 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10400 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10405 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10408 ListAdd(memberList, member);
10414 int ComputeTypeSize(struct Type * type);
10416 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10418 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10419 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10421 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))
10423 int unionMemberOffset = 0;
10428 member->memberOffset = 0;
10429 if(targetBits < sizeof(void *) * 8)
10430 member->structAlignment = (short)0;
10432 else if(targetBits < sizeof(void *) * 8)
10433 _class->structAlignment = (short)0;
10434 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10435 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10436 if(!member && _class->destructionWatchOffset)
10437 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10439 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10441 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10443 if(!dataMember->isProperty)
10445 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10447 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10453 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10455 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10457 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10459 if(!isMember && _class->type == 2 && dataMember->dataType)
10461 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10465 ComputeTypeSize(dataMember->dataType);
10466 if(bitMember->pos == -1)
10467 bitMember->pos = _class->memberOffset;
10468 if(!bitMember->size)
10469 bitMember->size = dataMember->dataType->size * 8;
10470 _class->memberOffset = bitMember->pos + bitMember->size;
10471 for(d = 0; d < bitMember->size; d++)
10477 bitMember->mask = mask << bitMember->pos;
10479 else if(dataMember->type == 0 && dataMember->dataType)
10484 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)))
10485 ComputeTypeSize(dataMember->dataType);
10486 if(dataMember->dataType->bitFieldCount)
10488 bitFields += dataMember->dataType->bitFieldCount;
10495 int size = (bitFields + 7) / 8;
10499 int __simpleStruct0;
10503 short __simpleStruct0;
10505 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10506 if(member->memberOffset % alignment)
10507 member->memberOffset += alignment - (member->memberOffset % alignment);
10509 dataMember->offset = member->memberOffset;
10510 if(member->type == 1)
10511 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10514 member->memberOffset += size;
10521 short __simpleStruct0;
10523 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10524 if(_class->memberOffset % alignment)
10525 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10527 dataMember->offset = _class->memberOffset;
10528 _class->memberOffset += size;
10532 size = dataMember->dataType->size;
10533 alignment = dataMember->dataType->alignment;
10537 int __simpleStruct0;
10541 short __simpleStruct0;
10543 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10544 if(member->memberOffset % alignment)
10545 member->memberOffset += alignment - (member->memberOffset % alignment);
10547 dataMember->offset = member->memberOffset;
10548 if(member->type == 1)
10549 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10552 member->memberOffset += size;
10559 short __simpleStruct0;
10561 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10562 if(_class->memberOffset % alignment)
10563 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10565 dataMember->offset = _class->memberOffset;
10566 _class->memberOffset += size;
10573 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10574 alignment = dataMember->structAlignment;
10577 int __simpleStruct0;
10581 short __simpleStruct0;
10583 if(member->memberOffset % alignment)
10584 member->memberOffset += alignment - (member->memberOffset % alignment);
10585 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10587 dataMember->offset = member->memberOffset;
10588 if(member->type == 1)
10589 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10591 member->memberOffset += dataMember->memberOffset;
10597 short __simpleStruct0;
10599 if(_class->memberOffset % alignment)
10600 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10601 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10603 dataMember->offset = _class->memberOffset;
10604 _class->memberOffset += dataMember->memberOffset;
10612 int size = (bitFields + 7) / 8;
10616 int __simpleStruct0;
10620 short __simpleStruct0;
10622 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10623 if(member->memberOffset % alignment)
10624 member->memberOffset += alignment - (member->memberOffset % alignment);
10626 if(member->type == 1)
10627 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10630 member->memberOffset += size;
10637 short __simpleStruct0;
10639 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10640 if(_class->memberOffset % alignment)
10641 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10643 _class->memberOffset += size;
10648 if(member && member->type == 1)
10650 member->memberOffset = unionMemberOffset;
10654 if(_class->type != 2)
10658 if(_class->structAlignment)
10660 if(_class->memberOffset % _class->structAlignment)
10661 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10663 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10666 struct __ecereNameSpace__ecere__com__Property * prop;
10668 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10670 if(prop->isProperty && prop->isWatchable)
10672 prop->watcherOffset = _class->structSize;
10673 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10678 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10680 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10682 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10684 if(deriv->computeSize)
10686 deriv->offset = _class->structSize;
10687 deriv->memberOffset = 0;
10688 deriv->structSize = deriv->offset;
10689 ComputeClassMembers(deriv, 0);
10697 FinishTemplatesContext(context);
10700 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)
10702 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10703 unsigned int totalSize = 0;
10704 unsigned int maxSize = 0;
10707 struct __ecereNameSpace__ecere__com__DataMember * member;
10709 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10713 if(!isMember && _class->base)
10715 maxSize = _class->structSize;
10717 if(_class->type == 1 || _class->type == 5)
10718 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10721 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10723 if(maxSize > baseSize)
10724 maxSize -= baseSize;
10730 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10732 if(!member->isProperty)
10734 switch(member->type)
10738 if(member->dataTypeString)
10740 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10741 struct Declarator * decl;
10743 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10744 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10745 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10746 if(!member->dataType)
10747 member->dataType = ProcessType(specs, decl);
10748 ReplaceThisClassSpecifiers(specs, topClass);
10750 struct Type * type = ProcessType(specs, decl);
10752 DeclareType(neededBy, member->dataType, 1, 0);
10755 ComputeTypeSize(member->dataType);
10756 size = member->dataType->size;
10757 alignment = member->dataType->alignment;
10760 if(totalSize % alignment)
10761 totalSize += alignment - (totalSize % alignment);
10770 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10773 sprintf(id, "__anon%d", anonID++);
10775 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10776 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10777 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10778 alignment = member->structAlignment;
10781 if(totalSize % alignment)
10782 totalSize += alignment - (totalSize % alignment);
10792 unsigned int __simpleStruct0;
10794 if(topMember && topMember->type == 1)
10795 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10797 *retSize += totalSize;
10799 else if(totalSize < maxSize && _class->type != 1000)
10801 int autoPadding = 0;
10803 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10804 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10805 if(totalSize + autoPadding < maxSize)
10807 char sizeString[50];
10809 sprintf(sizeString, "%d", maxSize - totalSize);
10810 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10816 FinishTemplatesContext(context);
10817 return topMember ? topMember->memberID : _class->memberID;
10820 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)
10825 CheckConstCompatibility(source, dest, 1);
10826 if(source->kind == 20 && dest->kind != 20)
10828 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10833 if(dest->kind == 20 && source->kind != 20)
10835 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10840 if(dest->classObjectType == 2 && dest->kind != 11)
10842 if(source->classObjectType != 3)
10846 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10854 if(source->kind != 11 && source->classObjectType == 3)
10856 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10859 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10861 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))
10864 if(dest->kind == 14 && source->kind != 0)
10866 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))
10868 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))
10870 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10872 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10874 if(conversions != (((void *)0)))
10876 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10881 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10883 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10885 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10887 if(sourceBase == destBase)
10891 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))
10895 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))
10897 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10904 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10908 if(source->kind == 8)
10910 struct __ecereNameSpace__ecere__com__Class * _class;
10912 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10914 struct __ecereNameSpace__ecere__com__Property * convert;
10916 for(convert = _class->conversions.first; convert; convert = convert->next)
10918 if(convert->memberAccess == 1 || _class->module == privateModule)
10920 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10922 if(!convert->dataType)
10923 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10924 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))
10926 if(!conversions && !convert->Get)
10928 else if(conversions != (((void *)0)))
10930 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))
10934 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10936 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10945 if(dest->kind == 8)
10947 struct __ecereNameSpace__ecere__com__Class * _class;
10949 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10951 struct __ecereNameSpace__ecere__com__Property * convert;
10953 for(convert = _class->conversions.first; convert; convert = convert->next)
10955 if(convert->memberAccess == 1 || _class->module == privateModule)
10957 struct Type * constType = (((void *)0));
10958 unsigned int success = 0;
10960 if(!convert->dataType)
10961 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10962 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10964 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10966 constType = __extension__ ({
10967 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10969 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10971 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10972 ptrType->constant = 1;
10974 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10976 if(!conversions && !convert->Set)
10978 else if(conversions != (((void *)0)))
10980 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))
10984 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10986 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
10992 FreeType(constType);
10998 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11000 if(!dest->__anon1._class->__anon1.registered->dataType)
11001 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11002 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11004 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))
11011 if(source->kind == 8)
11013 struct __ecereNameSpace__ecere__com__Class * _class;
11015 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11017 struct __ecereNameSpace__ecere__com__Property * convert;
11019 for(convert = _class->conversions.first; convert; convert = convert->next)
11021 if(convert->memberAccess == 1 || _class->module == privateModule)
11023 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11025 if(!convert->dataType)
11026 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11027 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))
11029 if(!conversions && !convert->Get)
11031 else if(conversions != (((void *)0)))
11033 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))
11037 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11039 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11047 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11049 if(!source->__anon1._class->__anon1.registered->dataType)
11050 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11051 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11053 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))
11055 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11061 if(source->kind == 8 || source->kind == 19)
11063 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11065 else if(dest->kind == 7 && source->kind == 6)
11067 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11069 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11071 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11073 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11075 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11077 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))
11079 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))
11081 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)))
11083 struct Type * paramSource, * paramDest;
11085 if(dest->kind == 16)
11086 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11087 if(source->kind == 16)
11088 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11089 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11090 dest = dest->__anon1.type;
11091 if(source->kind == 13 && source->__anon1.type->kind == 11)
11092 source = source->__anon1.type;
11093 if(dest->kind == 16)
11094 dest = dest->__anon1.__anon3.method->dataType;
11095 if(source->kind == 16)
11096 source = source->__anon1.__anon3.method->dataType;
11097 paramSource = source->__anon1.__anon2.params.first;
11098 if(paramSource && paramSource->kind == 0)
11099 paramSource = (((void *)0));
11100 paramDest = dest->__anon1.__anon2.params.first;
11101 if(paramDest && paramDest->kind == 0)
11102 paramDest = (((void *)0));
11103 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11105 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))))
11107 if(paramDest && paramDest->kind == 8)
11108 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11110 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11113 paramDest = paramDest->next;
11115 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11117 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11119 if(dest->__anon1.__anon2.thisClass)
11121 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11123 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11129 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11131 if(owningClassDest)
11132 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11134 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11138 paramSource = paramSource->next;
11142 if(dest->__anon1.__anon2.thisClass)
11144 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11146 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11152 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11154 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11160 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11162 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11166 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11167 for(; paramDest; paramDest = paramDest->next)
11171 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11175 struct Type * paramDestType = paramDest;
11176 struct Type * paramSourceType = paramSource;
11177 struct Type * type = paramDestType;
11179 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11182 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11183 struct __ecereNameSpace__ecere__com__Class * sClass;
11185 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11188 if(sClass->templateClass)
11189 sClass = sClass->templateClass;
11190 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11192 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11194 for(sClass = sClass->base; sClass; sClass = sClass->base)
11196 if(sClass->templateClass)
11197 sClass = sClass->templateClass;
11198 id += sClass->templateParams.count;
11209 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11211 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11214 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)))
11219 PrintType(paramDest, type, 0, 1);
11220 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11221 if(paramDestType != paramDest)
11222 FreeType(paramDestType);
11225 if(paramDestType != paramDest)
11226 FreeType(paramDestType);
11228 paramSource = paramSource->next;
11232 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11237 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11241 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11243 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))
11245 ComputeTypeSize(source->__anon1.type);
11246 ComputeTypeSize(dest->__anon1.type);
11247 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))
11255 void ComputeInstantiation(struct Expression * exp)
11257 struct Instantiation * inst = exp->__anon1.instance;
11258 struct MembersInit * members;
11259 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11260 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11261 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11262 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11263 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11264 int subMemberStackPos = 0;
11267 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11271 if(_class->type == 0 || _class->type == 5)
11273 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11274 if(_class->type == 0)
11275 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11278 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11282 for(members = (*inst->members).first; members; members = members->next)
11284 switch(members->type)
11288 if(members->__anon1.dataMembers)
11290 struct MemberInit * member;
11292 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11294 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11295 unsigned int found = 0;
11296 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11297 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11298 unsigned int dataMemberOffset;
11302 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11305 if(curMember->isProperty)
11306 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11309 dataMember = curMember;
11310 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11311 if(_class->type == 0)
11312 dataMemberOffset += _class->base->structSize;
11319 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11323 if(prop->memberAccess == 1)
11325 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11326 curClass = prop->_class;
11331 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11332 int _subMemberStackPos = 0;
11334 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11338 if(dataMember->memberAccess == 1)
11340 curMember = dataMember;
11341 curClass = dataMember->_class;
11342 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11343 subMemberStackPos = _subMemberStackPos;
11348 if(found && member->initializer && member->initializer->type == 0)
11350 struct Expression * value = member->initializer->__anon1.exp;
11351 struct Type * type = (((void *)0));
11352 unsigned int deepMember = 0;
11356 type = prop->dataType;
11358 else if(dataMember)
11360 if(!dataMember->dataType)
11361 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11362 type = dataMember->dataType;
11364 if(ident && ident->next)
11367 for(ident = ident->next; ident && type; ident = ident->next)
11369 if(type->kind == 8)
11371 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11373 type = prop->dataType;
11376 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11378 type = dataMember->dataType;
11381 else if(type->kind == 9 || type->kind == 10)
11383 struct Type * memberType;
11385 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11387 if(!strcmp(memberType->name, ident->string))
11398 FreeType(value->destType);
11399 value->destType = type;
11402 ComputeExpression(value);
11404 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11406 if(type->kind == 8)
11408 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11410 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11412 if(!_class->dataType)
11413 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11414 type = _class->dataType;
11419 void * ptr = inst->data + dataMemberOffset;
11421 if(value->type == 2)
11427 GetInt(value, (int *)ptr);
11432 GetInt64(value, (long long *)ptr);
11437 GetIntPtr(value, (intptr_t *)ptr);
11442 GetIntSize(value, (ssize_t *)ptr);
11447 GetFloat(value, (float *)ptr);
11452 GetDouble(value, (double *)ptr);
11457 else if(value->type == 1)
11459 if(type->kind == 8)
11461 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11463 if(_class->type == 1)
11465 ComputeTypeSize(type);
11466 if(value->__anon1.instance->data)
11467 memcpy(ptr, value->__anon1.instance->data, type->size);
11472 else if(prop && prop->Set != (void *)(intptr_t)1)
11474 if(value->type == 1 && value->__anon1.instance->data)
11476 if(type->kind == 8)
11478 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11480 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)))
11482 void (* Set)(void *, void *) = (void *)prop->Set;
11484 Set(inst->data, value->__anon1.instance->data);
11485 PopulateInstance(inst);
11489 else if(value->type == 2)
11495 void (* Set)(void *, double) = (void *)prop->Set;
11497 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11502 void (* Set)(void *, float) = (void *)prop->Set;
11504 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11509 void (* Set)(void *, int) = (void *)prop->Set;
11511 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11516 void (* Set)(void *, long long) = (void *)prop->Set;
11518 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11523 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11525 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11530 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11532 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11537 else if(value->type == 3)
11541 ReadString(temp, value->__anon1.__anon2.string);
11542 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11546 else if(!deepMember && type && _class->type == 3)
11550 if(value->type == 2)
11552 if(type->kind == 8)
11554 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11556 if(_class->type == 3)
11558 if(!_class->dataType)
11559 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11560 type = _class->dataType;
11568 float (* Set)(float) = (void *)prop->Set;
11570 GetFloat(member->initializer->__anon1.exp, &fValue);
11571 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11578 double (* Set)(double) = (void *)prop->Set;
11580 GetDouble(member->initializer->__anon1.exp, &dValue);
11581 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11589 else if(!deepMember && type && _class->type == 2)
11593 if(value->type == 1 && value->__anon1.instance->data)
11595 unsigned int (* Set)(void *) = (void *)prop->Set;
11597 bits = Set(value->__anon1.instance->data);
11599 else if(value->type == 2)
11603 else if(dataMember)
11605 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11606 struct Type * type;
11609 bits = (bits & ~bitMember->mask);
11610 if(!bitMember->dataType)
11611 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11612 type = bitMember->dataType;
11613 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11615 if(!type->__anon1._class->__anon1.registered->dataType)
11616 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11617 type = type->__anon1._class->__anon1.registered->dataType;
11626 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11634 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11643 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11651 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11659 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11667 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11672 bits |= part << bitMember->pos;
11678 if(_class && _class->type == 3)
11680 ComputeExpression(member->initializer->__anon1.exp);
11681 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11683 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11693 if(_class && _class->type == 2)
11695 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11700 FreeInstance(inst);
11704 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11706 if(exp->__anon1.op.op == SIZEOF)
11708 FreeExpContents(exp);
11710 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11714 if(!exp->__anon1.op.exp1)
11716 switch(exp->__anon1.op.op)
11720 struct Expression * exp2 = exp->__anon1.op.exp2;
11722 exp->__anon1.op.exp2 = (((void *)0));
11723 FreeExpContents(exp);
11724 FreeType(exp->expType);
11725 FreeType(exp->destType);
11727 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11733 FreeExpContents(exp);
11734 op1->ops.Neg(exp, op1);
11738 if(op1->ops.BitNot)
11740 FreeExpContents(exp);
11741 op1->ops.BitNot(exp, op1);
11747 FreeExpContents(exp);
11748 op1->ops.Not(exp, op1);
11755 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11757 if(Promote(op2, op1->kind, op1->type->isSigned))
11758 op2->kind = op1->kind, op2->ops = op1->ops;
11759 else if(Promote(op1, op2->kind, op2->type->isSigned))
11760 op1->kind = op2->kind, op1->ops = op2->ops;
11762 switch(exp->__anon1.op.op)
11767 FreeExpContents(exp);
11768 op1->ops.Add(exp, op1, op2);
11774 FreeExpContents(exp);
11775 op1->ops.Sub(exp, op1, op2);
11781 FreeExpContents(exp);
11782 op1->ops.Mul(exp, op1, op2);
11788 FreeExpContents(exp);
11789 op1->ops.Div(exp, op1, op2);
11795 FreeExpContents(exp);
11796 op1->ops.Mod(exp, op1, op2);
11800 if(exp->__anon1.op.exp2)
11802 if(op1->ops.BitAnd)
11804 FreeExpContents(exp);
11805 op1->ops.BitAnd(exp, op1, op2);
11812 FreeExpContents(exp);
11813 op1->ops.BitOr(exp, op1, op2);
11817 if(op1->ops.BitXor)
11819 FreeExpContents(exp);
11820 op1->ops.BitXor(exp, op1, op2);
11824 if(op1->ops.LShift)
11826 FreeExpContents(exp);
11827 op1->ops.LShift(exp, op1, op2);
11831 if(op1->ops.RShift)
11833 FreeExpContents(exp);
11834 op1->ops.RShift(exp, op1, op2);
11840 FreeExpContents(exp);
11841 op1->ops.Equ(exp, op1, op2);
11847 FreeExpContents(exp);
11848 op1->ops.Nqu(exp, op1, op2);
11854 FreeExpContents(exp);
11855 op1->ops.And(exp, op1, op2);
11861 FreeExpContents(exp);
11862 op1->ops.Or(exp, op1, op2);
11868 FreeExpContents(exp);
11869 op1->ops.Grt(exp, op1, op2);
11875 FreeExpContents(exp);
11876 op1->ops.Sma(exp, op1, op2);
11880 if(op1->ops.GrtEqu)
11882 FreeExpContents(exp);
11883 op1->ops.GrtEqu(exp, op1, op2);
11887 if(op1->ops.SmaEqu)
11889 FreeExpContents(exp);
11890 op1->ops.SmaEqu(exp, op1, op2);
11898 void ApplyAnyObjectLogic(struct Expression * e)
11900 struct Type * destType = e->destType;
11902 if(destType && (destType->classObjectType == 3))
11904 if(e && e->expType)
11906 struct Type * type = e->expType;
11907 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11909 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11911 _class = type->__anon1._class->__anon1.registered;
11913 else if(type->kind == 19)
11915 _class = FindClass("ecere::com::Class")->__anon1.registered;
11919 char string[1024] = "";
11920 struct Symbol * classSym;
11922 PrintTypeNoConst(type, string, 0, 1);
11923 classSym = FindClass(string);
11925 _class = classSym->__anon1.registered;
11927 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)))
11929 if(!_class || strcmp(_class->fullName, "char *"))
11931 struct Expression * checkedExp = e, * newExp;
11933 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11935 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11937 if(checkedExp->type == 23)
11939 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11942 checkedExp = (*checkedExp->__anon1.list).last;
11944 else if(checkedExp->type == 11)
11945 checkedExp = checkedExp->__anon1.cast.exp;
11947 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11949 newExp = checkedExp->__anon1.op.exp2;
11950 checkedExp->__anon1.op.exp2 = (((void *)0));
11951 FreeExpContents(checkedExp);
11952 if(e->expType && e->expType->passAsTemplate)
11956 ComputeTypeSize(e->expType);
11957 sprintf(size, "%d", e->expType->size);
11958 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))))));
11960 ReplaceExpContents(checkedExp, newExp);
11961 e->byReference = 1;
11963 else if(!e->byReference || (_class && _class->type == 5))
11965 struct Expression * checkedExp;
11968 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;
11970 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11972 struct Context * context = PushContext();
11973 struct Declarator * decl;
11974 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11975 char typeString[1024];
11976 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11978 typeString[0] = '\0';
11980 newExp->prev = (((void *)0));
11981 newExp->next = (((void *)0));
11982 newExp->expType = (((void *)0));
11983 PrintTypeNoConst(e->expType, typeString, 0, 1);
11984 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11985 newExp->destType = ProcessType(specs, decl);
11986 curContext = context;
11990 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
11993 sprintf(name, "__internalValue%03X", internalValueCounter++);
11994 if(!curCompound->__anon1.compound.declarations)
11995 curCompound->__anon1.compound.declarations = MkList();
11996 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
11997 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
11998 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
11999 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12002 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12004 struct Type * type = e->destType;
12006 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12007 CopyTypeInto(e->destType, type);
12008 e->destType->refCount = 1;
12009 e->destType->classObjectType = 0;
12012 e->__anon1.compound->__anon1.compound.context = context;
12013 PopContext(context);
12014 curContext = context->parent;
12018 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12020 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12022 if(checkedExp->type == 23)
12024 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12027 checkedExp = (*checkedExp->__anon1.list).last;
12029 else if(checkedExp->type == 11)
12030 checkedExp = checkedExp->__anon1.cast.exp;
12033 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12035 *operand = *checkedExp;
12036 __ecereMethod_Expression_Clear(checkedExp);
12037 checkedExp->destType = ProcessTypeString("void *", 0);
12038 checkedExp->expType = checkedExp->destType;
12039 checkedExp->destType->refCount++;
12040 checkedExp->type = 4;
12041 checkedExp->__anon1.op.op = '&';
12042 checkedExp->__anon1.op.exp1 = (((void *)0));
12043 checkedExp->__anon1.op.exp2 = operand;
12052 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))))
12054 if(e->expType->classObjectType && destType && destType->classObjectType)
12060 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12063 thisExp->prev = (((void *)0));
12064 thisExp->next = (((void *)0));
12065 __ecereMethod_Expression_Clear(e);
12067 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12068 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12069 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12071 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12072 CopyTypeInto(e->expType, thisExp->expType);
12073 e->expType->byReference = 0;
12074 e->expType->refCount = 1;
12075 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))
12077 e->expType->classObjectType = 0;
12082 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12084 if(destType->kind == 14)
12086 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12088 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))
12090 unsigned int byReference = e->expType->byReference;
12091 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12092 struct Declarator * decl;
12093 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12094 char typeString[1024];
12095 struct Type * type;
12096 int backupClassObjectType;
12097 unsigned int backupByReference;
12099 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12103 backupClassObjectType = type->classObjectType;
12104 backupByReference = type->byReference;
12105 type->classObjectType = 0;
12106 type->byReference = 0;
12107 typeString[0] = '\0';
12108 PrintType(type, typeString, 0, 1);
12109 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12110 type->classObjectType = backupClassObjectType;
12111 type->byReference = backupByReference;
12113 thisExp->prev = (((void *)0));
12114 thisExp->next = (((void *)0));
12115 __ecereMethod_Expression_Clear(e);
12116 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)))
12118 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12121 destType->refCount++;
12123 e->__anon1.op.op = '*';
12124 e->__anon1.op.exp1 = (((void *)0));
12125 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12126 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12127 CopyTypeInto(t, thisExp->destType);
12128 t->passAsTemplate = 0;
12129 FreeType(thisExp->destType);
12130 thisExp->destType = t;
12131 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12132 CopyTypeInto(t, destType);
12133 t->passAsTemplate = passAsTemplate;
12134 FreeType(destType);
12136 destType->refCount = 0;
12137 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12138 CopyTypeInto(e->expType, type);
12139 if(type->passAsTemplate)
12141 e->expType->classObjectType = 0;
12142 e->expType->passAsTemplate = 0;
12144 e->expType->byReference = 0;
12145 e->expType->refCount = 1;
12150 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12151 e->__anon1.cast.exp = thisExp;
12152 e->byReference = 1;
12157 FreeType(e->destType);
12158 e->destType = destType;
12159 destType->refCount++;
12164 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12166 struct __ecereNameSpace__ecere__com__Class * _class;
12167 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12169 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12170 ComputeModuleClasses(subModule->data);
12171 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12172 ComputeClassMembers(_class, 0);
12175 int ComputeTypeSize(struct Type * type)
12177 unsigned int size = type ? type->size : 0;
12179 if(!size && type && !type->computing)
12181 type->computing = 1;
12185 type->alignment = size = sizeof(char);
12188 type->alignment = size = sizeof(char);
12191 type->alignment = size = sizeof(int);
12194 type->alignment = size = sizeof(long long);
12197 type->alignment = size = targetBits / 8;
12198 type->pointerAlignment = 1;
12201 type->alignment = size = targetBits / 8;
12202 type->pointerAlignment = 1;
12205 type->alignment = size = sizeof(long);
12208 type->alignment = size = sizeof(short);
12211 type->alignment = size = sizeof(float);
12214 type->alignment = size = sizeof(double);
12218 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12220 if(_class && _class->type == 1)
12222 ComputeClassMembers(_class, 0);
12223 type->alignment = _class->structAlignment;
12224 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12225 size = _class->structSize;
12226 if(type->alignment && size % type->alignment)
12227 size += type->alignment - (size % type->alignment);
12229 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12231 if(!_class->dataType)
12232 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12233 size = type->alignment = ComputeTypeSize(_class->dataType);
12237 size = type->alignment = targetBits / 8;
12238 type->pointerAlignment = 1;
12244 size = type->alignment = targetBits / 8;
12245 type->pointerAlignment = 1;
12248 if(type->__anon1.__anon4.arraySizeExp)
12250 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12251 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12252 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)))
12254 struct Location oldLoc = yylloc;
12255 char expression[10240];
12257 expression[0] = '\0';
12258 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12259 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12261 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12262 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12265 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12267 else if(type->__anon1.__anon4.enumClass)
12269 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12271 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12274 type->__anon1.__anon4.arraySize = 0;
12278 type->__anon1.__anon4.arraySize = 0;
12280 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12281 if(type->__anon1.type)
12283 type->alignment = type->__anon1.type->alignment;
12284 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12289 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12291 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12293 if(symbol && symbol->type)
12295 ComputeTypeSize(symbol->type);
12296 size = symbol->type->size;
12301 struct Type * member;
12303 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12305 int __simpleStruct0, __simpleStruct1;
12306 unsigned int addSize = ComputeTypeSize(member);
12308 member->offset = size;
12309 if(member->alignment && size % member->alignment)
12310 member->offset += member->alignment - (size % member->alignment);
12311 size = member->offset;
12312 if(member->pointerAlignment && type->size <= 4)
12313 type->pointerAlignment = 1;
12314 else if(!member->pointerAlignment && member->alignment >= 8)
12315 type->pointerAlignment = 0;
12316 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12319 if(type->alignment && size % type->alignment)
12320 size += type->alignment - (size % type->alignment);
12326 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12328 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12330 if(symbol && symbol->type)
12332 ComputeTypeSize(symbol->type);
12333 size = symbol->type->size;
12334 type->alignment = symbol->type->alignment;
12339 struct Type * member;
12341 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12343 int __simpleStruct0, __simpleStruct1;
12344 unsigned int addSize = ComputeTypeSize(member);
12346 member->offset = size;
12347 if(member->alignment && size % member->alignment)
12348 member->offset += member->alignment - (size % member->alignment);
12349 size = member->offset;
12350 if(member->pointerAlignment && type->size <= 4)
12351 type->pointerAlignment = 1;
12352 else if(!member->pointerAlignment && member->alignment >= 8)
12353 type->pointerAlignment = 0;
12354 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12355 size = ((size > addSize) ? size : addSize);
12357 if(type->alignment && size % type->alignment)
12358 size += type->alignment - (size % type->alignment);
12364 struct TemplateParameter * param = type->__anon1.templateParameter;
12365 struct Type * baseType = ProcessTemplateParameterType(param);
12369 size = ComputeTypeSize(baseType);
12370 type->alignment = baseType->alignment;
12371 type->pointerAlignment = baseType->pointerAlignment;
12374 type->alignment = size = sizeof(uint64);
12379 type->alignment = size = sizeof(enum
12387 type->alignment = size = targetBits / 8;
12388 type->pointerAlignment = 1;
12393 type->computing = 0;
12398 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12400 struct External * external = (((void *)0));
12401 struct Symbol * classSym = FindClass(name);
12402 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12403 struct Specifier * curSpec = (((void *)0));
12405 if(!inCompiler || !classSym)
12406 return (((void *)0));
12407 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12408 return (((void *)0));
12409 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12410 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12411 external = classSym->__anon2.__anon1.structExternal;
12412 if(external && external->__anon1.declaration)
12414 struct Specifier * spec;
12416 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12417 if(spec->type == 3 || spec->type == 4)
12420 curDeclarations = spec->__anon1.__anon2.definitions;
12424 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12426 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12427 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12428 char structName[1024];
12429 unsigned int addedPadding = 0;
12431 classSym->declaring++;
12432 if(strchr(classSym->string, '<'))
12434 if(classSym->__anon1.registered->templateClass)
12436 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12437 classSym->declaring--;
12441 structName[0] = (char)0;
12442 FullClassNameCat(structName, name, 0);
12443 classSym->declaredStructSym = 1;
12444 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12446 unsigned int add = 0;
12450 external = MkExternalDeclaration((((void *)0)));
12451 classSym->__anon2.__anon1.structExternal = external;
12452 external->symbol = classSym;
12457 declarations = MkList();
12458 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12460 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12462 FreeList(declarations, (void *)(FreeClassDef));
12463 declarations = (((void *)0));
12465 if(classSym->__anon1.registered->type != 5 && !declarations)
12467 FreeExternal(external);
12468 external = (((void *)0));
12469 classSym->__anon2.__anon1.structExternal = (((void *)0));
12474 curSpec->__anon1.__anon2.definitions = declarations;
12477 char className[1024];
12479 strcpy(className, "__ecereClass_");
12480 FullClassNameCat(className, classSym->string, 1);
12481 specifiers = MkList();
12482 declarators = MkList();
12483 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12484 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12487 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12490 classSym->declaring--;
12492 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12494 classSym->declaredStructSym = 1;
12495 if(classSym->__anon1.registered)
12496 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12497 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12499 struct Specifier * spec;
12501 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12503 if(spec->__anon1.__anon2.definitions)
12504 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12508 if(inCompiler && neededBy && (external || !classSym->imported))
12512 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12513 external->symbol = classSym;
12514 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12518 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12520 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12521 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12524 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12529 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)
12531 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12532 unsigned int found = 0;
12533 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12534 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12535 unsigned int freeType = 0;
12537 yylloc = member->loc;
12542 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12546 dataMember = *curMember;
12552 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12553 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12554 int _subMemberStackPos = 0;
12557 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12560 dataMember = thisMember;
12561 if(curMember && thisMember->memberAccess == 1)
12563 *curMember = thisMember;
12564 *curClass = thisMember->_class;
12565 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12566 *subMemberStackPos = _subMemberStackPos;
12572 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12573 if(method && method->type == 1)
12576 method = (((void *)0));
12581 struct Type * type = (((void *)0));
12585 if(!dataMember->dataType && dataMember->dataTypeString)
12587 struct Context * context = SetupTemplatesContext(_class);
12589 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12590 FinishTemplatesContext(context);
12592 type = dataMember->dataType;
12596 if(!method->dataType)
12597 ProcessMethodType(method);
12598 type = method->dataType;
12600 if(ident && ident->next)
12602 for(ident = ident->next; ident && type; ident = ident->next)
12604 if(type->kind == 8)
12606 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12608 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12610 type = dataMember->dataType;
12612 else if(type->kind == 9 || type->kind == 10)
12614 struct Type * memberType;
12616 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12618 if(!strcmp(memberType->name, ident->string))
12627 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12630 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12631 struct __ecereNameSpace__ecere__com__Class * sClass;
12633 for(sClass = _class; sClass; sClass = sClass->base)
12636 if(sClass->templateClass)
12637 sClass = sClass->templateClass;
12638 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12640 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12642 for(sClass = sClass->base; sClass; sClass = sClass->base)
12644 if(sClass->templateClass)
12645 sClass = sClass->templateClass;
12646 id += sClass->templateParams.count;
12657 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12659 if(arg.__anon1.__anon1.dataTypeString)
12661 unsigned int constant = type->constant;
12663 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12664 if(type->kind == 8 && constant)
12665 type->constant = 1;
12666 else if(type->kind == 13)
12668 struct Type * t = type->__anon1.type;
12670 while(t->kind == 13)
12671 t = t->__anon1.type;
12673 t->constant = constant;
12676 if(type && _class->templateClass)
12677 type->passAsTemplate = 1;
12684 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12686 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12687 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12688 int paramCount = 0;
12689 int lastParam = -1;
12690 char templateString[1024];
12691 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12693 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12694 for(cClass = expClass; cClass; cClass = cClass->base)
12698 if(cClass->templateClass)
12699 cClass = cClass->templateClass;
12700 for(param = cClass->templateParams.first; param; param = param->next)
12703 struct __ecereNameSpace__ecere__com__Class * sClass;
12704 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12706 for(sClass = cClass->base; sClass; sClass = sClass->base)
12708 if(sClass->templateClass)
12709 sClass = sClass->templateClass;
12710 id += sClass->templateParams.count;
12712 arg = expClass->templateArgs[id];
12713 for(sClass = _class; sClass; sClass = sClass->base)
12715 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12717 struct __ecereNameSpace__ecere__com__Class * nextClass;
12719 if(sClass->templateClass)
12720 sClass = sClass->templateClass;
12721 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12723 if(nextClass->templateClass)
12724 nextClass = nextClass->templateClass;
12725 p += nextClass->templateParams.count;
12727 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12729 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12731 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12733 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12734 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12741 char argument[256];
12743 argument[0] = '\0';
12744 switch(param->type)
12748 char expString[1024];
12749 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12750 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12751 struct Expression * exp;
12752 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12754 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12755 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12756 ProcessExpressionType(exp);
12757 ComputeExpression(exp);
12758 expString[0] = '\0';
12759 PrintExpression(exp, expString);
12760 strcat(argument, expString);
12761 FreeExpression(exp);
12766 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12771 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12772 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12779 strcat(templateString, ", ");
12780 if(lastParam != p - 1)
12782 strcat(templateString, param->name);
12783 strcat(templateString, " = ");
12785 strcat(templateString, argument);
12794 int len = strlen(templateString);
12796 if(templateString[len - 1] == '<')
12800 if(templateString[len - 1] == '>')
12801 templateString[len++] = ' ';
12802 templateString[len++] = '>';
12804 templateString[len++] = '\0';
12807 struct Context * context = SetupTemplatesContext(_class);
12811 type = ProcessTypeString(templateString, 0);
12813 FinishTemplatesContext(context);
12816 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12818 ProcessExpressionType(member->initializer->__anon1.exp);
12819 if(!member->initializer->__anon1.exp->expType)
12823 char expString[10240];
12825 expString[0] = '\0';
12826 PrintExpression(member->initializer->__anon1.exp, expString);
12827 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12828 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12831 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12833 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12836 else if(member->initializer)
12838 ProcessInitializer(member->initializer, type);
12845 if(_class && _class->type == 3)
12847 if(member->initializer)
12849 struct Type * type = MkClassType(_class->fullName);
12851 ProcessInitializer(member->initializer, type);
12857 if(member->initializer)
12859 ProcessInitializer(member->initializer, (((void *)0)));
12865 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12869 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12871 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12875 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12880 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12882 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12884 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)))
12886 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12888 if(_class->type == 4)
12890 struct __ecereNameSpace__ecere__sys__OldList converts =
12894 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12897 if(!_class->symbol)
12898 _class->symbol = FindClass(_class->fullName);
12899 type->__anon1._class = _class->symbol;
12900 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))
12902 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12903 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12907 struct __ecereNameSpace__ecere__com__Class * baseClass;
12909 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12911 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12913 for(value = e->values.first; value; value = value->next)
12915 if(!strcmp(value->name, string))
12920 FreeType(sourceExp->expType);
12921 sourceExp->isConstant = 1;
12922 sourceExp->expType = MkClassType(baseClass->fullName);
12923 if(inCompiler || inPreCompiler || inDebugger)
12925 char constant[256];
12927 FreeExpContents(sourceExp);
12928 sourceExp->type = 2;
12929 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12930 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12932 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12933 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12935 while(converts.first)
12937 struct Conversion * convert = converts.first;
12939 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12940 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12942 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12949 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12950 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12953 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)))
12954 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12959 void ComputeExpression(struct Expression * exp)
12965 struct Identifier * id = exp->__anon1.__anon1.identifier;
12967 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12969 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12971 if(c && c->type == 4)
12973 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12977 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12978 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
12980 for(value = e->values.first; value; value = value->next)
12982 if(!strcmp(value->name, id->string))
12987 const char * dts = c->dataTypeString;
12989 FreeExpContents(exp);
12991 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13000 ComputeInstantiation(exp);
13005 struct Expression * exp1, * exp2 = (((void *)0));
13006 struct Operand op1 =
13013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13016 struct Operand op2 =
13023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13027 if(exp->__anon1.op.exp2)
13029 struct Expression * e = exp->__anon1.op.exp2;
13031 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13033 if(e->type == 5 || e->type == 32 || e->type == 23)
13036 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13038 e = (*e->__anon1.list).last;
13041 if(exp->__anon1.op.op == 261 && e && e->expType)
13043 if(e->type == 3 && e->__anon1.__anon2.string)
13045 char * string = e->__anon1.__anon2.string;
13046 int len = strlen(string);
13047 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13049 len = UnescapeString(tmp, string + 1, len - 2);
13050 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13051 FreeExpContents(exp);
13053 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13057 struct Type * type = e->expType;
13060 FreeExpContents(exp);
13062 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13068 ComputeExpression(exp->__anon1.op.exp2);
13070 if(exp->__anon1.op.exp1)
13072 ComputeExpression(exp->__anon1.op.exp1);
13073 exp1 = exp->__anon1.op.exp1;
13074 exp2 = exp->__anon1.op.exp2;
13075 op1 = GetOperand(exp1);
13077 op1.type->refCount++;
13080 op2 = GetOperand(exp2);
13082 op2.type->refCount++;
13087 exp1 = exp->__anon1.op.exp2;
13088 op1 = GetOperand(exp1);
13090 op1.type->refCount++;
13092 CallOperator(exp, exp1, exp2, &op1, &op2);
13094 FreeType(op1.type);
13096 FreeType(op2.type);
13102 struct Expression * e, * n;
13104 for(e = (*exp->__anon1.list).first; e; e = n)
13109 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13110 struct Expression * prev = exp->prev;
13111 struct Expression * next = exp->next;
13113 ComputeExpression(e);
13114 FreeType(exp->expType);
13115 FreeType(exp->destType);
13119 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13120 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13131 struct Expression * memberExp = exp->__anon1.member.exp;
13132 struct Identifier * memberID = exp->__anon1.member.member;
13133 struct Type * type;
13135 ComputeExpression(exp->__anon1.member.exp);
13136 type = exp->__anon1.member.exp->expType;
13139 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)));
13140 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13141 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13142 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13144 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13145 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13149 struct Symbol * classSym;
13152 PrintTypeNoConst(type, string, 0, 1);
13153 classSym = FindClass(string);
13154 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13156 if(exp->__anon1.member.member)
13158 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13160 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13162 if(!prop && !member && _class && exp->__anon1.member.member)
13164 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13166 convertTo = _class;
13167 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13168 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13174 struct Type * type = prop->dataType;
13176 if(_class->type == 3)
13178 if(type->kind == 8)
13180 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13182 if(_class->type == 3)
13184 if(!_class->dataType)
13185 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13186 type = _class->dataType;
13194 float (* Get)(float) = (void *)prop->Get;
13196 GetFloat(exp->__anon1.member.exp, &value);
13197 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13204 double (* Get)(double);
13206 GetDouble(exp->__anon1.member.exp, &value);
13208 Get = (void *)prop->Set;
13210 Get = (void *)prop->Get;
13211 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13221 struct Expression * value = exp->__anon1.member.exp;
13222 struct Type * type;
13224 if(!prop->dataType)
13225 ProcessPropertyType(prop);
13226 type = prop->dataType;
13230 else if(_class->type == 1)
13236 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13238 if(propertyClass->type == 1 && value->type == 1)
13240 void (* Set)(void *, void *) = (void *)prop->Set;
13242 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13243 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13244 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13245 exp->__anon1.instance->loc = exp->loc;
13247 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13248 PopulateInstance(exp->__anon1.instance);
13255 void (* Set)(void *, int) = (void *)prop->Set;
13257 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13258 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13259 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13260 exp->__anon1.instance->loc = exp->loc;
13262 GetInt(value, &intValue);
13263 Set(exp->__anon1.instance->data, intValue);
13264 PopulateInstance(exp->__anon1.instance);
13269 long long intValue;
13270 void (* Set)(void *, long long) = (void *)prop->Set;
13272 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13273 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13274 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13275 exp->__anon1.instance->loc = exp->loc;
13277 GetInt64(value, &intValue);
13278 Set(exp->__anon1.instance->data, intValue);
13279 PopulateInstance(exp->__anon1.instance);
13285 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13287 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13288 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13289 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13290 exp->__anon1.instance->loc = exp->loc;
13292 GetIntPtr(value, &intValue);
13293 Set(exp->__anon1.instance->data, intValue);
13294 PopulateInstance(exp->__anon1.instance);
13300 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13302 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13303 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13304 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13305 exp->__anon1.instance->loc = exp->loc;
13307 GetIntSize(value, &intValue);
13308 Set(exp->__anon1.instance->data, intValue);
13309 PopulateInstance(exp->__anon1.instance);
13315 void (* Set)(void *, float) = (void *)prop->Set;
13317 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13318 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13319 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13320 exp->__anon1.instance->loc = exp->loc;
13322 GetFloat(value, &floatValue);
13323 Set(exp->__anon1.instance->data, floatValue);
13324 PopulateInstance(exp->__anon1.instance);
13329 double doubleValue;
13330 void (* Set)(void *, double) = (void *)prop->Set;
13332 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13333 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13334 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13335 exp->__anon1.instance->loc = exp->loc;
13337 GetDouble(value, &doubleValue);
13338 Set(exp->__anon1.instance->data, doubleValue);
13339 PopulateInstance(exp->__anon1.instance);
13344 else if(_class->type == 2)
13350 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13352 if(propertyClass->type == 1 && value->__anon1.instance->data)
13354 unsigned int (* Set)(void *) = (void *)prop->Set;
13355 unsigned int bits = Set(value->__anon1.instance->data);
13357 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13361 else if(_class->type == 2)
13363 unsigned int value;
13364 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13367 GetUInt(exp->__anon1.member.exp, &value);
13369 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13378 if(_class->type == 2)
13380 unsigned int value;
13382 GetUInt(exp->__anon1.member.exp, &value);
13387 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13389 if(_class->type == 1)
13391 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13393 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13394 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13395 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13396 exp->__anon1.instance->loc = exp->loc;
13398 Get(value, exp->__anon1.instance->data);
13399 PopulateInstance(exp->__anon1.instance);
13401 else if(_class->type == 2)
13403 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13404 uint64 bits = Get(value);
13406 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13413 else if(_class->type == 1)
13415 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13421 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13423 if(_class->type == 1 && value)
13425 void (* Get)(void *, void *) = (void *)prop->Get;
13427 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13428 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13429 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13430 exp->__anon1.instance->loc = exp->loc;
13432 Get(value, exp->__anon1.instance->data);
13433 PopulateInstance(exp->__anon1.instance);
13444 exp->isConstant = 0;
13453 FreeExpression(memberExp);
13454 FreeIdentifier(memberID);
13460 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13462 FreeExpContents(exp);
13463 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13470 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13472 if(classSym && classSym->__anon1.registered)
13474 if(classSym->__anon1.registered->fixed)
13476 FreeSpecifier(exp->__anon1._class);
13477 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13482 char className[1024];
13484 strcpy(className, "__ecereClass_");
13485 FullClassNameCat(className, classSym->string, 1);
13486 DeclareClass(curExternal, classSym, className);
13487 FreeExpContents(exp);
13489 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13490 exp->__anon1.member.member = MkIdentifier("structSize");
13497 struct Type * type;
13498 struct Expression * e = exp;
13500 if(exp->type == 11)
13502 if(exp->__anon1.cast.exp)
13503 ComputeExpression(exp->__anon1.cast.exp);
13504 e = exp->__anon1.cast.exp;
13506 if(e && exp->expType)
13508 type = exp->expType;
13509 if(type->kind == 8)
13511 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13513 if(_class && (_class->type == 3 || _class->type == 2))
13515 if(!_class->dataType)
13516 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13517 type = _class->dataType;
13526 char value = (char)0;
13528 if(GetChar(e, &value))
13530 FreeExpContents(exp);
13531 exp->__anon1.__anon1.constant = PrintChar(value);
13537 unsigned char value = (unsigned char)0;
13539 if(GetUChar(e, &value))
13541 FreeExpContents(exp);
13542 exp->__anon1.__anon1.constant = PrintUChar(value);
13550 short value = (short)0;
13552 if(GetShort(e, &value))
13554 FreeExpContents(exp);
13555 exp->__anon1.__anon1.constant = PrintShort(value);
13561 unsigned short value = (unsigned short)0;
13563 if(GetUShort(e, &value))
13565 FreeExpContents(exp);
13566 exp->__anon1.__anon1.constant = PrintUShort(value);
13576 if(GetInt(e, &value))
13578 FreeExpContents(exp);
13579 exp->__anon1.__anon1.constant = PrintInt(value);
13585 unsigned int value = 0;
13587 if(GetUInt(e, &value))
13589 FreeExpContents(exp);
13590 exp->__anon1.__anon1.constant = PrintUInt(value);
13598 long long value = 0;
13600 if(GetInt64(e, &value))
13602 FreeExpContents(exp);
13603 exp->__anon1.__anon1.constant = PrintInt64(value);
13611 if(GetUInt64(e, &value))
13613 FreeExpContents(exp);
13614 exp->__anon1.__anon1.constant = PrintUInt64(value);
13622 intptr_t value = 0;
13624 if(GetIntPtr(e, &value))
13626 FreeExpContents(exp);
13627 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13633 uintptr_t value = 0;
13635 if(GetUIntPtr(e, &value))
13637 FreeExpContents(exp);
13638 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13648 if(GetIntSize(e, &value))
13650 FreeExpContents(exp);
13651 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13659 if(GetUIntSize(e, &value))
13661 FreeExpContents(exp);
13662 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13671 if(GetFloat(e, &value))
13673 FreeExpContents(exp);
13674 exp->__anon1.__anon1.constant = PrintFloat(value);
13683 if(GetDouble(e, &value))
13685 FreeExpContents(exp);
13686 exp->__anon1.__anon1.constant = PrintDouble(value);
13697 struct Operand op1 =
13704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13707 struct Operand op2 =
13714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13717 struct Operand op3 =
13724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13728 if(exp->__anon1.cond.exp)
13729 ComputeExpression((*exp->__anon1.cond.exp).last);
13730 if(exp->__anon1.cond.elseExp)
13731 ComputeExpression(exp->__anon1.cond.elseExp);
13732 if(exp->__anon1.cond.cond)
13733 ComputeExpression(exp->__anon1.cond.cond);
13734 op1 = GetOperand(exp->__anon1.cond.cond);
13736 op1.type->refCount++;
13737 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13739 op2.type->refCount++;
13740 op3 = GetOperand(exp->__anon1.cond.elseExp);
13742 op3.type->refCount++;
13745 FreeExpContents(exp);
13746 op1.ops.Cond(exp, &op1, &op2, &op3);
13749 FreeType(op1.type);
13751 FreeType(op2.type);
13753 FreeType(op3.type);
13759 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13761 struct __ecereNameSpace__ecere__com__Instance * module;
13763 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))
13765 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))
13767 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))
13769 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)
13771 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13777 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13779 struct Type * source;
13780 struct Type * realDest = dest;
13781 struct Type * backupSourceExpType = (((void *)0));
13782 struct Expression * computedExp = sourceExp;
13785 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)
13787 computedExp = CopyExpression(sourceExp);
13788 ComputeExpression(computedExp);
13790 source = sourceExp->expType;
13791 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13793 if(computedExp != sourceExp)
13795 FreeExpression(computedExp);
13796 computedExp = sourceExp;
13801 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13803 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13805 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13807 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13809 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13811 if(sourceBase == destBase)
13813 if(computedExp != sourceExp)
13815 FreeExpression(computedExp);
13816 computedExp = sourceExp;
13825 struct __ecereNameSpace__ecere__sys__OldList * specs;
13826 unsigned int flag = 0;
13827 long long value = (((int)0x7fffffff));
13829 source->refCount++;
13830 if(computedExp->type == 2)
13832 if(source->isSigned)
13833 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13835 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13837 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13839 if(source->isSigned)
13840 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13842 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13844 if(computedExp != sourceExp)
13846 FreeExpression(computedExp);
13847 computedExp = sourceExp;
13849 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
13852 source = __extension__ ({
13853 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13855 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13858 if(dest->kind == 8)
13860 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13862 if(_class && _class->type == 3)
13864 if(source->kind != 8)
13866 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13867 struct Type * tempDest, * tempSource;
13869 for(; _class->base->type != 1000; _class = _class->base)
13872 tempDest = tempType;
13873 tempType->kind = 8;
13874 if(!_class->symbol)
13875 _class->symbol = FindClass(_class->fullName);
13876 tempType->__anon1._class = _class->symbol;
13877 tempType->truth = dest->truth;
13878 if(tempType->__anon1._class)
13879 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13880 backupSourceExpType = sourceExp->expType;
13881 if(dest->passAsTemplate)
13883 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13884 CopyTypeInto(sourceExp->expType, dest);
13885 sourceExp->expType->passAsTemplate = 0;
13889 sourceExp->expType = dest;
13893 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13896 if(_class && _class->type == 2 && source->kind != 8)
13898 if(!dest->__anon1._class->__anon1.registered->dataType)
13899 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13900 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13903 FreeType(sourceExp->expType);
13904 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13905 source->refCount++;
13908 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13910 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13911 struct Declarator * decl;
13914 ReadString(string, sourceExp->__anon1.__anon2.string);
13915 decl = SpecDeclFromString(string, specs, (((void *)0)));
13916 FreeExpContents(sourceExp);
13917 FreeType(sourceExp->expType);
13918 sourceExp->type = 24;
13919 sourceExp->__anon1._classExp.specifiers = specs;
13920 sourceExp->__anon1._classExp.decl = decl;
13921 sourceExp->expType = dest;
13925 if(backupSourceExpType)
13926 FreeType(backupSourceExpType);
13930 else if(source->kind == 8)
13932 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13934 if(_class && (_class->type == 3 || _class->type == 2))
13936 if(dest->kind != 8)
13938 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13939 struct Type * tempDest, * tempSource;
13941 if(!source->__anon1._class->__anon1.registered->dataType)
13942 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13943 for(; _class->base->type != 1000; _class = _class->base)
13946 tempSource = tempType;
13947 tempType->kind = 8;
13948 tempType->__anon1._class = FindClass(_class->fullName);
13949 tempType->truth = source->truth;
13950 tempType->classObjectType = source->classObjectType;
13951 if(tempType->__anon1._class)
13952 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13953 if(conversions && conversions->last)
13955 ((struct Conversion *)conversions->last)->resultType = dest;
13958 FreeType(sourceExp->expType);
13959 sourceExp->expType = MkClassType(_class->fullName);
13960 sourceExp->expType->truth = source->truth;
13961 sourceExp->expType->classObjectType = source->classObjectType;
13962 if(!sourceExp->destType)
13964 FreeType(sourceExp->destType);
13965 sourceExp->destType = sourceExp->expType;
13966 if(sourceExp->expType)
13967 sourceExp->expType->refCount++;
13969 if(!_class->dataType)
13970 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13972 dest = MkClassType(source->__anon1._class->string);
13973 dest->truth = source->truth;
13974 dest->classObjectType = source->classObjectType;
13976 source = _class->dataType;
13977 source->refCount++;
13978 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13984 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13991 if(dest->kind == 8)
13993 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13994 unsigned int fittingValue = 0;
13996 if(_class && _class->type == 4)
13998 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13999 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14001 if(c && value >= 0 && value <= c->largest)
14004 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14006 if(_class->type == 0 || _class->type == 5)
14008 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14010 *newExp = *sourceExp;
14011 if(sourceExp->destType)
14012 sourceExp->destType->refCount++;
14013 if(sourceExp->expType)
14014 sourceExp->expType->refCount++;
14015 sourceExp->type = 11;
14016 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14017 sourceExp->__anon1.cast.exp = newExp;
14018 FreeType(sourceExp->expType);
14019 sourceExp->expType = (((void *)0));
14020 ProcessExpressionType(sourceExp);
14023 FreeType(sourceExp->expType);
14024 sourceExp->expType = dest;
14029 if(backupSourceExpType)
14030 FreeType(backupSourceExpType);
14033 if(!_class->dataType)
14034 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14036 dest = _class->dataType;
14039 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))
14041 specs = MkListOne(MkSpecifier(DOUBLE));
14043 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))
14045 specs = MkListOne(MkSpecifier(FLOAT));
14047 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))
14050 if(!dest->isSigned)
14051 ListAdd(specs, MkSpecifier(UNSIGNED));
14052 ListAdd(specs, MkSpecifier(INT64));
14054 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14057 if(!dest->isSigned)
14058 ListAdd(specs, MkSpecifier(UNSIGNED));
14059 ListAdd(specs, MkSpecifier(INT));
14061 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14064 if(!dest->isSigned)
14065 ListAdd(specs, MkSpecifier(UNSIGNED));
14066 ListAdd(specs, MkSpecifier(SHORT));
14068 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14071 if(!dest->isSigned)
14072 ListAdd(specs, MkSpecifier(UNSIGNED));
14073 ListAdd(specs, MkSpecifier(CHAR));
14079 if(backupSourceExpType)
14081 if(sourceExp->expType)
14082 FreeType(sourceExp->expType);
14083 sourceExp->expType = backupSourceExpType;
14088 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))
14090 specs = MkListOne(MkSpecifier(DOUBLE));
14092 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))
14094 specs = MkListOne(MkSpecifier(FLOAT));
14096 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14099 ListAdd(specs, MkSpecifier(BOOL));
14101 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)))
14104 if(!dest->isSigned)
14105 ListAdd(specs, MkSpecifier(UNSIGNED));
14106 ListAdd(specs, MkSpecifier(CHAR));
14108 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)))))
14111 if(!dest->isSigned)
14112 ListAdd(specs, MkSpecifier(UNSIGNED));
14113 ListAdd(specs, MkSpecifier(SHORT));
14115 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14118 if(!dest->isSigned)
14119 ListAdd(specs, MkSpecifier(UNSIGNED));
14120 ListAdd(specs, MkSpecifier(INT));
14122 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14125 if(!dest->isSigned)
14126 ListAdd(specs, MkSpecifier(UNSIGNED));
14127 ListAdd(specs, MkSpecifier(INT64));
14129 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14131 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14137 if(backupSourceExpType)
14139 if(sourceExp->expType)
14140 FreeType(sourceExp->expType);
14141 sourceExp->expType = backupSourceExpType;
14145 if(!flag && !sourceExp->opDestType)
14147 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14149 *newExp = *sourceExp;
14150 newExp->prev = (((void *)0));
14151 newExp->next = (((void *)0));
14152 if(sourceExp->destType)
14153 sourceExp->destType->refCount++;
14154 if(sourceExp->expType)
14155 sourceExp->expType->refCount++;
14156 sourceExp->type = 11;
14157 if(realDest->kind == 8)
14159 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14160 FreeList(specs, (void *)(FreeSpecifier));
14163 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14164 if(newExp->type == 4)
14166 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14169 sourceExp->__anon1.cast.exp = newExp;
14170 FreeType(sourceExp->expType);
14171 sourceExp->expType = (((void *)0));
14172 ProcessExpressionType(sourceExp);
14175 FreeList(specs, (void *)(FreeSpecifier));
14178 if(backupSourceExpType)
14179 FreeType(backupSourceExpType);
14184 if(computedExp != sourceExp)
14186 FreeExpression(computedExp);
14187 computedExp = sourceExp;
14189 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14190 sourceExp = (*sourceExp->__anon1.list).last;
14191 if(sourceExp->type == 0)
14193 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14195 if(dest->kind == 8)
14197 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14199 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14200 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14204 for(; _class && _class->type == 4; _class = _class->base)
14206 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14207 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14209 for(value = e->values.first; value; value = value->next)
14211 if(!strcmp(value->name, id->string))
14216 FreeType(sourceExp->expType);
14217 sourceExp->isConstant = 1;
14218 sourceExp->expType = MkClassType(_class->fullName);
14219 if(inCompiler || inPreCompiler || inDebugger)
14221 FreeExpContents(sourceExp);
14222 sourceExp->type = 2;
14223 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14224 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14226 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14235 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14246 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14248 unsigned int result = 1;
14252 struct __ecereNameSpace__ecere__sys__OldList converts =
14256 struct Conversion * convert;
14258 if(destType->kind == 0)
14260 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14264 for(convert = converts.first; convert; convert = convert->next)
14266 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14270 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14271 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14274 newExp->prev = (((void *)0));
14275 newExp->next = (((void *)0));
14276 newExp->destType = (((void *)0));
14280 exp->addedThis = 1;
14281 exp->__anon1.member.exp = newExp;
14282 FreeType(exp->__anon1.member.exp->expType);
14283 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14284 exp->__anon1.member.exp->expType->classObjectType = objectType;
14285 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14286 exp->__anon1.member.memberType = 1;
14287 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14290 exp->expType->refCount++;
14291 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14297 exp->addedThis = 1;
14298 exp->__anon1.member.exp = newExp;
14299 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)
14301 newExp->byReference = 1;
14303 FreeType(exp->__anon1.member.exp->expType);
14304 exp->__anon1.member.exp->expType = (((void *)0));
14305 if(convert->convert->dataType)
14307 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14308 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14309 exp->__anon1.member.exp->expType->refCount = 1;
14310 exp->__anon1.member.exp->expType->classObjectType = objectType;
14311 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14313 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14314 exp->__anon1.member.memberType = 4;
14315 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14317 if(convert->resultType)
14318 convert->resultType->refCount++;
14324 FreeType(exp->expType);
14327 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14328 if(exp->destType->casted)
14331 exp->expType->refCount++;
14335 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14336 if(exp->destType->casted)
14338 if(convert->resultType)
14339 convert->resultType->refCount++;
14343 if(exp->isConstant && inCompiler)
14344 ComputeExpression(exp);
14345 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14347 if(!result && exp->expType && converts.count)
14349 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14351 if(!result && exp->expType && exp->destType)
14353 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))
14360 static void ProcessFunction(struct FunctionDefinition * function);
14362 void ProcessInstantiationType(struct Instantiation * inst)
14364 yylloc = inst->loc;
14367 struct MembersInit * members;
14368 struct Symbol * classSym;
14369 struct __ecereNameSpace__ecere__com__Class * _class;
14371 classSym = inst->_class->__anon1.__anon1.symbol;
14372 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14373 if(!_class || _class->type != 5)
14374 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14375 afterExternal = afterExternal ? afterExternal : curExternal;
14377 ProcessExpressionType(inst->exp);
14378 inst->isConstant = 1;
14381 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14382 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14383 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14384 int subMemberStackPos = 0;
14386 for(members = (*inst->members).first; members; members = members->next)
14388 switch(members->type)
14393 static unsigned int instMethodID = 0;
14394 struct External * external = curExternal;
14395 struct Context * context = curContext;
14396 struct Declarator * declarator = members->__anon1.function->declarator;
14397 struct Identifier * nameID = GetDeclId(declarator);
14398 char * unmangled = nameID ? nameID->string : (((void *)0));
14399 struct Expression * exp;
14400 struct External * createdExternal = (((void *)0));
14406 strcpy(name, "__ecereInstMeth_");
14407 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14409 strcat(name, nameID->string);
14411 sprintf(number, "_%08d", instMethodID++);
14412 strcat(name, number);
14413 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14417 struct Symbol * symbol = declarator->symbol;
14418 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14420 if(method && method->type == 1)
14422 symbol->__anon1.method = method;
14423 ProcessMethodType(method);
14424 if(!symbol->type->__anon1.__anon2.thisClass)
14426 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14428 if(!currentClass->symbol)
14429 currentClass->symbol = FindClass(currentClass->fullName);
14430 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14434 if(!_class->symbol)
14435 _class->symbol = FindClass(_class->fullName);
14436 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14439 DeclareType(curExternal, symbol->type, 1, 1);
14443 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14446 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14449 FreeSpecifier(nameID->_class);
14450 nameID->_class = (((void *)0));
14452 curExternal = createdExternal;
14455 if(createdExternal->__anon1.function)
14456 ProcessFunction(createdExternal->__anon1.function);
14458 else if(declarator)
14460 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14461 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14463 curExternal = external;
14464 curContext = context;
14467 FreeClassFunction(members->__anon1.function);
14468 exp = QMkExpId(name);
14470 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14471 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14477 if(members->__anon1.dataMembers && classSym)
14479 struct MemberInit * member;
14480 struct Location oldyyloc = yylloc;
14482 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14484 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14485 if(member->initializer && !member->initializer->isConstant)
14486 inst->isConstant = 0;
14498 static void ProcessStatement(struct Statement * stmt)
14500 yylloc = stmt->loc;
14504 ProcessStatement(stmt->__anon1.labeled.stmt);
14507 if(stmt->__anon1.caseStmt.exp)
14509 FreeType(stmt->__anon1.caseStmt.exp->destType);
14510 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14512 curSwitchType->refCount++;
14513 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14514 ComputeExpression(stmt->__anon1.caseStmt.exp);
14516 if(stmt->__anon1.caseStmt.stmt)
14517 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14521 if(stmt->__anon1.compound.context)
14523 struct Declaration * decl;
14524 struct Statement * s;
14525 struct Statement * prevCompound = curCompound;
14526 struct Context * prevContext = curContext;
14528 if(!stmt->__anon1.compound.isSwitch)
14529 curCompound = stmt;
14530 curContext = stmt->__anon1.compound.context;
14531 if(stmt->__anon1.compound.declarations)
14533 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14534 ProcessDeclaration(decl);
14536 if(stmt->__anon1.compound.statements)
14538 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14539 ProcessStatement(s);
14541 curContext = prevContext;
14542 curCompound = prevCompound;
14548 struct Expression * exp;
14550 if(stmt->__anon1.expressions)
14552 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14553 ProcessExpressionType(exp);
14559 struct Expression * exp;
14561 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14562 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14563 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14564 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14566 ProcessExpressionType(exp);
14568 if(stmt->__anon1.ifStmt.stmt)
14569 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14570 if(stmt->__anon1.ifStmt.elseStmt)
14571 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14576 struct Type * oldSwitchType = curSwitchType;
14578 if(stmt->__anon1.switchStmt.exp)
14580 struct Expression * exp;
14582 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14586 ProcessExpressionType(exp);
14589 curSwitchType = exp->expType;
14592 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14593 curSwitchType = oldSwitchType;
14598 if(stmt->__anon1.whileStmt.exp)
14600 struct Expression * exp;
14602 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14603 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14604 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14605 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14607 ProcessExpressionType(exp);
14610 if(stmt->__anon1.whileStmt.stmt)
14611 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14616 if(stmt->__anon1.doWhile.exp)
14618 struct Expression * exp;
14620 if((*stmt->__anon1.doWhile.exp).last)
14622 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14623 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14624 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14626 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14628 ProcessExpressionType(exp);
14631 if(stmt->__anon1.doWhile.stmt)
14632 ProcessStatement(stmt->__anon1.doWhile.stmt);
14637 struct Expression * exp;
14639 if(stmt->__anon1.forStmt.init)
14640 ProcessStatement(stmt->__anon1.forStmt.init);
14641 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14643 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14644 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14645 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14647 if(stmt->__anon1.forStmt.check)
14648 ProcessStatement(stmt->__anon1.forStmt.check);
14649 if(stmt->__anon1.forStmt.increment)
14651 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14652 ProcessExpressionType(exp);
14654 if(stmt->__anon1.forStmt.stmt)
14655 ProcessStatement(stmt->__anon1.forStmt.stmt);
14660 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14661 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14662 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14663 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14664 char iteratorType[1024];
14665 struct Type * source;
14666 struct Expression * e;
14667 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));
14668 struct Expression * arrayExp;
14669 const char * typeString = (((void *)0));
14670 int builtinCount = 0;
14672 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14676 FreeType(e->destType);
14677 e->destType = ProcessTypeString("Container", 0);
14679 if(!isBuiltin || e->next)
14680 ProcessExpressionType(e);
14682 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
14683 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)))
14685 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
14686 struct Symbol * symbol;
14687 struct Expression * expIt = (((void *)0));
14688 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
14689 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
14690 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
14691 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
14696 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
14697 stmt->__anon1.compound.context->parent = curContext;
14698 curContext = stmt->__anon1.compound.context;
14700 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
14702 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
14704 isCustomAVLTree = 1;
14705 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
14708 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
14710 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
14712 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
14715 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
14717 if(inCompiler && isArray)
14719 struct Declarator * decl;
14720 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14722 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
14723 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
14724 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
14728 struct Type * type = (((void *)0));
14729 char typeStringBuf[1024];
14731 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
14732 if(((struct Expression *)(*exp).last)->type == 11)
14734 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
14737 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
14739 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)
14741 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
14743 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
14745 else if(arrayExp->__anon1.list)
14747 struct Expression * e;
14749 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
14751 ProcessExpressionType(e);
14761 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
14765 e->expType = (((void *)0));
14766 e = (*arrayExp->__anon1.list).first;
14767 ProcessExpressionType(e);
14770 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
14772 FreeType(e->expType);
14773 e->expType = (((void *)0));
14775 type = (((void *)0));
14783 FreeType(e->expType);
14784 e->expType = (((void *)0));
14790 typeStringBuf[0] = '\0';
14791 PrintType(type, typeStringBuf, 0, 1);
14792 typeString = typeStringBuf;
14800 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
14801 struct Declarator * decl;
14802 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14804 if(arrayExp->__anon1.list)
14806 struct Expression * e;
14808 builtinCount = (*arrayExp->__anon1.list).count;
14809 type = ProcessTypeString(typeString, 0);
14810 while((e = (*arrayExp->__anon1.list).first))
14812 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
14813 e->destType = type;
14815 ProcessExpressionType(e);
14817 ListAdd(initializers, MkInitializerAssignment(e));
14820 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
14822 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
14823 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
14824 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
14825 FreeList(exp, (void *)(FreeExpression));
14827 else if(arrayExp->__anon1.list)
14829 struct Expression * e;
14831 type = ProcessTypeString(typeString, 0);
14832 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
14834 e->destType = type;
14836 ProcessExpressionType(e);
14843 arrayExp->expType = ProcessTypeString("Container", 0);
14844 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
14847 else if(inCompiler && isLinkList && !isList)
14849 struct Declarator * decl;
14850 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14852 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
14853 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
14854 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
14856 else if(inCompiler && _class->templateArgs)
14859 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
14861 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
14862 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)))))))));
14866 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
14869 switch(block->type)
14872 if(block->__anon1.compound.context)
14873 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14876 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
14877 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14878 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
14879 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14882 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
14883 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14886 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
14887 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14890 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
14891 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14894 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
14895 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14898 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
14899 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
14905 block = MkIfStmt(filter, block, (((void *)0)));
14909 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));
14910 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14911 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14912 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14918 sprintf(count, "%d", builtinCount);
14919 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));
14920 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14921 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14922 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14924 else if(isLinkList && !isList)
14926 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
14927 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
14929 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
14931 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));
14935 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14936 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
14938 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));
14940 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
14941 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
14942 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
14946 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
14948 ProcessExpressionType(expIt);
14949 if((*stmt->__anon1.compound.declarations).first)
14950 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
14952 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
14953 ProcessStatement(stmt);
14956 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
14958 curContext = stmt->__anon1.compound.context->parent;
14963 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
14975 struct Expression * exp;
14977 if(stmt->__anon1.expressions)
14979 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14983 if(curFunction && !curFunction->type)
14984 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
14985 FreeType(exp->destType);
14986 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
14988 exp->destType->refCount++;
14990 ProcessExpressionType(exp);
14997 ProcessDeclaration(stmt->__anon1.decl);
15002 struct AsmField * field;
15004 if(stmt->__anon1.asmStmt.inputFields)
15006 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15007 if(field->expression)
15008 ProcessExpressionType(field->expression);
15010 if(stmt->__anon1.asmStmt.outputFields)
15012 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15013 if(field->expression)
15014 ProcessExpressionType(field->expression);
15016 if(stmt->__anon1.asmStmt.clobberedFields)
15018 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15020 if(field->expression)
15021 ProcessExpressionType(field->expression);
15028 struct PropertyWatch * propWatch;
15029 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15030 struct Expression * object = stmt->__anon1._watch.object;
15031 struct Expression * watcher = stmt->__anon1._watch.watcher;
15034 ProcessExpressionType(watcher);
15036 ProcessExpressionType(object);
15039 if(watcher || thisClass)
15041 struct External * external = curExternal;
15042 struct Context * context = curContext;
15045 stmt->__anon1.expressions = MkList();
15046 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15048 struct ClassFunction * func;
15049 char watcherName[1024];
15050 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;
15051 struct External * createdExternal;
15053 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15054 if(propWatch->deleteWatch)
15055 strcat(watcherName, "_delete");
15058 struct Identifier * propID;
15060 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15062 strcat(watcherName, "_");
15063 strcat(watcherName, propID->string);
15066 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15068 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)));
15069 ProcessClassFunctionBody(func, propWatch->compound);
15070 propWatch->compound = (((void *)0));
15071 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15072 curExternal = createdExternal;
15073 ProcessFunction(createdExternal->__anon1.function);
15074 if(propWatch->deleteWatch)
15076 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15078 ListAdd(args, CopyExpression(object));
15079 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15080 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15081 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15085 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15086 struct Identifier * propID;
15088 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15090 char propName[1024];
15091 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15095 char getName[1024], setName[1024];
15096 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15098 DeclareProperty(createdExternal, prop, setName, getName);
15099 strcpy(propName, "__ecereProp_");
15100 FullClassNameCat(propName, prop->_class->fullName, 0);
15101 strcat(propName, "_");
15102 FullClassNameCat(propName, prop->name, 1);
15103 ListAdd(args, CopyExpression(object));
15104 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15105 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15106 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15107 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15108 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15111 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15116 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15118 curExternal = external;
15119 curContext = context;
15121 FreeExpression(watcher);
15123 FreeExpression(object);
15124 FreeList(watches, (void *)(FreePropertyWatch));
15127 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15131 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15133 ProcessStatement(propWatch->compound);
15140 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15141 struct Expression * object = stmt->__anon1._watch.object;
15142 struct __ecereNameSpace__ecere__com__Class * _class;
15145 ProcessExpressionType(object);
15148 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15151 struct Identifier * propID;
15154 stmt->__anon1.expressions = MkList();
15155 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15157 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15164 for(propID = (*watches).first; propID; propID = propID->next)
15166 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15170 CreateFireWatcher(prop, object, stmt);
15173 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15178 struct __ecereNameSpace__ecere__com__Property * prop;
15179 struct __ecereNameSpace__ecere__com__Class * base;
15181 for(base = _class; base; base = base->base)
15183 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15185 if(prop->isProperty && prop->isWatchable)
15187 CreateFireWatcher(prop, object, stmt);
15193 FreeExpression(object);
15194 FreeList(watches, (void *)(FreeIdentifier));
15197 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15203 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15204 struct Expression * object = stmt->__anon1._watch.object;
15205 struct Expression * watcher = stmt->__anon1._watch.watcher;
15206 struct __ecereNameSpace__ecere__com__Class * _class;
15209 ProcessExpressionType(object);
15211 ProcessExpressionType(watcher);
15214 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15215 if(watcher || thisClass)
15219 struct Identifier * propID;
15222 stmt->__anon1.expressions = MkList();
15225 struct __ecereNameSpace__ecere__sys__OldList * args;
15228 ListAdd(args, CopyExpression(object));
15229 ListAdd(args, MkExpConstant("0"));
15230 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15231 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15235 for(propID = (*watches).first; propID; propID = propID->next)
15237 char propName[1024];
15238 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15242 char getName[1024], setName[1024];
15243 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15245 DeclareProperty(curExternal, prop, setName, getName);
15246 strcpy(propName, "__ecereProp_");
15247 FullClassNameCat(propName, prop->_class->fullName, 0);
15248 strcat(propName, "_");
15249 FullClassNameCat(propName, prop->name, 1);
15250 ListAdd(args, CopyExpression(object));
15251 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15252 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15253 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15256 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15260 FreeExpression(object);
15262 FreeExpression(watcher);
15263 FreeList(watches, (void *)(FreeIdentifier));
15266 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15269 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15276 void ProcessExpressionType(struct Expression * exp)
15278 unsigned int unresolved = 0;
15279 struct Location oldyylloc = yylloc;
15280 unsigned int notByReference = 0;
15282 if(!exp || exp->expType)
15289 struct Identifier * id = exp->__anon1.__anon1.identifier;
15291 if(!id || !topContext)
15293 if(id->_class && id->_class->__anon1.__anon1.name)
15295 id->classSym = id->_class->__anon1.__anon1.symbol;
15297 if(!strcmp(id->string, "__runtimePlatform"))
15299 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15302 else if(strstr(id->string, "__ecereClass") == id->string)
15304 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15307 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15309 ReplaceClassMembers(exp, thisClass);
15312 ProcessExpressionType(exp);
15315 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15320 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15324 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15330 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15333 ProcessExpressionType(exp);
15337 else if(currentClass && !id->_class)
15339 if(ResolveIdWithClass(exp, currentClass, 1))
15342 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15347 struct Type * type = symbol->type;
15348 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15350 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15352 struct Context * context = SetupTemplatesContext(_class);
15354 type = ReplaceThisClassType(_class);
15355 FinishTemplatesContext(context);
15357 type->refCount = 0;
15359 FreeSpecifier(id->_class);
15360 id->_class = (((void *)0));
15361 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15362 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15363 id->classSym = (((void *)0));
15364 exp->expType = type;
15367 if(type && (type->kind == 15))
15368 exp->isConstant = 1;
15369 if(symbol->isParam || !strcmp(id->string, "this"))
15371 if(_class && _class->type == 1 && !type->declaredWithStruct)
15372 exp->byReference = 1;
15374 if(symbol->isIterator)
15376 if(symbol->isIterator == 3)
15379 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15380 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15381 exp->expType = (((void *)0));
15382 ProcessExpressionType(exp);
15384 else if(symbol->isIterator != 4)
15387 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15388 exp->__anon1.member.exp->expType = exp->expType;
15389 exp->__anon1.member.member = MkIdentifier("data");
15390 exp->expType = (((void *)0));
15391 ProcessExpressionType(exp);
15398 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15400 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15404 strcpy(name, thisNameSpace);
15405 strcat(name, "::");
15406 strcat(name, id->string);
15407 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15410 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15415 for(c = 0; c < definedExpStackPos; c++)
15416 if(definedExpStack[c] == definedExp)
15418 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15420 struct Location backupYylloc = yylloc;
15421 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15423 definedExpStack[definedExpStackPos++] = definedExp;
15424 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15425 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15426 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15428 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15429 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15431 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15433 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15434 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15436 parsedExpression = (((void *)0));
15438 expression_yyparse();
15439 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15441 fileInput = backInput;
15442 yylloc = backupYylloc;
15443 if(parsedExpression)
15445 FreeIdentifier(id);
15447 exp->__anon1.list = MkListOne(parsedExpression);
15448 ApplyLocation(parsedExpression, &yylloc);
15449 ProcessExpressionType(exp);
15450 definedExpStackPos--;
15453 definedExpStackPos--;
15459 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15465 struct GlobalData * data = (((void *)0));
15467 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15471 strcpy(name, thisNameSpace);
15472 strcat(name, "::");
15473 strcat(name, id->string);
15474 data = FindGlobalData(name);
15477 data = FindGlobalData(id->string);
15480 DeclareGlobalData(curExternal, data);
15481 exp->expType = data->dataType;
15483 data->dataType->refCount++;
15484 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15485 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15486 FreeSpecifier(id->_class);
15487 id->_class = (((void *)0));
15492 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15494 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15498 strcpy(name, thisNameSpace);
15499 strcat(name, "::");
15500 strcat(name, id->string);
15501 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15504 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15509 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15510 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15512 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15513 strcpy(name, "__ecereFunction_");
15514 FullClassNameCat(name, id->string, 0);
15515 if(DeclareFunction(curExternal, function, name))
15517 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15518 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15520 exp->expType = function->dataType;
15521 if(function->dataType)
15522 function->dataType->refCount++;
15523 FreeSpecifier(id->_class);
15524 id->_class = (((void *)0));
15536 if(!exp->__anon1.instance->_class)
15538 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15540 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15543 ProcessInstantiationType(exp->__anon1.instance);
15544 exp->isConstant = exp->__anon1.instance->isConstant;
15545 if(exp->__anon1.instance->_class)
15547 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15555 char * constant = exp->__anon1.__anon1.constant;
15556 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15558 exp->expType = type;
15559 if(constant[0] == '\'')
15561 if((int)((unsigned char *)constant)[1] > 127)
15564 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15568 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15569 exp->__anon1.__anon1.constant = PrintUInt(ch);
15571 type->__anon1._class = FindClass("unichar");
15572 type->isSigned = 0;
15577 type->isSigned = 1;
15582 char * dot = strchr(constant, '.');
15583 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15588 exponent = strchr(constant, 'p');
15590 exponent = strchr(constant, 'P');
15594 exponent = strchr(constant, 'e');
15596 exponent = strchr(constant, 'E');
15598 if(dot || exponent)
15600 if(strchr(constant, 'f') || strchr(constant, 'F'))
15604 type->isSigned = 1;
15608 unsigned int isSigned = constant[0] == '-';
15609 char * endP = (((void *)0));
15610 long long i64 = strtoll(constant, &endP, 0);
15611 uint64 ui64 = strtoull(constant, &endP, 0);
15612 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
15613 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
15617 if(i64 < (((int)0x80000000)))
15622 if(ui64 > (((int)0x7fffffff)))
15624 if(ui64 > (0xffffffff))
15627 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
15631 else if(constant[0] != '0' || !constant[1])
15636 type->kind = is64Bit ? 4 : 3;
15637 type->isSigned = isSigned;
15640 exp->isConstant = 1;
15641 if(exp->destType && exp->destType->kind == 7)
15643 else if(exp->destType && exp->destType->kind == 6)
15645 else if(exp->destType && exp->destType->kind == 4)
15652 exp->isConstant = 1;
15653 exp->expType = __extension__ ({
15654 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15656 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
15657 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15659 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
15660 }), __ecereInstance2;
15666 ProcessExpressionType(exp->__anon1._new.size);
15667 exp->expType = __extension__ ({
15668 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15670 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
15672 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
15676 ProcessExpressionType(exp->__anon1._renew.size);
15677 ProcessExpressionType(exp->__anon1._renew.exp);
15678 exp->expType = __extension__ ({
15679 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15681 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
15683 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
15687 unsigned int assign = 0, boolResult = 0, boolOps = 0;
15688 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
15689 unsigned int useDestType = 0, useSideType = 0;
15690 struct Location oldyylloc = yylloc;
15691 unsigned int useSideUnit = 0;
15692 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
15693 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15695 switch(exp->__anon1.op.op)
15749 if(exp->__anon1.op.exp1)
15756 if(exp->__anon1.op.op == '&')
15758 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
15760 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
15761 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15763 if(symbol && symbol->isIterator == 2)
15766 exp->__anon1.member.exp = exp->__anon1.op.exp2;
15767 exp->__anon1.member.member = MkIdentifier("key");
15768 exp->expType = (((void *)0));
15769 exp->__anon1.op.exp2->expType = symbol->type;
15770 symbol->type->refCount++;
15771 ProcessExpressionType(exp);
15777 if(exp->__anon1.op.exp1)
15779 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
15781 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
15783 if(exp->__anon1.op.exp1->destType)
15784 FreeType(exp->__anon1.op.exp1->destType);
15785 exp->__anon1.op.exp1->destType = exp->destType;
15786 exp->__anon1.op.exp1->opDestType = 1;
15788 exp->destType->refCount++;
15792 if(exp->__anon1.op.exp1->destType)
15793 FreeType(exp->__anon1.op.exp1->destType);
15794 exp->__anon1.op.exp1->destType = dummy;
15797 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
15798 exp->__anon1.op.exp1->destType->count++;
15799 ProcessExpressionType(exp->__anon1.op.exp1);
15800 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
15801 exp->__anon1.op.exp1->destType->count--;
15802 exp->__anon1.op.exp1->opDestType = 0;
15803 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)
15805 exp->__anon1.op.exp2 = MkExpConstant("1");
15806 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
15809 if(exp->__anon1.op.exp1->destType == dummy)
15812 exp->__anon1.op.exp1->destType = (((void *)0));
15814 type1 = exp->__anon1.op.exp1->expType;
15816 if(exp->__anon1.op.exp2)
15818 char expString[10240];
15820 expString[0] = '\0';
15821 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
15823 if(exp->__anon1.op.exp1)
15825 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
15826 if(exp->__anon1.op.exp1->expType)
15827 exp->__anon1.op.exp1->expType->refCount++;
15831 exp->__anon1.op.exp2->destType = exp->destType;
15832 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
15833 exp->__anon1.op.exp2->opDestType = 1;
15835 exp->destType->refCount++;
15839 exp->expType = type1;
15844 PrintExpression(exp->__anon1.op.exp2, expString);
15845 if(type1 && type1->kind == 13)
15847 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)
15848 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
15849 else if(exp->__anon1.op.op == '=')
15851 if(exp->__anon1.op.exp2->destType)
15852 FreeType(exp->__anon1.op.exp2->destType);
15853 exp->__anon1.op.exp2->destType = type1;
15860 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)
15864 if(exp->__anon1.op.exp2->destType)
15865 FreeType(exp->__anon1.op.exp2->destType);
15866 exp->__anon1.op.exp2->destType = type1;
15873 exp->expType = type1;
15875 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
15877 if(exp->__anon1.op.exp2->destType)
15878 FreeType(exp->__anon1.op.exp2->destType);
15879 exp->__anon1.op.exp2->destType = exp->destType;
15880 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
15881 exp->__anon1.op.exp2->opDestType = 1;
15883 exp->destType->refCount++;
15887 if(exp->__anon1.op.exp2->destType)
15888 FreeType(exp->__anon1.op.exp2->destType);
15889 exp->__anon1.op.exp2->destType = dummy;
15892 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))
15894 FreeType(exp->__anon1.op.exp2->destType);
15895 exp->__anon1.op.exp2->destType = type1;
15898 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
15899 exp->__anon1.op.exp2->destType->count++;
15900 if(exp->__anon1.op.op == SIZEOF)
15902 struct Expression * e = exp->__anon1.op.exp2;
15904 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
15906 if(e->type == 5 || e->type == 32 || e->type == 23)
15909 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
15911 e = (*e->__anon1.list).last;
15914 if(e->type == 11 && e->__anon1.cast.exp)
15915 e->__anon1.cast.exp->needCast = 1;
15917 ProcessExpressionType(exp->__anon1.op.exp2);
15918 exp->__anon1.op.exp2->opDestType = 0;
15919 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
15920 exp->__anon1.op.exp2->destType->count--;
15921 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
15923 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)
15925 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
15926 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
15928 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)))
15930 if(exp->__anon1.op.op == ADD_ASSIGN)
15931 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
15933 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))
15935 if(exp->__anon1.op.op == ADD_ASSIGN)
15936 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
15938 else if(inCompiler)
15940 char type1String[1024];
15941 char type2String[1024];
15943 type1String[0] = '\0';
15944 type2String[0] = '\0';
15945 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
15946 PrintType(type1, type2String, 0, 1);
15947 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15948 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
15951 if(exp->__anon1.op.exp2->destType == dummy)
15954 exp->__anon1.op.exp2->destType = (((void *)0));
15956 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
15958 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15959 type2->refCount = 1;
15960 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
15961 type2->isSigned = 1;
15963 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))
15965 type2 = __extension__ ({
15966 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15968 __ecereInstance1->kind = 3, __ecereInstance1;
15970 type2->refCount = 1;
15971 type2->isSigned = 1;
15975 type2 = exp->__anon1.op.exp2->expType;
15981 if(exp->__anon1.op.op == SIZEOF)
15983 exp->expType = __extension__ ({
15984 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15986 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
15988 exp->isConstant = 1;
15990 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
15992 exp->expType = Dereference(type2);
15993 if(type2 && type2->kind == 8)
15994 notByReference = 1;
15996 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
15997 exp->expType = Reference(type2);
16002 if(exp->__anon1.op.exp1)
16004 if(exp->__anon1.op.exp1->destType)
16005 FreeType(exp->__anon1.op.exp1->destType);
16006 exp->__anon1.op.exp1->destType = MkClassType("bool");
16007 exp->__anon1.op.exp1->destType->truth = 1;
16008 if(!exp->__anon1.op.exp1->expType)
16009 ProcessExpressionType(exp->__anon1.op.exp1);
16011 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16012 FreeType(exp->__anon1.op.exp1->expType);
16013 exp->__anon1.op.exp1->expType = MkClassType("bool");
16014 exp->__anon1.op.exp1->expType->truth = 1;
16016 if(exp->__anon1.op.exp2)
16018 if(exp->__anon1.op.exp2->destType)
16019 FreeType(exp->__anon1.op.exp2->destType);
16020 exp->__anon1.op.exp2->destType = MkClassType("bool");
16021 exp->__anon1.op.exp2->destType->truth = 1;
16022 if(!exp->__anon1.op.exp2->expType)
16023 ProcessExpressionType(exp->__anon1.op.exp2);
16025 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16026 FreeType(exp->__anon1.op.exp2->expType);
16027 exp->__anon1.op.exp2->expType = MkClassType("bool");
16028 exp->__anon1.op.exp2->expType->truth = 1;
16031 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")))))
16033 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"))))
16035 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)))
16037 struct Type * intType;
16039 if(!type1->__anon1._class->__anon1.registered->dataType)
16040 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16041 if(!type2->__anon1._class->__anon1.registered->dataType)
16042 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16043 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16044 if(exp->__anon1.op.exp1->destType)
16045 FreeType(exp->__anon1.op.exp1->destType);
16046 if(exp->__anon1.op.exp2->destType)
16047 FreeType(exp->__anon1.op.exp2->destType);
16048 exp->__anon1.op.exp1->destType = intType;
16049 exp->__anon1.op.exp2->destType = intType;
16050 intType->refCount++;
16054 if(exp->__anon1.op.exp2->destType)
16055 FreeType(exp->__anon1.op.exp2->destType);
16056 exp->__anon1.op.exp2->destType = type1;
16058 if(exp->__anon1.op.exp1->destType)
16059 FreeType(exp->__anon1.op.exp1->destType);
16060 exp->__anon1.op.exp1->destType = type2;
16063 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)
16064 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);
16065 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16067 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16071 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16073 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16074 ProcessExpressionType(exp->__anon1.op.exp1);
16075 if(type2->kind != 13)
16077 ProcessExpressionType(classExp);
16078 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16079 if(!exp->__anon1.op.exp2->expType)
16083 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16086 ProcessExpressionType(exp->__anon1.op.exp2);
16090 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)))
16092 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16093 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16094 exp->expType = type1;
16098 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)))
16100 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16101 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16102 exp->expType = type2;
16106 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))
16108 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16112 unsigned int success = 0;
16114 if(type1->kind == 13 && type2->kind == 13)
16116 if(exp->__anon1.op.op == '+')
16117 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16118 else if(exp->__anon1.op.op == '-')
16120 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16122 exp->expType = __extension__ ({
16123 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16125 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16128 if(type1->__anon1.type->kind == 20)
16130 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16134 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16136 ProcessExpressionType(classExp);
16138 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"))));
16139 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16147 if(!success && exp->__anon1.op.exp1->type == 2)
16149 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16152 FreeType(exp->expType);
16153 exp->expType = exp->__anon1.op.exp1->destType;
16154 if(exp->__anon1.op.exp1->destType)
16155 exp->__anon1.op.exp1->destType->refCount++;
16158 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16161 FreeType(exp->expType);
16162 exp->expType = exp->__anon1.op.exp2->destType;
16163 if(exp->__anon1.op.exp2->destType)
16164 exp->__anon1.op.exp2->destType->refCount++;
16170 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16173 FreeType(exp->expType);
16174 exp->expType = exp->__anon1.op.exp2->destType;
16175 if(exp->__anon1.op.exp2->destType)
16176 exp->__anon1.op.exp2->destType->refCount++;
16179 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16182 FreeType(exp->expType);
16183 exp->expType = exp->__anon1.op.exp1->destType;
16184 if(exp->__anon1.op.exp1->destType)
16185 exp->__anon1.op.exp1->destType->refCount++;
16191 char expString1[10240];
16192 char expString2[10240];
16196 expString1[0] = '\0';
16197 expString2[0] = '\0';
16202 PrintExpression(exp->__anon1.op.exp1, expString1);
16203 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16204 PrintExpression(exp->__anon1.op.exp2, expString2);
16205 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16206 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16207 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16209 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16213 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)
16215 if(exp->__anon1.op.exp1->destType)
16216 FreeType(exp->__anon1.op.exp1->destType);
16217 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16218 if(type2->__anon1._class->__anon1.registered->dataType)
16219 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16220 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16221 exp->expType = type2;
16225 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)
16227 if(exp->__anon1.op.exp2->destType)
16228 FreeType(exp->__anon1.op.exp2->destType);
16229 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16230 if(type1->__anon1._class->__anon1.registered->dataType)
16231 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16232 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16233 exp->expType = type1;
16239 unsigned int valid = 0;
16241 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16243 if(exp->__anon1.op.exp2->destType)
16244 FreeType(exp->__anon1.op.exp2->destType);
16245 if(!type1->__anon1._class->__anon1.registered->dataType)
16246 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16247 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16248 exp->__anon1.op.exp2->destType->refCount++;
16249 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16252 type2 = exp->__anon1.op.exp2->destType;
16255 exp->expType = type2;
16258 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16260 if(exp->__anon1.op.exp1->destType)
16261 FreeType(exp->__anon1.op.exp1->destType);
16262 if(!type2->__anon1._class->__anon1.registered->dataType)
16263 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16264 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16265 exp->__anon1.op.exp1->destType->refCount++;
16266 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16267 type1 = exp->__anon1.op.exp1->destType;
16268 exp->expType = type1;
16271 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16273 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16274 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16276 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16278 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16280 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16283 FreeType(exp->expType);
16284 exp->expType = exp->__anon1.op.exp2->expType;
16285 if(exp->__anon1.op.exp2->expType)
16286 exp->__anon1.op.exp2->expType->refCount++;
16290 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16292 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16295 FreeType(exp->expType);
16296 exp->expType = exp->__anon1.op.exp1->expType;
16297 if(exp->__anon1.op.exp1->expType)
16298 exp->__anon1.op.exp1->expType->refCount++;
16305 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16307 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16310 FreeType(exp->expType);
16311 exp->expType = exp->__anon1.op.exp1->expType;
16312 if(exp->__anon1.op.exp1->expType)
16313 exp->__anon1.op.exp1->expType->refCount++;
16317 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16319 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16322 FreeType(exp->expType);
16323 exp->expType = exp->__anon1.op.exp2->expType;
16324 if(exp->__anon1.op.exp2->expType)
16325 exp->__anon1.op.exp2->expType->refCount++;
16333 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))
16335 if(exp->__anon1.op.exp1->destType)
16336 FreeType(exp->__anon1.op.exp1->destType);
16337 exp->__anon1.op.exp1->destType = type2;
16339 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16342 FreeType(exp->expType);
16343 exp->expType = exp->__anon1.op.exp1->destType;
16344 if(exp->__anon1.op.exp1->destType)
16345 exp->__anon1.op.exp1->destType->refCount++;
16350 if(exp->__anon1.op.exp2->destType)
16351 FreeType(exp->__anon1.op.exp2->destType);
16352 exp->__anon1.op.exp2->destType = type1;
16354 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16357 FreeType(exp->expType);
16358 exp->expType = exp->__anon1.op.exp2->destType;
16359 if(exp->__anon1.op.exp2->destType)
16360 exp->__anon1.op.exp2->destType->refCount++;
16362 else if(type1 && type2)
16364 char expString1[10240];
16365 char expString2[10240];
16366 char type1String[1024];
16367 char type2String[1024];
16369 expString1[0] = '\0';
16370 expString2[0] = '\0';
16371 type1String[0] = '\0';
16372 type2String[0] = '\0';
16375 PrintExpression(exp->__anon1.op.exp1, expString1);
16376 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16377 PrintExpression(exp->__anon1.op.exp2, expString2);
16378 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16379 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16380 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16382 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16383 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16385 exp->expType = exp->__anon1.op.exp1->expType;
16386 if(exp->__anon1.op.exp1->expType)
16387 exp->__anon1.op.exp1->expType->refCount++;
16389 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16391 exp->expType = exp->__anon1.op.exp2->expType;
16392 if(exp->__anon1.op.exp2->expType)
16393 exp->__anon1.op.exp2->expType->refCount++;
16401 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16403 struct Type * oldType = exp->__anon1.op.exp1->expType;
16405 exp->__anon1.op.exp1->expType = (((void *)0));
16406 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16409 exp->__anon1.op.exp1->expType = oldType;
16411 if(exp->__anon1.op.exp1->destType)
16412 FreeType(exp->__anon1.op.exp1->destType);
16413 exp->__anon1.op.exp1->destType = type2;
16415 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16418 FreeType(exp->expType);
16419 exp->expType = exp->__anon1.op.exp1->destType;
16420 if(exp->__anon1.op.exp1->destType)
16421 exp->__anon1.op.exp1->destType->refCount++;
16425 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16427 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16429 if(exp->__anon1.op.exp1->destType)
16430 FreeType(exp->__anon1.op.exp1->destType);
16431 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16432 if(type2->__anon1._class->__anon1.registered->dataType)
16433 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16434 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16436 if(exp->__anon1.op.op == '!')
16438 exp->expType = MkClassType("bool");
16439 exp->expType->truth = 1;
16443 exp->expType = type2;
16448 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16450 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16452 if(exp->__anon1.op.exp2->destType)
16453 FreeType(exp->__anon1.op.exp2->destType);
16454 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16455 if(type1->__anon1._class->__anon1.registered->dataType)
16456 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16457 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16459 exp->expType = type1;
16465 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16467 char expString[10000];
16469 expString[0] = '\0';
16472 PrintExpression(exp->__anon1.op.exp1, expString);
16473 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16476 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16478 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16480 char expString[10240];
16482 expString[0] = '\0';
16485 PrintExpression(exp->__anon1.op.exp2, expString);
16486 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16489 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16493 FreeType(exp->expType);
16494 exp->expType = MkClassType("bool");
16495 exp->expType->truth = 1;
16497 if(exp->__anon1.op.op != SIZEOF)
16498 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16499 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16501 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16503 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16504 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16505 yylloc = oldyylloc;
16514 struct Expression * e;
16516 exp->isConstant = 1;
16517 for(e = (*exp->__anon1.list).first; e; e = e->next)
16521 FreeType(e->destType);
16522 e->opDestType = exp->opDestType;
16523 e->destType = exp->destType;
16526 exp->destType->refCount++;
16529 ProcessExpressionType(e);
16530 if(!exp->expType && !e->next)
16532 exp->expType = e->expType;
16534 e->expType->refCount++;
16537 exp->isConstant = 0;
16539 e = (*exp->__anon1.list).first;
16540 if(!e->next && e->type == 8)
16542 struct Expression * next = exp->next, * prev = exp->prev;
16544 FreeType(exp->expType);
16545 FreeType(exp->destType);
16546 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16550 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16551 ProcessExpressionType(exp);
16557 struct Expression * e;
16559 exp->isConstant = 1;
16560 ProcessExpressionType(exp->__anon1.index.exp);
16561 if(!exp->__anon1.index.exp->isConstant)
16562 exp->isConstant = 0;
16563 if(exp->__anon1.index.exp->expType)
16565 struct Type * source = exp->__anon1.index.exp->expType;
16567 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16569 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16570 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16572 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
16574 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
16575 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
16577 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
16579 if(type->kind == 8)
16580 type->constant = 1;
16581 else if(type->kind == 13)
16583 struct Type * t = type;
16585 while(t->kind == 13)
16586 t = t->__anon1.type;
16589 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
16594 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
16596 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
16599 FreeType(e->destType);
16600 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
16602 ProcessExpressionType(e);
16607 exp->isConstant = 0;
16610 exp->expType = Dereference(exp->__anon1.index.exp->expType);
16612 DeclareType(curExternal, exp->expType, 1, 0);
16617 struct Expression * e;
16618 struct Type * functionType;
16619 struct Type * methodType = (((void *)0));
16625 PrintExpression(exp->__anon1.call.exp, name);
16626 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
16628 PrintExpression(exp->__anon1.call.exp, name);
16631 if(exp->__anon1.call.exp->type == 0)
16633 struct Expression * idExp = exp->__anon1.call.exp;
16634 struct Identifier * id = idExp->__anon1.__anon1.identifier;
16636 if(!strcmp(id->string, "__builtin_frame_address"))
16638 exp->expType = ProcessTypeString("void *", 1);
16639 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
16640 ProcessExpressionType((*exp->__anon1.call.arguments).first);
16643 else if(!strcmp(id->string, "__ENDIAN_PAD"))
16645 exp->expType = ProcessTypeString("int", 1);
16646 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
16647 ProcessExpressionType((*exp->__anon1.call.arguments).first);
16650 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
16652 struct Expression * a = (((void *)0));
16653 struct Expression * b = (((void *)0));
16654 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
16656 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
16658 a = (*exp->__anon1.call.arguments).first;
16659 b = (*exp->__anon1.call.arguments).last;
16663 else if((*exp->__anon1.call.arguments).count == 1)
16665 a = (*exp->__anon1.call.arguments).first;
16670 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
16671 idExp->__anon1.__anon1.identifier = (((void *)0));
16672 FreeExpContents(exp);
16673 ProcessExpressionType(a);
16675 ProcessExpressionType(b);
16677 exp->__anon1.list = MkList();
16678 if(a->expType && (!b || b->expType))
16680 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
16684 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16685 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
16686 struct Declaration * decl;
16687 char temp1[1024], temp2[1024];
16689 GetTypeSpecs(a->expType, specs);
16690 if(a && !a->isConstant && a->type != 0)
16692 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
16693 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
16694 tempExp1 = QMkExpId(temp1);
16695 tempExp1->expType = a->expType;
16697 a->expType->refCount++;
16698 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
16700 if(b && !b->isConstant && b->type != 0)
16702 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
16703 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
16704 tempExp2 = QMkExpId(temp2);
16705 tempExp2->expType = b->expType;
16707 b->expType->refCount++;
16708 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
16710 decl = MkDeclaration(specs, decls);
16711 if(!curCompound->__anon1.compound.declarations)
16712 curCompound->__anon1.compound.declarations = MkList();
16713 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
16717 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
16719 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
16721 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
16722 exp->expType = a->expType;
16724 a->expType->refCount++;
16726 else if(!strcmp(id->string, "Abs"))
16728 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
16729 exp->expType = a->expType;
16731 a->expType->refCount++;
16733 else if(!strcmp(id->string, "Sgn"))
16735 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"))))));
16736 exp->expType = ProcessTypeString("int", 0);
16738 FreeExpression(tempExp1);
16740 FreeExpression(tempExp2);
16741 FreeIdentifier(id);
16747 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16749 if(!exp->__anon1.call.exp->destType)
16751 exp->__anon1.call.exp->destType = dummy;
16754 ProcessExpressionType(exp->__anon1.call.exp);
16755 if(exp->__anon1.call.exp->destType == dummy)
16758 exp->__anon1.call.exp->destType = (((void *)0));
16762 functionType = exp->__anon1.call.exp->expType;
16763 if(functionType && functionType->kind == 16)
16765 methodType = functionType;
16766 functionType = methodType->__anon1.__anon3.method->dataType;
16767 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
16769 char typeString[1024];
16771 typeString[0] = '\0';
16773 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
16775 functionType->__anon1.__anon2.thisClass = (((void *)0));
16776 PrintType(functionType, typeString, 1, 1);
16777 functionType->__anon1.__anon2.thisClass = back;
16779 if(strstr(typeString, "thisclass"))
16781 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16782 struct Declarator * decl;
16785 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
16787 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16788 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))
16789 thisClassParams = 0;
16790 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
16792 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
16794 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
16795 ProcessDeclarator(decl, 1);
16796 thisClass = backupThisClass;
16798 thisClassParams = 1;
16799 functionType = ProcessType(specs, decl);
16800 functionType->refCount = 0;
16801 FinishTemplatesContext(context);
16803 struct Type * p, * op;
16805 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)
16808 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
16811 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
16813 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
16816 FreeList(specs, (void *)(FreeSpecifier));
16817 FreeDeclarator(decl);
16821 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
16823 struct Type * type = functionType->__anon1.type;
16825 if(!functionType->refCount)
16827 functionType->__anon1.type = (((void *)0));
16828 FreeType(functionType);
16830 functionType = type;
16832 if(functionType && functionType->kind != 11)
16834 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
16836 else if(functionType)
16838 unsigned int emptyParams = 0, noParams = 0;
16839 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
16840 struct Type * type = functionType->__anon1.__anon2.params.first;
16841 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
16843 struct Location oldyylloc = yylloc;
16847 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
16849 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
16852 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
16854 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)
16856 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
16859 e->destType = type;
16861 type = functionType->__anon1.__anon2.params.first;
16864 type->refCount = 0;
16866 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
16868 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
16869 type->byReference = functionType->byReference;
16870 type->typedByReference = functionType->typedByReference;
16873 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
16875 e->destType = type;
16877 type = functionType->__anon1.__anon2.params.first;
16880 type->refCount = 0;
16883 if(type && type->kind == 0)
16886 if(!type->refCount)
16888 type = (((void *)0));
16890 for(; e; e = e->next)
16892 if(!type && !emptyParams)
16895 if(methodType && methodType->__anon1.__anon3.methodClass)
16896 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);
16898 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);
16901 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
16903 struct Type * templatedType = (((void *)0));
16904 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
16905 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16908 if(_class && _class->templateArgs)
16910 struct __ecereNameSpace__ecere__com__Class * sClass;
16912 for(sClass = _class; sClass; sClass = sClass->base)
16914 if(sClass->templateClass)
16915 sClass = sClass->templateClass;
16917 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16919 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
16921 struct __ecereNameSpace__ecere__com__Class * nextClass;
16923 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16925 if(nextClass->templateClass)
16926 nextClass = nextClass->templateClass;
16927 id += nextClass->templateParams.count;
16937 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
16939 unsigned int constant = type->constant;
16940 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
16943 struct Context * context = SetupTemplatesContext(_class);
16945 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16946 FinishTemplatesContext(context);
16948 if(templatedType->kind == 8 && constant)
16949 templatedType->constant = 1;
16950 else if(templatedType->kind == 13)
16952 struct Type * t = templatedType->__anon1.type;
16954 while(t->kind == 13)
16955 t = t->__anon1.type;
16957 t->constant = constant;
16959 e->destType = templatedType;
16962 templatedType->passAsTemplate = 1;
16967 e->destType = type;
16974 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
16976 e->destType = type->prev;
16977 e->destType->refCount++;
16981 e->destType = type;
16986 if(type && type->kind != 14)
16988 struct Type * next = type->next;
16990 if(!type->refCount)
16995 if(type && type->kind != 14)
16997 if(methodType && methodType->__anon1.__anon3.methodClass)
16998 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);
17000 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);
17002 yylloc = oldyylloc;
17003 if(type && !type->refCount)
17008 functionType = __extension__ ({
17009 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17011 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17013 if(exp->__anon1.call.exp->type == 0)
17015 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17019 struct Symbol * symbol;
17020 struct Location oldyylloc = yylloc;
17022 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17023 if(strstr(string, "__builtin_") == string)
17027 functionType->__anon1.__anon2.returnType = exp->destType;
17028 exp->destType->refCount++;
17032 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17033 symbol = __extension__ ({
17034 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17036 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17038 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17039 if(strstr(symbol->string, "::"))
17040 globalContext->hasNameSpace = 1;
17041 yylloc = oldyylloc;
17044 else if(exp->__anon1.call.exp->type == 8)
17048 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17049 if(!functionType->__anon1.__anon2.returnType)
17051 functionType->__anon1.__anon2.returnType = __extension__ ({
17052 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17054 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17058 if(functionType && functionType->kind == 11)
17060 exp->expType = functionType->__anon1.__anon2.returnType;
17061 if(functionType->__anon1.__anon2.returnType)
17062 functionType->__anon1.__anon2.returnType->refCount++;
17063 if(!functionType->refCount)
17064 FreeType(functionType);
17066 if(exp->__anon1.call.arguments)
17068 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17069 ProcessExpressionType(e);
17075 struct Type * type;
17076 struct Location oldyylloc = yylloc;
17077 unsigned int thisPtr;
17078 struct Expression * checkExp = exp->__anon1.member.exp;
17082 if(checkExp->type == 11)
17083 checkExp = checkExp->__anon1.cast.exp;
17084 else if(checkExp->type == 5)
17085 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17089 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17090 exp->thisPtr = thisPtr;
17091 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17093 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17095 ProcessExpressionType(exp->__anon1.member.exp);
17096 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)
17098 exp->isConstant = 0;
17101 exp->isConstant = exp->__anon1.member.exp->isConstant;
17102 type = exp->__anon1.member.exp->expType;
17104 if(type && (type->kind == 20))
17106 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17107 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17111 for(param = _class->templateParams.first; param; param = param->next)
17113 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17117 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17119 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17123 struct Expression * expMember = exp->__anon1.member.exp;
17124 struct Declarator * decl;
17125 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17126 char thisClassTypeString[1024];
17128 FreeIdentifier(exp->__anon1.member.member);
17129 ProcessExpressionType(argExp);
17131 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17135 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17136 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17139 strcpy(thisClassTypeString, _class->fullName);
17141 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17142 exp->expType = ProcessType(specs, decl);
17143 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17145 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17146 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17147 int paramCount = 0;
17148 int lastParam = -1;
17149 char templateString[1024];
17150 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17152 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17153 for(cClass = expClass; cClass; cClass = cClass->base)
17157 for(param = cClass->templateParams.first; param; param = param->next)
17160 struct __ecereNameSpace__ecere__com__Class * sClass;
17161 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17163 for(sClass = cClass->base; sClass; sClass = sClass->base)
17164 id += sClass->templateParams.count;
17165 arg = expClass->templateArgs[id];
17166 for(sClass = _class; sClass; sClass = sClass->base)
17168 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17170 struct __ecereNameSpace__ecere__com__Class * nextClass;
17172 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17173 p += nextClass->templateParams.count;
17174 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17176 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17178 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17180 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17181 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17188 char argument[256];
17190 argument[0] = '\0';
17191 switch(param->type)
17195 char expString[1024];
17196 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17197 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17198 struct Expression * exp;
17199 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17201 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17202 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17203 ProcessExpressionType(exp);
17204 ComputeExpression(exp);
17205 expString[0] = '\0';
17206 PrintExpression(exp, expString);
17207 strcat(argument, expString);
17208 FreeExpression(exp);
17213 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17218 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17220 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17221 strcat(argument, thisClassTypeString);
17223 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17231 strcat(templateString, ", ");
17232 if(lastParam != p - 1)
17234 strcat(templateString, param->name);
17235 strcat(templateString, " = ");
17237 strcat(templateString, argument);
17246 int len = strlen(templateString);
17248 if(templateString[len - 1] == '>')
17249 templateString[len++] = ' ';
17250 templateString[len++] = '>';
17251 templateString[len++] = '\0';
17254 struct Context * context = SetupTemplatesContext(_class);
17256 FreeType(exp->expType);
17257 exp->expType = ProcessTypeString(templateString, 0);
17258 FinishTemplatesContext(context);
17261 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17262 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17264 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")))))))));
17267 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17269 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17272 if(type && (type->kind == 20))
17274 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)))
17276 struct Identifier * id = exp->__anon1.member.member;
17277 int typeKind = type->kind;
17278 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));
17280 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17282 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17287 if(typeKind == 3 || typeKind == 15)
17288 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17291 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17293 _class = type->__anon1._class->__anon1.registered;
17295 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17297 _class = FindClass("char *")->__anon1.registered;
17299 else if(type->kind == 13)
17301 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17302 FreeType(exp->expType);
17303 exp->expType = ProcessTypeString("uintptr", 0);
17304 exp->byReference = 1;
17308 char string[1024] = "";
17309 struct Symbol * classSym;
17311 PrintTypeNoConst(type, string, 0, 1);
17312 classSym = FindClass(string);
17314 _class = classSym->__anon1.registered;
17320 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17321 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17322 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17323 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17324 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17326 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17327 exp->__anon1.member.memberType = 1;
17328 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17329 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17332 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17334 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17335 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17337 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17339 member = (((void *)0));
17341 if(!member && !prop)
17342 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17343 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17344 exp->__anon1.member.thisPtr = 1;
17348 unsigned int useMemberForNonConst = 0;
17352 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17353 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);
17354 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17355 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17357 if((!prop || useMemberForNonConst) && !member)
17359 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17362 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17363 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);
17364 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17365 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17370 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17371 prop = (((void *)0));
17373 member = (((void *)0));
17377 if(!prop && !member && !method)
17378 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17379 if(!prop && !member && !method)
17383 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17386 exp->__anon1.member.memberType = 5;
17387 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17391 char structName[1024];
17392 struct Identifier * id = exp->__anon1.member.member;
17393 struct Expression * classExp = exp->__anon1.member.exp;
17396 FreeType(classExp->expType);
17397 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17398 strcpy(structName, "__ecereClassData_");
17399 FullClassNameCat(structName, type->__anon1._class->string, 0);
17401 exp->__anon1.member.member = id;
17402 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"))))))));
17404 ProcessExpressionType(exp);
17410 struct Symbol * classSym = FindClass(id->string);
17414 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17417 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17421 if(exp->__anon1.member.exp->destType)
17422 FreeType(exp->__anon1.member.exp->destType);
17424 if(method && !method->_class->symbol)
17425 method->_class->symbol = FindClass(method->_class->fullName);
17426 if(prop && !prop->_class->symbol)
17427 prop->_class->symbol = FindClass(prop->_class->fullName);
17428 exp->__anon1.member.exp->destType = __extension__ ({
17429 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17431 __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;
17436 exp->__anon1.member.memberType = 1;
17437 if(!prop->dataType)
17438 ProcessPropertyType(prop);
17439 exp->expType = prop->dataType;
17440 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17442 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17444 CopyTypeInto(type, exp->expType);
17445 type->refCount = 1;
17446 type->constant = 1;
17447 exp->expType = type;
17449 else if(prop->dataType)
17450 prop->dataType->refCount++;
17454 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17456 FreeExpContents(exp);
17458 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17459 ProcessExpressionType(exp);
17462 exp->__anon1.member.memberType = 3;
17463 DeclareStruct(curExternal, _class->fullName, 0, 1);
17464 if(member->_class != _class)
17465 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17466 if(!member->dataType)
17468 struct Context * context = SetupTemplatesContext(_class);
17470 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17471 FinishTemplatesContext(context);
17473 exp->expType = member->dataType;
17474 if(member->dataType)
17475 member->dataType->refCount++;
17477 else if(revConvert)
17479 exp->__anon1.member.memberType = 4;
17480 exp->expType = MkClassType(revConvert->_class->fullName);
17485 exp->__anon1.member.memberType = 2;
17487 if(!method->dataType)
17488 ProcessMethodType(method);
17489 exp->expType = __extension__ ({
17490 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17492 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17494 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17495 exp->expType->__anon1.__anon3.usedClass = _class;
17497 else if(!classProp)
17499 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17501 FreeExpContents(exp);
17503 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17504 FreeType(exp->expType);
17505 exp->expType = MkClassType("ecere::com::Class");
17508 yylloc = exp->__anon1.member.member->loc;
17509 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17511 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17513 if(_class && exp->expType)
17515 struct __ecereNameSpace__ecere__com__Class * tClass;
17517 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17518 while(tClass && !tClass->templateClass)
17519 tClass = tClass->base;
17520 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17523 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17524 struct __ecereNameSpace__ecere__com__Class * sClass;
17526 for(sClass = tClass; sClass; sClass = sClass->base)
17529 if(sClass->templateClass)
17530 sClass = sClass->templateClass;
17531 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17533 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17535 for(sClass = sClass->base; sClass; sClass = sClass->base)
17536 id += sClass->templateParams.count;
17544 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17546 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17547 struct Context * context = SetupTemplatesContext(tClass);
17548 unsigned int constant = exp->expType->constant;
17549 unsigned int passAsTemplate = 0;
17550 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17551 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17553 if(t && t->kind == 8 && t->__anon1._class)
17554 thisClassFrom = t->__anon1._class->__anon1.registered;
17556 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17557 FreeType(exp->expType);
17558 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17559 exp->expType->thisClassFrom = thisClassFrom;
17560 if(exp->expType->kind == 8 && constant)
17561 exp->expType->constant = 1;
17562 else if(exp->expType->kind == 13)
17564 struct Type * t = exp->expType->__anon1.type;
17566 while(t->kind == 13)
17567 t = t->__anon1.type;
17569 t->constant = constant;
17573 if(exp->expType->kind == 21)
17575 FreeType(exp->expType);
17576 exp->expType = ReplaceThisClassType(_class);
17579 exp->expType->passAsTemplate = 1;
17582 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17583 if(exp->destType->kind == 8 && constant)
17584 exp->destType->constant = 1;
17585 else if(exp->destType->kind == 13)
17587 struct Type * t = exp->destType->__anon1.type;
17589 while(t->kind == 13)
17590 t = t->__anon1.type;
17592 t->constant = constant;
17594 if(exp->destType->kind == 21)
17596 FreeType(exp->destType);
17597 exp->destType = ReplaceThisClassType(_class);
17601 FinishTemplatesContext(context);
17604 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)
17607 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17608 struct __ecereNameSpace__ecere__com__Class * sClass;
17610 for(sClass = tClass; sClass; sClass = sClass->base)
17613 if(sClass->templateClass)
17614 sClass = sClass->templateClass;
17615 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17617 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
17619 for(sClass = sClass->base; sClass; sClass = sClass->base)
17620 id += sClass->templateParams.count;
17630 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17631 struct Context * context = SetupTemplatesContext(tClass);
17632 struct Type * basicType;
17634 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17637 if(basicType->kind == 21)
17639 FreeType(basicType);
17640 basicType = ReplaceThisClassType(_class);
17642 FreeType(exp->expType);
17643 exp->expType = __extension__ ({
17644 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17646 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
17650 exp->destType = exp->expType;
17651 exp->destType->refCount++;
17654 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17655 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17656 struct Declarator * decl;
17658 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
17661 exp->destType->refCount++;
17663 exp->expType->refCount++;
17665 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
17666 exp->__anon1.cast.exp = newExp;
17669 FinishTemplatesContext(context);
17672 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
17674 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17678 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17680 int paramCount = 0;
17681 int lastParam = -1;
17682 char templateString[1024];
17683 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17685 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17686 while(cClass != expClass)
17688 struct __ecereNameSpace__ecere__com__Class * sClass;
17690 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
17693 for(param = cClass->templateParams.first; param; param = param->next)
17695 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
17697 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
17698 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17700 while(cClassCur != tClass && !paramCur)
17702 struct __ecereNameSpace__ecere__com__Class * sClassCur;
17704 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
17706 cClassCur = sClassCur;
17707 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
17709 if(!strcmp(paramCur->name, param->name))
17716 if(paramCur && paramCur->type == 0)
17717 arg = tClass->templateArgs[cp];
17719 arg = expClass->templateArgs[p];
17721 char argument[256];
17723 argument[0] = '\0';
17724 switch(param->type)
17728 char expString[1024];
17729 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17730 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17731 struct Expression * exp;
17732 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17734 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17735 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17736 ProcessExpressionType(exp);
17737 ComputeExpression(exp);
17738 expString[0] = '\0';
17739 PrintExpression(exp, expString);
17740 strcat(argument, expString);
17741 FreeExpression(exp);
17746 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17751 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17752 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17759 strcat(templateString, ", ");
17760 if(lastParam != p - 1)
17762 strcat(templateString, param->name);
17763 strcat(templateString, " = ");
17765 strcat(templateString, argument);
17774 int len = strlen(templateString);
17776 if(templateString[len - 1] == '>')
17777 templateString[len++] = ' ';
17778 templateString[len++] = '>';
17779 templateString[len++] = '\0';
17781 FreeType(exp->expType);
17783 struct Context * context = SetupTemplatesContext(tClass);
17785 exp->expType = ProcessTypeString(templateString, 0);
17786 FinishTemplatesContext(context);
17793 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)");
17795 else if(type && (type->kind == 9 || type->kind == 10))
17797 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
17801 exp->expType = memberType;
17803 memberType->refCount++;
17808 char expString[10240];
17810 expString[0] = '\0';
17813 PrintExpression(exp, expString);
17814 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17816 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
17818 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
17820 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
17822 struct Identifier * id = exp->__anon1.member.member;
17823 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));
17827 FreeType(exp->expType);
17828 exp->expType = ReplaceThisClassType(_class);
17832 yylloc = oldyylloc;
17837 struct Type * destType = exp->destType;
17839 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17841 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17843 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
17847 ProcessExpressionType(exp);
17854 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
17856 if(classSym && classSym->__anon1.registered)
17858 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
17861 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
17864 DeclareStruct(curExternal, classSym->string, 0, 1);
17865 FreeSpecifier(exp->__anon1._class);
17866 FullClassNameCat(name, classSym->string, 0);
17870 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
17874 struct Expression * e;
17877 if(b->structSize == b->offset)
17878 exp->__anon1.op.exp1 = MkExpConstant("0");
17880 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
17881 exp->__anon1.op.op = '+';
17883 while(b->offset != 0)
17885 struct Symbol * sym;
17886 struct Expression * typeSize;
17889 sym = FindClass(b->fullName);
17891 DeclareStruct(curExternal, sym->string, 0, 1);
17892 FullClassNameCat(name, sym->string, 0);
17893 if(b->structSize == b->offset)
17894 typeSize = MkExpConstant("0");
17896 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
17897 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
17898 e = e->__anon1.op.exp2;
17904 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
17906 FreeSpecifier(exp->__anon1._class);
17907 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
17912 char className[1024];
17914 strcpy(className, "__ecereClass_");
17915 FullClassNameCat(className, classSym->string, 1);
17916 DeclareClass(curExternal, classSym, className);
17917 FreeExpContents(exp);
17919 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
17920 exp->__anon1.member.member = MkIdentifier("structSize");
17924 exp->expType = __extension__ ({
17925 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17927 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
17933 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
17935 exp->expType = __extension__ ({
17936 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17938 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
17940 exp->isConstant = 1;
17941 DeclareType(curExternal, type, 1, 0);
17947 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
17950 FreeType(exp->__anon1.cast.exp->destType);
17951 exp->__anon1.cast.exp->destType = type;
17954 ProcessExpressionType(exp->__anon1.cast.exp);
17957 exp->expType = type;
17958 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
17960 void * prev = exp->prev, * next = exp->next;
17961 struct Type * expType = exp->__anon1.cast.exp->destType;
17962 struct Expression * castExp = exp->__anon1.cast.exp;
17963 struct Type * destType = exp->destType;
17966 expType->refCount++;
17967 FreeType(exp->expType);
17968 FreeTypeName(exp->__anon1.cast.typeName);
17970 FreeType(exp->expType);
17971 FreeType(exp->destType);
17972 exp->expType = expType;
17973 exp->destType = destType;
17974 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
17980 exp->isConstant = exp->__anon1.cast.exp->isConstant;
17986 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
17988 exp->expType = type;
17993 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
17995 ProcessExpressionType(exp->__anon1.vaArg.exp);
17996 exp->expType = type;
18001 struct Expression * e;
18002 struct Type * t = exp->destType;
18004 if(t && !exp->destType->casted)
18006 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18007 CopyTypeInto(t, exp->destType);
18012 exp->isConstant = 1;
18013 FreeType(exp->__anon1.cond.cond->destType);
18014 exp->__anon1.cond.cond->destType = MkClassType("bool");
18015 exp->__anon1.cond.cond->destType->truth = 1;
18016 ProcessExpressionType(exp->__anon1.cond.cond);
18017 if(!exp->__anon1.cond.cond->isConstant)
18018 exp->isConstant = 0;
18019 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18023 FreeType(e->destType);
18026 e->destType->refCount++;
18028 ProcessExpressionType(e);
18031 exp->expType = e->expType;
18033 e->expType->refCount++;
18036 exp->isConstant = 0;
18038 FreeType(exp->__anon1.cond.elseExp->destType);
18039 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18040 if(exp->__anon1.cond.elseExp->destType)
18041 exp->__anon1.cond.elseExp->destType->refCount++;
18042 ProcessExpressionType(exp->__anon1.cond.elseExp);
18043 if(!exp->__anon1.cond.elseExp->isConstant)
18044 exp->isConstant = 0;
18050 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18052 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18054 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18056 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18058 exp->destType->refCount++;
18060 ProcessStatement(exp->__anon1.compound);
18061 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18063 exp->expType->refCount++;
18069 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18071 if(spec && spec->type == 1)
18073 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18074 exp->expType->kind = 19;
18075 exp->byReference = 1;
18079 exp->expType = MkClassType("ecere::com::Class");
18080 exp->byReference = 1;
18086 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18090 struct Identifier * id = exp->__anon1.classData.id;
18091 char structName[1024];
18092 struct Expression * classExp;
18094 strcpy(structName, "__ecereClassData_");
18095 FullClassNameCat(structName, _class->fullName, 0);
18097 exp->__anon1.member.member = id;
18098 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18099 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18101 classExp = MkExpIdentifier(MkIdentifier("class"));
18102 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"))))))));
18103 ProcessExpressionType(exp);
18110 struct Type * type = (((void *)0));
18111 const char * typeString = (((void *)0));
18112 char typeStringBuf[1024];
18114 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))
18116 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18118 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18120 else if(exp->__anon1.list)
18122 struct Expression * e;
18124 for(e = (*exp->__anon1.list).first; e; e = e->next)
18126 ProcessExpressionType(e);
18136 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18140 e->expType = (((void *)0));
18141 e = (*exp->__anon1.list).first;
18142 ProcessExpressionType(e);
18145 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18147 FreeType(e->expType);
18148 e->expType = (((void *)0));
18150 type = (((void *)0));
18158 FreeType(e->expType);
18159 e->expType = (((void *)0));
18165 typeStringBuf[0] = '\0';
18166 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18167 typeString = typeStringBuf;
18169 type = (((void *)0));
18174 char templateString[1024];
18175 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18176 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18177 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18178 struct Expression * expExt;
18179 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18181 sprintf(templateString, "Container<%s>", typeString);
18182 if(exp->__anon1.list)
18184 struct Expression * e;
18186 type = ProcessTypeString(typeString, 0);
18187 while((e = (*exp->__anon1.list).first))
18189 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18190 e->destType = type;
18192 ProcessExpressionType(e);
18193 ListAdd(initializers, MkInitializerAssignment(e));
18196 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18198 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18199 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18200 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18201 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18202 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18203 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18204 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18205 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18206 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18207 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18208 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18210 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18212 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18213 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18214 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18215 exp->expType = ProcessTypeString(templateString, 0);
18217 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18218 ProcessExpressionType(expExt);
18222 exp->expType = ProcessTypeString("Container", 0);
18223 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18228 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18230 FreeType(exp->expType);
18231 exp->expType = ReplaceThisClassType(thisClass);
18233 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)
18235 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18239 if(exp->expType->kind != 15)
18241 struct Type * member;
18242 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18244 FreeType(exp->expType);
18245 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18246 exp->expType->kind = symbol->type->kind;
18247 exp->expType->refCount++;
18248 exp->expType->__anon1.__anon1.enumName = enumName;
18249 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18250 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18251 member->refCount++;
18255 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18257 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18259 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);
18261 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18267 if(exp->destType && (exp->destType->kind == 18))
18269 else if(exp->destType && !exp->destType->keepCast)
18271 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18272 exp->needTemplateCast = 1;
18273 if(exp->destType->kind == 0)
18275 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18277 unsigned int invalidCast = 0;
18279 if(inCompiler && exp->destType->count && exp->expType)
18281 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18282 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18284 if(c1 && c1->type != 1)
18285 c1 = (((void *)0));
18286 if(c2 && c2->type != 1)
18287 c2 = (((void *)0));
18288 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18291 if(!exp->destType->count || unresolved || invalidCast)
18296 if(exp->destType->kind != 14)
18303 char expString[10240];
18305 expString[0] = '\0';
18306 PrintType(exp->destType, type2, 0, 1);
18309 PrintExpression(exp, expString);
18310 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18313 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18314 else if(exp->type != 16)
18315 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18320 char expString[10240];
18322 expString[0] = '\0';
18325 PrintExpression(exp, expString);
18326 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18329 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18330 else if(exp->type != 16)
18331 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18343 PrintType(exp->expType, type1, 0, 1);
18344 PrintType(exp->destType, type2, 0, 1);
18346 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)))
18350 char expString[10240];
18352 expString[0] = '\0';
18355 PrintExpression(exp, expString);
18356 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18358 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")))
18361 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18363 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18367 FreeType(exp->expType);
18368 exp->destType->refCount++;
18369 exp->expType = exp->destType;
18375 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))
18377 struct Expression * nbExp = GetNonBracketsExp(exp);
18379 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18381 struct Expression * e = MoveExpContents(exp);
18383 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18385 exp->__anon1.cast.exp->destType = exp->destType;
18387 exp->destType->refCount++;
18388 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18392 else if(unresolved)
18394 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18395 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);
18396 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18397 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18399 else if(!exp->expType && exp->type != 16)
18401 char expString[10240];
18403 expString[0] = '\0';
18406 PrintExpression(exp, expString);
18407 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18409 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18412 ApplyAnyObjectLogic(exp);
18413 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)))
18415 exp->byReference = 1;
18417 yylloc = oldyylloc;
18420 static void ProcessFunction(struct FunctionDefinition * function)
18422 struct Identifier * id = GetDeclId(function->declarator);
18423 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18424 struct Type * type = symbol ? symbol->type : (((void *)0));
18425 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18426 struct Context * oldTopContext = topContext;
18428 yylloc = function->loc;
18429 if(type && type->__anon1.__anon2.thisClass)
18431 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18432 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18433 char className[1024];
18434 char structName[1024];
18435 struct Declarator * funcDecl;
18436 struct Symbol * thisSymbol;
18437 unsigned int typedObject = 0;
18439 if(_class && !_class->base)
18441 _class = currentClass;
18442 if(_class && !_class->symbol)
18443 _class->symbol = FindClass(_class->fullName);
18444 classSym = _class ? _class->symbol : (((void *)0));
18447 thisClass = _class;
18448 if(inCompiler && _class)
18450 if(type->kind == 11)
18452 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18454 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18456 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18459 if(type->classObjectType != 1)
18461 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18462 symbol->type->__anon1.__anon2.staticMethod = 1;
18463 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18464 symbol->type->extraParam = 0;
18467 strcpy(className, "__ecereClass_");
18468 FullClassNameCat(className, _class->fullName, 1);
18469 structName[0] = (char)0;
18470 FullClassNameCat(structName, _class->fullName, 0);
18471 funcDecl = GetFuncDecl(function->declarator);
18474 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18476 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18478 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18480 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18481 FreeTypeName(param);
18484 if(!function->propertyNoThis)
18486 struct TypeName * thisParam = (((void *)0));
18488 if(type->classObjectType != 1)
18490 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18491 if(!funcDecl->__anon1.function.parameters)
18492 funcDecl->__anon1.function.parameters = MkList();
18493 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18497 if(type->classObjectType != 1)
18499 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18500 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18502 thisParam = __extension__ ({
18503 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18505 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18507 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18508 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18512 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18514 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18516 funcDecl = GetFuncDecl(initDecl->declarator);
18519 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18521 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18523 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18525 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18526 FreeTypeName(param);
18529 if(type->classObjectType != 1)
18531 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18533 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18535 if(!funcDecl->__anon1.function.parameters)
18536 funcDecl->__anon1.function.parameters = MkList();
18537 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18545 if(type->classObjectType != 1)
18547 thisSymbol = __extension__ ({
18548 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18550 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18552 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18553 if(typedObject && thisSymbol->type)
18555 thisSymbol->type->classObjectType = 2;
18556 thisSymbol->type->byReference = type->byReference;
18557 thisSymbol->type->typedByReference = type->byReference;
18561 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
18563 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18566 struct __ecereNameSpace__ecere__com__Class * base;
18568 for(base = _class; base && base->type != 1000; base = base->next)
18570 for(member = base->membersAndProperties.first; member; member = member->next)
18571 if(!member->isProperty)
18577 for(member = _class->membersAndProperties.first; member; member = member->next)
18578 if(!member->isProperty)
18582 char pointerName[1024];
18583 struct Declaration * decl;
18584 struct Initializer * initializer;
18585 struct Expression * exp, * bytePtr;
18587 strcpy(pointerName, "__ecerePointer_");
18588 FullClassNameCat(pointerName, _class->fullName, 0);
18590 char className[1024];
18592 strcpy(className, "__ecereClass_");
18593 FullClassNameCat(className, classSym->string, 1);
18594 DeclareClass(curExternal, classSym, className);
18596 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18599 struct Expression * e;
18601 if(_class->offset && _class->offset == _class->base->structSize)
18603 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
18604 ProcessExpressionType(e);
18610 sprintf(string, "%d", _class->offset);
18611 e = MkExpConstant(string);
18613 exp = QBrackets(MkExpOp(bytePtr, '+', e));
18617 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18619 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18620 exp->expType = __extension__ ({
18621 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18623 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18624 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18626 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18627 }), __ecereInstance2;
18631 yylloc = function->body->loc;
18632 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18634 struct Context * prevContext = curContext;
18635 struct __ecereNameSpace__ecere__sys__OldList * list;
18637 curContext = function->body->__anon1.compound.context;
18638 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18639 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
18640 curContext = prevContext;
18642 decl->symbol = (((void *)0));
18643 if(!function->body->__anon1.compound.declarations)
18644 function->body->__anon1.compound.declarations = MkList();
18645 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18651 thisClass = (((void *)0));
18654 FreeSpecifier(id->_class);
18655 id->_class = (((void *)0));
18656 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18658 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18660 id = GetDeclId(initDecl->declarator);
18661 FreeSpecifier(id->_class);
18662 id->_class = (((void *)0));
18666 topContext = function->body->__anon1.compound.context;
18668 struct FunctionDefinition * oldFunction = curFunction;
18670 curFunction = function;
18672 ProcessStatement(function->body);
18673 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18675 struct Statement * prevCompound = curCompound;
18676 struct Context * prevContext = curContext;
18677 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18679 if(!function->body->__anon1.compound.statements)
18680 function->body->__anon1.compound.statements = MkList();
18681 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18682 curCompound = function->body;
18683 curContext = function->body->__anon1.compound.context;
18684 ProcessStatement(fireWatchers);
18685 curContext = prevContext;
18686 curCompound = prevCompound;
18688 curFunction = oldFunction;
18690 if(function->declarator)
18692 ProcessDeclarator(function->declarator, 1);
18694 topContext = oldTopContext;
18695 thisClass = oldThisClass;
18698 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18700 struct ClassDef * def;
18701 struct External * external = curExternal;
18702 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18704 for(def = definitions->first; def; def = def->next)
18708 if(def->__anon1.function->declarator)
18709 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18711 curExternal = external;
18712 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18714 else if(def->type == 2)
18716 if(def->__anon1.decl->type == 2)
18718 thisClass = regClass;
18719 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18720 thisClass = (((void *)0));
18724 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18727 thisClass = regClass;
18728 ProcessDeclaration(def->__anon1.decl);
18729 thisClass = backThisClass;
18732 else if(def->type == 1 && def->__anon1.defProperties)
18734 struct MemberInit * defProperty;
18735 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);
18737 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18738 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18740 thisClass = regClass;
18741 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18742 thisClass = (((void *)0));
18744 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18745 FreeSymbol(thisSymbol);
18747 else if(def->type == 3 && def->__anon1.propertyDef)
18749 struct PropertyDef * prop = def->__anon1.propertyDef;
18751 thisClass = regClass;
18756 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18758 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18760 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18761 ProcessStatement(prop->setStmt);
18767 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18769 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18771 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18772 ProcessStatement(prop->getStmt);
18774 if(prop->issetStmt)
18778 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18780 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18782 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18783 ProcessStatement(prop->issetStmt);
18785 thisClass = (((void *)0));
18787 else if(def->type == 4 && def->__anon1.propertyWatch)
18789 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18791 thisClass = regClass;
18792 if(propertyWatch->compound)
18794 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);
18796 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18797 curExternal = (((void *)0));
18798 ProcessStatement(propertyWatch->compound);
18800 thisClass = (((void *)0));
18805 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
18811 if(spec->__anon1.specifier == THISCLASS)
18816 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
18817 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
18818 ProcessSpecifier(spec, declareStruct);
18825 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
18828 DeclareType(curExternal, symbol->type, 1, 1);
18829 else if(spec->__anon1.__anon1.symbol)
18831 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
18833 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
18839 struct Enumerator * e;
18841 if(spec->__anon1.__anon2.list)
18843 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
18846 ProcessExpressionType(e->exp);
18855 if(spec->__anon1.__anon2.definitions)
18857 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
18859 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
18866 void ComputeDataTypes()
18868 struct External * external;
18870 currentClass = (((void *)0));
18871 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18872 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
18873 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
18874 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
18875 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
18876 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
18877 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
18878 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
18879 DeclareFunctionUtil((((void *)0)), "eSystem_New");
18880 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
18881 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
18882 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
18883 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
18884 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
18885 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
18886 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
18887 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
18888 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
18889 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
18890 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
18891 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
18892 for(external = (*ast).first; external; external = external->next)
18894 afterExternal = curExternal = external;
18895 if(external->type == 0)
18899 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18900 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18902 currentClass = external->__anon1.function->_class;
18903 ProcessFunction(external->__anon1.function);
18905 else if(external->type == 1)
18907 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
18909 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18910 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18912 currentClass = (((void *)0));
18913 if(external->__anon1.declaration)
18914 ProcessDeclaration(external->__anon1.declaration);
18916 else if(external->type == 2)
18918 struct ClassDefinition * _class = external->__anon1._class;
18920 currentClass = external->symbol->__anon1.registered;
18923 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
18924 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
18926 if(_class->definitions)
18928 ProcessClass(_class->definitions, _class->symbol);
18932 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18933 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18936 else if(external->type == 4)
18938 thisNameSpace = external->__anon1.id->string;
18941 currentClass = (((void *)0));
18942 thisNameSpace = (((void *)0));
18943 curExternal = (((void *)0));
18946 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
18951 if(decl->__anon1.identifier->classSym)
18953 FreeSpecifier(decl->__anon1.identifier->_class);
18954 decl->__anon1.identifier->_class = (((void *)0));
18958 if(decl->__anon1.array.exp)
18959 ProcessExpressionType(decl->__anon1.array.exp);
18967 struct Identifier * id = (((void *)0));
18968 struct Specifier * classSpec = (((void *)0));
18970 if(decl->type == 4)
18972 id = GetDeclId(decl);
18973 if(id && id->_class)
18975 classSpec = id->_class;
18976 id->_class = (((void *)0));
18979 if(decl->declarator)
18980 ProcessDeclarator(decl->declarator, isFunction);
18981 if(decl->type == 4)
18985 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
18987 if(!decl->__anon1.function.parameters)
18988 decl->__anon1.function.parameters = MkList();
18989 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
18991 if(decl->__anon1.function.parameters)
18993 struct TypeName * param;
18995 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
18997 if(param->qualifiers)
18999 struct Specifier * spec;
19001 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
19003 if(spec->type == 0)
19005 if(spec->__anon1.specifier == TYPED_OBJECT)
19007 struct Declarator * d = param->declarator;
19008 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);
19011 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
19012 FreeList(param->qualifiers, (void *)(FreeSpecifier));
19013 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
19014 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
19015 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19016 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
19020 else if(spec->__anon1.specifier == ANY_OBJECT)
19022 struct Declarator * d = param->declarator;
19024 FreeList(param->qualifiers, (void *)(FreeSpecifier));
19025 param->qualifiers = MkListOne(MkSpecifier(VOID));
19027 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
19028 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
19031 else if(spec->__anon1.specifier == THISCLASS)
19036 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
19037 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
19038 ProcessSpecifier(spec, 0);
19043 else if(spec->type == 1)
19045 ProcessSpecifier(spec, isFunction);
19049 if(param->declarator)
19050 ProcessDeclarator(param->declarator, 0);
19059 static void ProcessDeclaration(struct Declaration * decl)
19061 yylloc = decl->loc;
19066 unsigned int declareStruct = 0;
19068 if(decl->__anon1.__anon1.declarators)
19070 struct InitDeclarator * d;
19072 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
19074 struct Type * type, * subType;
19076 ProcessDeclarator(d->declarator, 0);
19077 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
19080 ProcessInitializer(d->initializer, type);
19081 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
19083 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
19085 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
19087 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
19088 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
19089 if(decl->__anon1.__anon1.specifiers)
19090 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
19091 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
19094 decl->__anon1.inst = inst;
19098 for(subType = type; subType; )
19100 if(subType->kind == 8)
19105 else if(subType->kind == 13)
19107 else if(subType->kind == 12)
19108 subType = subType->__anon1.__anon4.arrayType;
19117 if(decl->__anon1.__anon1.specifiers)
19119 struct Specifier * s;
19121 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
19123 ProcessSpecifier(s, declareStruct);
19130 ProcessInstantiationType(decl->__anon1.inst);
19135 struct Specifier * spec;
19136 struct Declarator * d;
19137 unsigned int declareStruct = 0;
19139 if(decl->__anon1.__anon1.declarators)
19141 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
19143 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
19144 struct Type * subType;
19146 ProcessDeclarator(d, 0);
19147 for(subType = type; subType; )
19149 if(subType->kind == 8)
19154 else if(subType->kind == 13)
19156 else if(subType->kind == 12)
19157 subType = subType->__anon1.__anon4.arrayType;
19164 if(decl->__anon1.__anon1.specifiers)
19166 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
19167 ProcessSpecifier(spec, declareStruct);
19174 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19176 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19178 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19179 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19180 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19181 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19182 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19183 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19184 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19185 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19186 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19187 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19188 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19189 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19190 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19191 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19192 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19193 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19194 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19195 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19196 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19197 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19198 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19199 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19200 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19201 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19202 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19203 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19204 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19205 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19206 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19207 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19208 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19209 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19210 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19211 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19212 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19213 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19214 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19215 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19216 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19217 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19218 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19219 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19220 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19221 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19222 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19223 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19227 __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);
19228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19229 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19232 __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);
19233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19240 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19244 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19246 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19247 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19248 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)
19249 __ecereClass_Conversion = class;
19250 __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);
19251 __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);
19252 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19253 __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);
19254 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19255 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19256 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19257 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19258 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19259 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19260 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19261 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19262 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19263 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19264 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19265 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19266 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19267 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19268 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19269 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19270 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19271 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19272 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19273 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19274 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19275 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);